Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Releases: ElderResearch/ssc

Release 1.0.1

14 Aug 15:16
Compare
Choose a tag to compare
  • Added reader for Seq[Config] (thanks @jw3!)
  • Cross build for scala 2.12.x (thanks @jw3!)
  • Integrated sbt-release.

v1.0.0

03 Nov 14:41
Compare
Choose a tag to compare
  • Upgraded to "com.typesafe" % "config" % "1.3.1"
  • Cross compiled against Scala "2.11.8" and "2.12.0-RC1"

Of `Seq` types and type classes

15 May 19:49
Compare
Choose a tag to compare

New Features

  • Added support for HOCON array values through as[Seq[T]] and asOption[Seq[T]]
  • Converted value extraction to use user-extensible typeclass pattern. See README for details.

Changes

Breaking Changes

  • asSize has gone away in preference for as[ConfigMemorySize], which normalizes it's usage with rest of API.

Initial release

14 May 22:15
Compare
Choose a tag to compare

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 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]