Permalink
Browse files

Removed the ValueConverters object

  • Loading branch information...
1 parent 1c25ca8 commit 942142e39596f19729b1859cc2b7ac4da20cea3c @paradigmatic committed Jul 5, 2011
View
@@ -14,17 +14,18 @@ simplicity, immutability, type safety, flexibility and humility.
- Interoperability with java properties.
- Hierarchical configuration blocks.
- Configuration chaining (such as to provide default values).
+ - Single import: `import configrity._` imports all you need.
+
### Planned ###
+ - Loading from resources.
- Implicit converters for: File, URL, URI and Color.
- - Single import
- Export/Import formats: INI, JSON, XML, apache, plists, etc.
## Example ##
- import configrity.Configuration._
- import configrity.ValueConverters._
+ import configrity._
val config = Configuration.load( "server.conf" )
View
@@ -118,5 +118,3 @@ trait DefaultConverters {
}
}
-
-object ValueConverters extends DefaultConverters
View
@@ -20,8 +20,6 @@
package configrity.io
import configrity.Configuration
-import configrity.ValueConverters._
-
import scala.collection.mutable.StringBuilder
import scala.util.parsing.combinator._
View
@@ -20,7 +20,6 @@
package configrity.io
import configrity.Configuration
-import configrity.ValueConverters._
import scala.collection.mutable.StringBuilder
import scala.util.parsing.combinator._
@@ -20,9 +20,9 @@
package configrity.io
import configrity.Configuration
-import configrity.ValueConverters._
import scala.collection.mutable.StringBuilder
+
import scala.util.parsing.combinator._
/**
@@ -1,11 +1,11 @@
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
import configrity.Configuration
+import configrity.DefaultConverters
import configrity.io._
-import configrity.ValueConverters._
-class ConfigurationSpec extends FlatSpec with ShouldMatchers{
+class ConfigurationSpec extends FlatSpec with ShouldMatchers with DefaultConverters{
val data = Map("foo"->"FOO", "bar"->"1234", "baz"->"on" )
val config = Configuration( data )
@@ -1,10 +1,9 @@
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
-import configrity.Configuration
+import configrity._
import configrity.JProperties
import configrity.io._
-import configrity.ValueConverters._
import java.util.Properties
class JPropertiesSpec extends FlatSpec with ShouldMatchers {
@@ -1,10 +1,10 @@
import org.scalatest.WordSpec
import org.scalatest.matchers.ShouldMatchers
import configrity.ValueConverter
-import configrity.ValueConverters._
+import configrity.DefaultConverters
-class ValueConverterSpec extends WordSpec with ShouldMatchers{
+class ValueConverterSpec extends WordSpec with ShouldMatchers with DefaultConverters{
def convert[A]( opt: Option[String] )(implicit converter: ValueConverter[A] ) =
@@ -1,7 +1,6 @@
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
-import configrity.Configuration
-import configrity.ValueConverters._
+import configrity._
import configrity.io.BlockFormat
import configrity.io.BlockFormat._
import configrity.io.StandardFormat.ParserException
@@ -1,7 +1,6 @@
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
-import configrity.Configuration
-import configrity.ValueConverters._
+import configrity._
import configrity.io.FlatFormat._
import configrity.io.FlatFormat
@@ -1,7 +1,6 @@
import org.scalatest.FlatSpec
import org.scalatest.matchers.ShouldMatchers
-import configrity.Configuration
-import configrity.ValueConverters._
+import configrity._
import configrity.io.StandardFormat.ParserException
trait StandardParserSpec extends FlatSpec with ShouldMatchers {

0 comments on commit 942142e

Please sign in to comment.