GitXplorerGitXplorer
w

beamly-core.config

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
5b36ab3cbde505633abf9160f3f1b9d9679c857a

fixed EOF while reading bug while value is "0"

wwineway committed 6 years ago
Unverified
d6fbd4cea665587118a9a7c443fadd4c2444eeb1

Merge pull request #4 from beamly/fallback-to-property

ddwijnand committed 10 years ago
Unverified
2671d7aae27a0862696381f1e17211b2cf6cf2c5

update README

gglenford committed 10 years ago
Unverified
da5877cf5e9aa6cea6929ac2c0d687a0e0c87265

fallback to standard typesafe config behaviour if no 'config' property

gglenford committed 10 years ago
Unverified
24bfb1d48fff81219d7a0e3c3c9e032281f8e5bc

make filename optional and fallback to system property if not

gglenford committed 10 years ago
Unverified
8290effb3bffc84e526150a6e7adb432ae0c0f49

Merge pull request #3 from zeebox/prepare-to-open

llotia committed 10 years ago

README

The README file for this repository.

beamly-core.config

Reasoning

This library is to wrap the Typesafe config library. Most of the Beamly services at the time of writing are Scala based and make extensive use of this and maintaining consistency with them is valuable.

Releases

  • Releases are published to Clojars

  • Latest stable release is [0.1.1]

Leiningen dependency information:

[beamly/beamly-core.config "0.1.1"]

Maven dependency information:

<dependency>
  <groupId>beamly</groupId>
  <artifactId>beamly-core.config</artifactId>
  <version>0.1.1</version>
</dependency>

Usage

A simple example:

(ns example.application
  (:require [beamly-core.config :as cfg]))

(defn get-my-config-as-a-map [filename]
  (cfg/load-config filename))

The config is built up in the following way.

The default config ("reference.conf") is looked for in the class path, over this the provided configuration is overlayed, and upon that the system properties are overlayed.

In this manner default config may be overwritten, but system properties cannot.

If 'filename' is not supplied it will look for a system property 'config' for the filename, if that is not found it will default to Typesafe Config's default behaviour.

Copyright and License

The MIT License (MIT)

Copyright © 2015 Beamly Ltd.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.