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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37a54051f2c3e78f2e00d2dcdbc8450b8724c14e
4
- data.tar.gz: 334f91afdccd24f82a66895aa2876bf911f83b25
3
+ metadata.gz: e4a329fcc6afa215c3d37b8b13650816478630de
4
+ data.tar.gz: 9a803531e3edb61264e04f7644bffa857e058c3f
5
5
  SHA512:
6
- metadata.gz: 5a50a18e368ca181999c1a52c3305485f86f1db287f2aa55394b32c3c4070f6c5f5794ef549e2e303af6bd07ca24d4370d385dbc8fd70009d0439a6b1ef0df79
7
- data.tar.gz: 884fc56924af3dd73d9afc3c5a3a2c0a7eab17befc0c5a5cf71f395b13234e246dd3811d8f05e7b3ae952633cd07129869b4761716416b5cd77a99cb38621e9f
6
+ metadata.gz: fb3cd6ee2017cf3d55a94168a0a7205b6e0e7745a329bfeafa188c4c201828bbdca0af238c3df6d312792ba840434453bd4c0d2e82135c47b9bce9469a0012a6
7
+ data.tar.gz: db95eb21e75fdafa4038e09c5c7f3a08bb710a6279381b3e8f2eafd111765be7ca2b18d8a101c43368a9d18a452a6cd97e2d37cd6806ba1208989d8bebe146b4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.9.1 - 2014-10-24
2
+
3
+ * Fix issue #6. Rescue error raised in method missing
4
+
1
5
  ## 0.9.0 - 2014-10-23
2
6
 
3
7
  * Support to ERB inside yaml config file (#2)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module EasyConfig
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
@@ -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
@@ -1,6 +1,9 @@
1
+ default: &default
2
+ port: 4567
3
+
1
4
  development:
5
+ <<: *default
2
6
  host: 'localhost'
3
- port: 4567
4
7
  password: <%= ENV['redis_password'] %>
5
8
 
6
9
  production:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_config
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Oliveira