This repository has been archived by the owner on Jun 18, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Simeon H.K. Fitch
committed
May 14, 2016
1 parent
6aedb6d
commit 2f453c7
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
## Initial Release | ||
|
||
* Supports field-dereference syntax for _Typesafe Config_ lookups, supporting types `T` and `Option[T]` where `T` is `{Boolean|Int|Double|Long|Float|String|Duration|Path|File|Config|AnyRef}`. | ||
* Supports field-dereference syntax for _Typesafe Config_ lookups, supporting types `T` and `Option[T]` where `T` is `{Boolean|Int|Double|Long|Float|String|Duration|Path|File|Config|AnyRef}`. | ||
|
||
|
||
`object MyConfig extends SSConfig()` | ||
`val tmp = MyConfig.myapp.tempdir.as[Path]` | ||
`val runtime = MyConfig.java.runtime.name.as[String]` | ||
`val timeout = MyConfig.akka.actor.'creation-timeout'.as[Duration].getSeconds` | ||
`val debugMode = MyConfig.app.debug.asOption[Boolean].getOrElse(false)` | ||
|
||
|
||
* Allows nested configuration via optional path parameter: | ||
|
||
`object AkkaConfig extends SSConfig("akka")` | ||
`val akkaVersion = AkkaConfig.version.as[String]` | ||
`val timeout = AkkaConfig.actor.`creation-timeout`.as[Duration].getSeconds` | ||
|
||
* Allows custom config loading via optional `Config` parameter: | ||
|
||
`val props = new SSConfig(ConfigFactory.load("myprops.properties"))` | ||
`val version = props.version.as[String]` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[Simple Scala Config](https://github.com/ElderResearch/ssc) is [Typesafe Config](https://github.com/typesafehub/config) wrapped in a [`Dynamic`][http://www.scala-lang.org/api/2.11.8/#scala.Dynamic] Scala blanket. It is an extremely thin wrapper (less than 100 SLOC) around _Typesafe Config_, allowing retrieval of configuration values using field-dereference syntax. | ||
[Simple Scala Config](https://github.com/ElderResearch/ssc) is [Typesafe Config](https://github.com/typesafehub/config) wrapped in a [`Dynamic`](http://www.scala-lang.org/api/2.11.8/#scala.Dynamic) Scala blanket. It is an extremely thin wrapper (less than 100 SLOC), allowing retrieval of configuration values using field-dereference syntax. |