easy_config 0.9.0 → 0.9.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/easy_config/configuration.rb +2 -1
- data/lib/easy_config/version.rb +1 -1
- data/spec/easy_config/config_file_spec.rb +10 -0
- data/spec/fixtures/redis.yml +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4a329fcc6afa215c3d37b8b13650816478630de
|
4
|
+
data.tar.gz: 9a803531e3edb61264e04f7644bffa857e058c3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb3cd6ee2017cf3d55a94168a0a7205b6e0e7745a329bfeafa188c4c201828bbdca0af238c3df6d312792ba840434453bd4c0d2e82135c47b9bce9469a0012a6
|
7
|
+
data.tar.gz: db95eb21e75fdafa4038e09c5c7f3a08bb710a6279381b3e8f2eafd111765be7ca2b18d8a101c43368a9d18a452a6cd97e2d37cd6806ba1208989d8bebe146b4
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'methodize'
|
2
|
+
require 'byebug'
|
2
3
|
|
3
4
|
class EasyConfig::Configuration
|
4
5
|
def initialize(config)
|
@@ -6,6 +7,6 @@ class EasyConfig::Configuration
|
|
6
7
|
end
|
7
8
|
|
8
9
|
def method_missing(name, *args)
|
9
|
-
@config.send(name, *args)
|
10
|
+
@config.send(name, *args) rescue nil
|
10
11
|
end
|
11
12
|
end
|
data/lib/easy_config/version.rb
CHANGED
@@ -28,6 +28,16 @@ describe EasyConfig::ConfigFile do
|
|
28
28
|
its(:configuration) { should be_a EasyConfig::Configuration }
|
29
29
|
its('configuration.host') { should eq 'localhost' }
|
30
30
|
its('configuration.port') { should eq 4567 }
|
31
|
+
|
32
|
+
context "with unknown env" do
|
33
|
+
before do
|
34
|
+
EasyConfig::Env.set('foobar')
|
35
|
+
EasyConfig::ConfigFile.reset!
|
36
|
+
end
|
37
|
+
after { EasyConfig::Env.set(nil) }
|
38
|
+
subject { EasyConfig::ConfigFile.all.find { |c| c.name == :redis } }
|
39
|
+
its('configuration.port') { should be_nil }
|
40
|
+
end
|
31
41
|
end
|
32
42
|
|
33
43
|
context "ERB support" do
|
data/spec/fixtures/redis.yml
CHANGED