rock_config 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rock_config/config.rb +2 -3
- data/lib/rock_config/version.rb +1 -1
- data/spec/config_spec.rb +15 -2
- data/spec/fixtures/database.yml +2 -0
- data/spec/rock_config_spec.rb +4 -1
- metadata +2 -2
data/lib/rock_config/config.rb
CHANGED
data/lib/rock_config/version.rb
CHANGED
data/spec/config_spec.rb
CHANGED
@@ -27,7 +27,7 @@ module RockConfig
|
|
27
27
|
config.for_environment("I do not exist").should be_nil
|
28
28
|
end
|
29
29
|
|
30
|
-
it "returns correct values
|
30
|
+
it "returns correct values" do
|
31
31
|
hash = {
|
32
32
|
"development" => {
|
33
33
|
"host" => "localhost"
|
@@ -38,7 +38,20 @@ module RockConfig
|
|
38
38
|
config.development.host.should eq("localhost")
|
39
39
|
end
|
40
40
|
|
41
|
-
it "returns correct
|
41
|
+
it "returns correct boolean values" do
|
42
|
+
hash = {
|
43
|
+
"development" => {
|
44
|
+
"test_mode" => true,
|
45
|
+
"computer_says" => false
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
config = Config.new(hash)
|
50
|
+
config.development.test_mode.should == true
|
51
|
+
config.development.computer_says.should == false
|
52
|
+
end
|
53
|
+
|
54
|
+
it "returns correct nested values" do
|
42
55
|
hash = {
|
43
56
|
"development" => {
|
44
57
|
"elastic" => {
|
data/spec/fixtures/database.yml
CHANGED
data/spec/rock_config_spec.rb
CHANGED
@@ -8,7 +8,10 @@ module RockConfig
|
|
8
8
|
config.config_loaders << YamlLoader.new
|
9
9
|
end
|
10
10
|
|
11
|
-
RockConfig.for("database", "development")
|
11
|
+
config = RockConfig.for("database", "development")
|
12
|
+
config.magic_number.should eq(213)
|
13
|
+
config.test_false.should == false
|
14
|
+
config.test_true.should == true
|
12
15
|
end
|
13
16
|
end
|
14
17
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rock_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
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-02
|
12
|
+
date: 2013-03-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|