configus 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,6 +25,10 @@ module Configus
25
25
  @config[key]
26
26
  end
27
27
 
28
+ def to_hash
29
+ @config
30
+ end
31
+
28
32
  def each_pair(&block)
29
33
  #TODO: hash values should be Configus instance object
30
34
  @config.each_pair(&block)
@@ -15,7 +15,7 @@ module Configus
15
15
  end
16
16
 
17
17
  def method_missing(key, value = nil, &block)
18
- @result[key] = value ? value : self.class.generate(block)
18
+ @result[key] = block_given? ? self.class.generate(block) : value
19
19
  end
20
20
  end
21
21
  end
@@ -1,3 +1,3 @@
1
1
  module Configus
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -15,6 +15,8 @@ describe Configus::Builder do
15
15
  env :development, :parent => :production do
16
16
  bar 'foo'
17
17
  foo 'foobar'
18
+ nil_value nil
19
+ false_value false
18
20
  sections do
19
21
  first 'another_value'
20
22
  end
@@ -29,6 +31,8 @@ describe Configus::Builder do
29
31
  :key => 'value',
30
32
  :bar => 'foo',
31
33
  :foo => 'foobar',
34
+ :nil_value => nil,
35
+ :false_value => false,
32
36
  :sections => {
33
37
  :first => 'another_value',
34
38
  :second => 'second_value'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-17 00:00:00.000000000 Z
12
+ date: 2012-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &16603100 !ruby/object:Gem::Requirement
16
+ requirement: &15082200 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *16603100
24
+ version_requirements: *15082200
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake
27
- requirement: &16602680 !ruby/object:Gem::Requirement
27
+ requirement: &15081680 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *16602680
35
+ version_requirements: *15081680
36
36
  description: Configus helps you easily manage environment specific settings
37
37
  email:
38
38
  - mokevnin@gmail.com