config_for 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc898ae1ac1904265206e188a2dc17f22ad46ab3
4
- data.tar.gz: 9cb5eb13f46f7fdcbb51d718c6d1c8e1bdf34b47
3
+ metadata.gz: 0140a146eebc3856380341e7b08fabbe9c778e54
4
+ data.tar.gz: bbb183467237d3654193569b17a3c5765c5a7d5b
5
5
  SHA512:
6
- metadata.gz: 0250747aafc96cd7debac2d674a3e668d832b40bb08f97e4cd4e2550a6b622eb6b9740bbc1a4b798a05735f463977a3885670653f661333f13d87ae1b3771682
7
- data.tar.gz: 7191805275b3302a4b267d6871a96f624ca8a8cd1a79e8e55dafc56f65274b8021f311d48d2ba622ced6f80381b9621139f9e36ffcaccdd7e57471930cf05af7
6
+ metadata.gz: d7e54d525bd1c4a6cfe8f14bf6365ab2ae101980352259b74fa9fe5e4b695df63d8af094df919e569ae6e28de2c03741681617887d5c61abea9672332c2bc715
7
+ data.tar.gz: 64564734a19fafaf3691322dd719ea94576fa79aa56b9669c368d8088d14d7aad774765b6023ce7eac2a1a2c01867faf8f0b37172bfa39c28ee524e96abf8c3b
data/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  ## master - unreleased
5
5
 
6
+ ## 0.1.2 - 2014-10-29
7
+
8
+ ### Changed
9
+ - Loading config for unknown env does not raise exception but returns an empty hash
10
+
6
11
  ## 0.1.1 - 2014-10-29
7
12
 
8
13
  ### Changed
data/lib/config_for.rb CHANGED
@@ -37,7 +37,7 @@ module ConfigFor
37
37
 
38
38
  if File.readable?(yaml)
39
39
  config = parse_yaml(yaml)
40
- ActiveSupport::HashWithIndifferentAccess.new(config).fetch(env)
40
+ ActiveSupport::HashWithIndifferentAccess.new(config).fetch(env) { Hash.new }
41
41
  else
42
42
  raise "Could not load configuration. Can't read #{yaml}"
43
43
  end
@@ -1,3 +1,3 @@
1
1
  module ConfigFor
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -28,4 +28,12 @@ RSpec.describe ConfigFor do
28
28
  it { is_expected.to_not be_empty }
29
29
  end
30
30
  end
31
+
32
+ context 'for unknown env' do
33
+ let(:env) { 'unknown' }
34
+
35
+ context 'database' do
36
+ it { is_expected.to be_empty }
37
+ end
38
+ end
31
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config_for
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Cichra