configrity-yaml


License

License

Categories

Categories

config Application Layer Libs Configuration
GroupId

GroupId

org.streum
ArtifactId

ArtifactId

configrity-yaml_2.10
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

configrity-yaml
configrity-yaml
Project URL

Project URL

https://github.com/paradigmatic/Configrity
Project Organization

Project Organization

org.streum
Source Code Management

Source Code Management

https://github.com/paradigmatic/Configrity

Download configrity-yaml_2.10

How to add to project

<!-- https://jarcasting.com/artifacts/org.streum/configrity-yaml_2.10/ -->
<dependency>
    <groupId>org.streum</groupId>
    <artifactId>configrity-yaml_2.10</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.streum/configrity-yaml_2.10/
implementation 'org.streum:configrity-yaml_2.10:1.0.0'
// https://jarcasting.com/artifacts/org.streum/configrity-yaml_2.10/
implementation ("org.streum:configrity-yaml_2.10:1.0.0")
'org.streum:configrity-yaml_2.10:jar:1.0.0'
<dependency org="org.streum" name="configrity-yaml_2.10" rev="1.0.0">
  <artifact name="configrity-yaml_2.10" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.streum', module='configrity-yaml_2.10', version='1.0.0')
)
libraryDependencies += "org.streum" % "configrity-yaml_2.10" % "1.0.0"
[org.streum/configrity-yaml_2.10 "1.0.0"]

Dependencies

compile (4)

Group / Artifact Type Version
org.streum : configrity-core_2.10 jar 1.0.0
org.scala-lang : scala-library jar 2.10.0
org.scalatest : scalatest_2.10 jar 1.9.1
org.yaml : snakeyaml jar 1.11

Project Modules

There are no modules declared in this project.

Configrity README file

Configrity is a configuration library for Scala 2.10 or +. Configuration instances are immutable, thread-safe and allow functional design patterns, such as:

  • Getting options to values
  • Converting implicitly values via type-classes
  • Reader monad

The API is stable and covered by tests.

Build Status

Example

import org.streum.configrity._

val config = Configuration.load( "server.conf" )

val hostname = config[String]("host")
val port = config[Int]("port")

val updatedConfig = config.set ("port",8080 )
upddatedConfig.save( "local.conf" )	

Features

Implemented

  • Automatic values conversions via type classes.
  • Loading configurations from any source (File, InputStream, URL, etc.)
  • Loading configurations from system properties and environment variables.
  • Saving configurations to files.
  • Interoperability with java properties.
  • Hierarchical configuration blocks.
  • Configuration chaining (such as to provide default values).
  • Single import: import org.streum.configrity._ imports all you need.
  • Access through reader monads
  • Values can be lists (v0.7.0)
  • Extra value converters: File, Color, URL, URI (v0.7.0)
  • include directive is supported, adding compatibility with Akka and Configgy configurations files.
  • Loading configurations from classpath/resources (v0.9.0)
  • YAML format support (v0.10.0)

Planned

  • More export/Import formats: INI, JSON, XML, apache, etc.
  • Build configurations from command line arguments

Requirements

Configrity depends on Scala 2.10 or newer.

While core features do not depend on external libraries, some modules may. In that case, the approriate dependencies will be automatically installed by sbt/maven.

Installation

From SBT

The dependency line is:

"org.streum" %% "configrity-core" % "1.0.0"

Additional modules require addition dependency lines. Check the wiki for more information: https://github.com/paradigmatic/Configrity/wiki/Modules

From Maven, Buildr, Ivy, Grape and Grails

Follow the repository instructions.

From source (master branch)

To install Configrity you just need a working java installation (tested with JDK 1.6 and 1.7, but may work with 1.5) and SBT 0.13.5:

$ git clone git://github.com/paradigmatic/Configrity.git
$ cd Configrity
$ sbt
> test
> doc
> package

Documentation

See the wiki: https://github.com/paradigmatic/Configrity/wiki

A scaladoc reference can be found online: http://paradigmatic.github.com/Configrity/

Collaboration

Reporting bugs and asking for features

You can github issues tracker, to report bugs or to ask for new features:

https://github.com/paradigmatic/Configrity/issues

Submitting patches

Patches are gladly accepted from their original author. Along with any patches, please state that the patch is your original work and that you license the work to the Configrity project under the LGPLv3 or a compatible license.

To propose a patch, fork the project and send a pull request via github. Tests are appreciated.

License and ownership

Configrity is a free and open source library released under the permissive GNU LesserGPLv3 license (see LICENSE.txt).

Copyright (C) 2011-2014. Paradigmatic. All rights reserved.

Versions

Version
1.0.0