config_reader 2.0.0 → 2.0.1

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
- SHA1:
3
- metadata.gz: c70acd1692b08bdedb8f5f0ed7647cdbecda42d7
4
- data.tar.gz: 852b2bddd711ab21984d0049701e38e83295d3f8
2
+ SHA256:
3
+ metadata.gz: 293f77efe1f96f50dd209d5eb2616ed29888d200f10d1efb52ef547e95cc0055
4
+ data.tar.gz: 6aff83748853778695ba42e8c87ed27c2b4a22aaaa6813ff6e553fa3528e0719
5
5
  SHA512:
6
- metadata.gz: 81654334867c8598084c0b66bdbd27abf9af5c4970c049b5b898da732509e1badb07fbebb53721422ce04caacecaa61ebb478b834327390138ab691d6a1c7f1a
7
- data.tar.gz: 1cdb20047b97d4162bc966f2afa7e1235fe80198671bf0509da480ad33da712e50fc1db8a3c5d4f2d20924cbe15af53ba22335d01360a1091c8f6a46e3b2f844
6
+ metadata.gz: eae9857ff8a8c1334f628604e08efaca93633b97183cdcae52fff8664ab3de9c50ea9854b504f8a1cb14e3ff7a457b6857c66373c121458a588a706b1bebbc00
7
+ data.tar.gz: 7c712ea091fa301ef77037163f4490a8ccad1a9d5ad425b7c6e9a4aa23b7b6f0a4b416fdaf8900f6d7f6206f107a3f448a07db68c28f7fb8589ac3a7b080024c
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - '1.9.3'
4
- - '2.0.0'
5
- - '2.1.1'
3
+ - "2.3.8"
4
+ - "2.4.5"
5
+ - "2.5.3"
6
+ - "2.6.1"
@@ -0,0 +1,59 @@
1
+ ### 2.0.1 2010-03-19
2
+
3
+ - update dependencies
4
+
5
+ ### 1.0.5 2018-02-01
6
+
7
+ - pass ignore_missing_keys to nested hashes during conversion
8
+
9
+ ### 1.0.4 2018-02-01
10
+
11
+ - add a config option for Key Error behavior
12
+
13
+ ### 1.0.3 2017-06-20
14
+
15
+ - add the deep_merge gem so all keys don't need to be duplicated across env sections
16
+
17
+ ### 0.0.9 2012-02-03
18
+
19
+ - Stop abusing Hash, it's not nice
20
+ - convert all keys to symbols internally
21
+ - move to a bundler style gem
22
+
23
+ ### 0.0.8 2011-05-12
24
+
25
+ - Silence RAILS_ENV deprecation, thanks jeanmartin
26
+
27
+ ### 0.0.7 2010-02-14
28
+
29
+ - moved to jeweler
30
+ - removed the annoying post install message
31
+ - updated specs
32
+
33
+ ### 0.0.6 2009-04-02
34
+
35
+ - handle keys as ['foo'], [:foo] and .foo for real this time
36
+ - return nil on non-existent key instead of error
37
+
38
+ ### 0.0.5 2009-01-29
39
+
40
+ - handle keys as ['foo'], [:foo] and .foo
41
+ - return nil on non-existent key instead of error
42
+
43
+ ### 0.0.4 2008-12-08
44
+
45
+ - fix the environment merging issue, for real this time
46
+
47
+ ### 0.0.3 2008-12-02
48
+
49
+ - fix the environment merging issue
50
+
51
+ ### 0.0.2 2008-09-10
52
+
53
+ - have find_config return the file if it exists instead of looking in . and
54
+ ./config
55
+
56
+ ### 0.0.1 2008-08-06
57
+
58
+ - 1 major enhancement:
59
+ - Initial release
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- config_reader (2.0.0)
4
+ config_reader (2.0.1)
5
5
  deep_merge
6
6
 
7
7
  GEM
@@ -9,32 +9,43 @@ GEM
9
9
  specs:
10
10
  arrayfields (4.9.2)
11
11
  chronic (0.10.2)
12
- coderay (1.1.0)
12
+ coderay (1.1.2)
13
13
  coerce (0.0.8)
14
14
  chronic (>= 0.6.2)
15
- deep_merge (1.1.1)
16
- fattr (2.3.0)
15
+ deep_merge (1.2.1)
16
+ diff-lcs (1.3)
17
+ fattr (2.4.0)
17
18
  highline (1.7.10)
18
- main (6.2.2)
19
+ main (6.2.3)
19
20
  arrayfields (~> 4.7, >= 4.7.4)
20
21
  chronic (~> 0.6, >= 0.6.2)
21
22
  fattr (~> 2.2, >= 2.2.0)
22
23
  map (~> 6.1, >= 6.1.0)
23
24
  map (6.6.0)
24
- method_source (0.8.2)
25
- pry (0.9.12.6)
26
- coderay (~> 1.0)
27
- method_source (~> 0.8)
28
- slop (~> 3.4)
29
- rake (0.9.2.2)
30
- rspec (1.3.2)
31
- sekrets (1.10.0)
25
+ method_source (0.9.2)
26
+ pry (0.12.2)
27
+ coderay (~> 1.1.0)
28
+ method_source (~> 0.9.0)
29
+ rake (13.0.1)
30
+ rspec (3.9.0)
31
+ rspec-core (~> 3.9.0)
32
+ rspec-expectations (~> 3.9.0)
33
+ rspec-mocks (~> 3.9.0)
34
+ rspec-core (3.9.1)
35
+ rspec-support (~> 3.9.1)
36
+ rspec-expectations (3.9.1)
37
+ diff-lcs (>= 1.2.0, < 2.0)
38
+ rspec-support (~> 3.9.0)
39
+ rspec-mocks (3.9.1)
40
+ diff-lcs (>= 1.2.0, < 2.0)
41
+ rspec-support (~> 3.9.0)
42
+ rspec-support (3.9.2)
43
+ sekrets (1.13.0)
32
44
  coerce (~> 0.0.3)
33
45
  fattr (~> 2.2)
34
46
  highline (~> 1.6)
35
47
  main (~> 6.1)
36
48
  map (~> 6.3)
37
- slop (3.5.0)
38
49
 
39
50
  PLATFORMS
40
51
  ruby
@@ -43,8 +54,8 @@ DEPENDENCIES
43
54
  config_reader!
44
55
  pry
45
56
  rake
46
- rspec (= 1.3.2)
57
+ rspec (~> 3.9)
47
58
  sekrets (~> 1)
48
59
 
49
60
  BUNDLED WITH
50
- 1.16.1
61
+ 1.17.2
data/Rakefile CHANGED
@@ -1,9 +1,3 @@
1
1
  require 'bundler/gem_tasks'
2
2
 
3
- require 'spec/rake/spectask'
4
- Spec::Rake::SpecTask.new(:spec) do |spec|
5
- spec.libs << 'lib' << 'spec'
6
- spec.spec_files = FileList['spec/**/*_spec.rb']
7
- end
8
-
9
3
  task :default => :spec
@@ -11,8 +11,6 @@ Gem::Specification.new do |s|
11
11
  s.summary = %q{Provides a way to manage environment specific configuration settings.}
12
12
  s.description = %q{Provides a way to manage environment specific configuration settings.}
13
13
 
14
- s.rubyforge_project = 'config_reader'
15
-
16
14
  s.files = `git ls-files`.split("\n")
17
15
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
16
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -22,7 +20,7 @@ Gem::Specification.new do |s|
22
20
  s.add_dependency 'deep_merge'
23
21
 
24
22
  s.add_development_dependency 'rake'
25
- s.add_development_dependency 'rspec', '1.3.2'
23
+ s.add_development_dependency 'rspec', '~> 3.9'
26
24
  s.add_development_dependency 'sekrets', '~> 1'
27
25
  s.add_development_dependency 'pry'
28
26
 
@@ -1,3 +1,3 @@
1
1
  class ConfigReader
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -6,13 +6,13 @@ describe "ConfigReader" do
6
6
  it "should fail with []=" do
7
7
  expect {
8
8
  TestConfig[:app_name] = 'test_app'
9
- }.to raise_error
9
+ }.to raise_error(ArgumentError)
10
10
  end
11
11
 
12
12
  it "should fail with #key =" do
13
13
  expect {
14
14
  TestConfig.app_name = 'test_app'
15
- }.to raise_error
15
+ }.to raise_error(ArgumentError)
16
16
  end
17
17
  end
18
18
 
@@ -70,39 +70,39 @@ describe "ConfigReader" do
70
70
 
71
71
  describe "parsing a YAML file" do
72
72
  it "should find values with method_missing" do
73
- TestConfig.app_name.should == 'test_app'
73
+ expect(TestConfig.app_name).to eq('test_app')
74
74
  end
75
75
 
76
76
  it "should find values using [] and a string" do
77
- TestConfig['app_name'].should == 'test_app'
77
+ expect(TestConfig['app_name']).to eq('test_app')
78
78
  end
79
79
 
80
80
  it "should find values using [] and a symbol" do
81
- TestConfig[:app_name].should == 'test_app'
81
+ expect(TestConfig[:app_name]).to eq('test_app')
82
82
  end
83
83
 
84
84
  it "should find nested values using method_missing" do
85
- TestConfig.nested_key.value.should == 'test'
85
+ expect(TestConfig.nested_key.value).to eq('test')
86
86
  end
87
87
 
88
88
  it "should find nested values using [] and a symbol" do
89
- TestConfig[:nested_key][:value].should == 'test'
89
+ expect(TestConfig[:nested_key][:value]).to eq('test')
90
90
  end
91
91
 
92
92
  it "should find nested values using [] and a string" do
93
- TestConfig['nested_key']['value'].should == 'test'
93
+ expect(TestConfig['nested_key']['value']).to eq('test')
94
94
  end
95
95
 
96
96
  it "should not find sekrets only nested values using method_missing" do
97
- lambda { TestConfig.sekrets_only }.should raise_error
97
+ expect { TestConfig.sekrets_only }.to raise_error(KeyError)
98
98
  end
99
99
 
100
100
  it "should not find sekrets only nested values using [] and a symbol" do
101
- lambda { TestConfig[:sekrets_only][:value] }.should raise_error
101
+ expect { TestConfig[:sekrets_only][:value] }.to raise_error(KeyError)
102
102
  end
103
103
 
104
104
  it "should not find sekrets only nested values using [] and a string" do
105
- lambda { TestConfig['sekrets_only']['value'] }.should raise_error
105
+ expect { TestConfig['sekrets_only']['value'] }.to raise_error(KeyError)
106
106
  end
107
107
 
108
108
  end
@@ -110,43 +110,43 @@ describe "ConfigReader" do
110
110
  context 'using sekrets' do
111
111
  describe "parsing a YAML file" do
112
112
  it "should find values with method_missing" do
113
- SekretsConfig.app_name.should == 'test_app_sekret'
113
+ expect(SekretsConfig.app_name).to eq('test_app_sekret')
114
114
  end
115
115
 
116
116
  it "should find values using [] and a string" do
117
- SekretsConfig['app_name'].should == 'test_app_sekret'
117
+ expect(SekretsConfig['app_name']).to eq('test_app_sekret')
118
118
  end
119
119
 
120
120
  it "should find values using [] and a symbol" do
121
- SekretsConfig[:app_name].should == 'test_app_sekret'
121
+ expect(SekretsConfig[:app_name]).to eq('test_app_sekret')
122
122
  end
123
123
 
124
124
  it "should find nested values using method_missing" do
125
- SekretsConfig.nested_key.value.should == 'test_sekret'
125
+ expect(SekretsConfig.nested_key.value).to eq('test_sekret')
126
126
  end
127
127
 
128
128
  it "should find nested values using [] and a symbol" do
129
- SekretsConfig[:nested_key][:value].should == 'test_sekret'
129
+ expect(SekretsConfig[:nested_key][:value]).to eq('test_sekret')
130
130
  end
131
131
 
132
132
  it "should find nested values using [] and a string" do
133
- SekretsConfig['nested_key']['value'].should == 'test_sekret'
133
+ expect(SekretsConfig['nested_key']['value']).to eq('test_sekret')
134
134
  end
135
135
 
136
136
  it "should find sekrets only nested values using method_missing" do
137
- SekretsConfig.nested_key.value.should == 'test_sekret'
137
+ expect(SekretsConfig.nested_key.value).to eq('test_sekret')
138
138
  end
139
139
 
140
140
  it "should find sekrets only nested values using [] and a symbol" do
141
- SekretsConfig[:nested_key][:value].should == 'test_sekret'
141
+ expect(SekretsConfig[:nested_key][:value]).to eq('test_sekret')
142
142
  end
143
143
 
144
144
  it "should find sekrets only nested values using [] and a string" do
145
- SekretsConfig['nested_key']['value'].should == 'test_sekret'
145
+ expect(SekretsConfig['nested_key']['value']).to eq('test_sekret')
146
146
  end
147
147
 
148
148
  it "shouldn't need to have all keys duplicated in the environment section" do
149
- SekretsConfig.nested_key.only_in_test_env.should == true
149
+ expect(SekretsConfig.nested_key.only_in_test_env).to be true
150
150
  end
151
151
  end
152
152
  end
@@ -1,6 +1,6 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__))
2
2
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
- require 'spec'
3
+
4
4
  require 'config_reader'
5
5
  require 'test_config'
6
6
  require 'sekrets_config'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config_reader
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Moen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-03 00:00:00.000000000 Z
11
+ date: 2020-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '='
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.3.2
47
+ version: '3.9'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '='
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.3.2
54
+ version: '3.9'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sekrets
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -89,9 +89,9 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".gitignore"
91
91
  - ".travis.yml"
92
+ - CHANGELOG.md
92
93
  - Gemfile
93
94
  - Gemfile.lock
94
- - History.rdoc
95
95
  - License.txt
96
96
  - README.rdoc
97
97
  - Rakefile
@@ -125,8 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
- rubyforge_project: config_reader
129
- rubygems_version: 2.6.13
128
+ rubygems_version: 3.0.3
130
129
  signing_key:
131
130
  specification_version: 4
132
131
  summary: Provides a way to manage environment specific configuration settings.
@@ -1,44 +0,0 @@
1
- == 1.0.5 2018-02-01
2
- * pass ignore_missing_keys to nested hashes during conversion
3
-
4
- == 1.0.4 2018-02-01
5
- * add a config option for Key Error behavior
6
-
7
- == 1.0.3 2017-06-20
8
- * add the deep_merge gem so all keys don't need to be duplicated across env sections
9
-
10
- == 0.0.9 2012-02-03
11
- * Stop abusing Hash, it's not nice
12
- * convert all keys to symbols internally
13
- * move to a bundler style gem
14
-
15
- == 0.0.8 2011-05-12
16
- * Silence RAILS_ENV deprecation, thanks jeanmartin
17
-
18
- == 0.0.7 2010-02-14
19
- * moved to jeweler
20
- * removed the annoying post install message
21
- * updated specs
22
-
23
- == 0.0.6 2009-04-02
24
- * handle keys as ['foo'], [:foo] and .foo for real this time
25
- * return nil on non-existent key instead of error
26
-
27
- == 0.0.5 2009-01-29
28
- * handle keys as ['foo'], [:foo] and .foo
29
- * return nil on non-existent key instead of error
30
-
31
- == 0.0.4 2008-12-08
32
- * fix the environment merging issue, for real this time
33
-
34
- == 0.0.3 2008-12-02
35
- * fix the environment merging issue
36
-
37
- == 0.0.2 2008-09-10
38
- * have find_config return the file if it exists instead of looking in . and
39
- ./config
40
-
41
- == 0.0.1 2008-08-06
42
-
43
- * 1 major enhancement:
44
- * Initial release