This repository has been archived by the owner on Jun 18, 2019. It is now read-only.
Releases: ElderResearch/ssc
Releases · ElderResearch/ssc
Release 1.0.1
v1.0.0
Of `Seq` types and type classes
New Features
- Added support for HOCON array values through
as[Seq[T]]
andasOption[Seq[T]]
- Converted value extraction to use user-extensible typeclass pattern. See README for details.
Changes
Breaking Changes
asSize
has gone away in preference foras[ConfigMemorySize]
, which normalizes it's usage with rest of API.
Initial release
Simple Scala Config is Typesafe Config wrapped in a Dynamic
Scala blanket. It is an extremely thin wrapper (less than 100 SLOC), allowing retrieval of configuration values using field-dereference syntax.
-
Supports field-dereference syntax for Typesafe Config lookups, supporting types
T
andOption[T]
whereT
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]