mixlib-config 2.0.0.rc.3 → 2.0.0.rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,7 +79,7 @@ module Mixlib
79
79
  # === Raises
80
80
  # <UnknownConfigOptionError>:: If the config option does not exist and strict mode is on.
81
81
  def []=(config_option, value)
82
- internal_set(config_option, value)
82
+ internal_set(config_option.to_sym, value)
83
83
  end
84
84
 
85
85
  # Check if Mixlib::Config has a config option.
@@ -19,7 +19,7 @@
19
19
  module Mixlib
20
20
  module Config
21
21
 
22
- VERSION = "2.0.0.rc.3"
22
+ VERSION = "2.0.0.rc.4"
23
23
 
24
24
  end
25
25
  end
@@ -63,11 +63,20 @@ describe Mixlib::Config do
63
63
  ConfigIt[:alpha].should == 'omega'
64
64
  end
65
65
 
66
+ it "should allow you to reference a value by string index" do
67
+ ConfigIt['alpha'].should == 'omega'
68
+ end
69
+
66
70
  it "should allow you to set a value by index" do
67
71
  ConfigIt[:alpha] = "one"
68
72
  ConfigIt[:alpha].should == "one"
69
73
  end
70
74
 
75
+ it "should allow you to set a value by string index" do
76
+ ConfigIt['alpha'] = "one"
77
+ ConfigIt[:alpha].should == "one"
78
+ end
79
+
71
80
  it "should allow setting a value with attribute form" do
72
81
  ConfigIt.arbitrary_value = 50
73
82
  ConfigIt.arbitrary_value.should == 50
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mixlib-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc.3
4
+ version: 2.0.0.rc.4
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-13 00:00:00.000000000 Z
12
+ date: 2013-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake