configoro 1.4.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZTIxN2E3Nzg4YmEzM2FmNmQ5YTRhNjgwMDQ4ZmU3YjM2OGI5YWM0Yw==
5
- data.tar.gz: !binary |-
6
- NmQ4MDZhY2ZiNGQ3ZWIzNWIyZGQ3N2Q2NzgxMjhlZjlhY2I5NzUyYQ==
2
+ SHA256:
3
+ metadata.gz: 37579640d17cade2d211b2b2dcc410ee8fb7d8c2fb15412452291fa996593288
4
+ data.tar.gz: 6762a81e9c94c8ffae02c8e5d56468da1aec086f6f50b8989f24ec56094076a7
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- M2E5Njg1YzEyNDA1ZTFkYjk5NmRiMzBhNDcyZWQ0MTlhYjNiMjlmYzBjZjU0
10
- ZTlhZWZmMTM3MTg2ODhhMTYyNjZmY2RhOTY4OTJkZmYwMGIyM2FlZDBlZDli
11
- OGVlY2UxZjRmMWRlNzAwNzAxZGJjMzMzNDdiNzVkNzI0OTllYTE=
12
- data.tar.gz: !binary |-
13
- NDg2OTU1YmI0ODcxYTFmMmU5Mjk0MjA5NjQyMjQyOTYzOWI2YTQwMjk5NjFi
14
- YzAyMTAwYTZiMzQwYjJmNWJmM2ZlZGE3MDQxZTViZDEyZmFkOTU2ZjA5MmRm
15
- NTgxN2YwNzgzOTM4YzQxMTgyNGNhYTJjNjk3OGFmY2ZlYWJkYTU=
6
+ metadata.gz: 4bbd10b9f951fca7bfde52c0f3b61bac825cdec675f302c22172e304894177771533382efd2516ec71edacaebfd451efd6adb4cb101cb9a8b66f45fdb681ad16
7
+ data.tar.gz: 97be38f588250a8c72dadb085c13f08503a98a987b3bae81e08185922aead297807a3d944f8760df8669bbde00134e65bcc10fdea40fe03767bcb2470845af9a
data/.rspec CHANGED
@@ -1 +1,2 @@
1
- -fs --color
1
+ --color
2
+ --format=documentation
@@ -1 +1 @@
1
- 1.9.3
1
+ 2.5.0
data/Gemfile CHANGED
@@ -7,6 +7,7 @@ group :development do
7
7
 
8
8
  # SPECS
9
9
  gem 'rspec'
10
+ gem 'rspec-its', require: 'rspec/its'
10
11
 
11
12
  # DOCS
12
13
  gem 'yard'
@@ -1,126 +1,164 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- actionmailer (4.0.0)
5
- actionpack (= 4.0.0)
6
- mail (~> 2.5.3)
7
- actionpack (4.0.0)
8
- activesupport (= 4.0.0)
9
- builder (~> 3.1.0)
10
- erubis (~> 2.7.0)
11
- rack (~> 1.5.2)
12
- rack-test (~> 0.6.2)
13
- activemodel (4.0.0)
14
- activesupport (= 4.0.0)
15
- builder (~> 3.1.0)
16
- activerecord (4.0.0)
17
- activemodel (= 4.0.0)
18
- activerecord-deprecated_finders (~> 1.0.2)
19
- activesupport (= 4.0.0)
20
- arel (~> 4.0.0)
21
- activerecord-deprecated_finders (1.0.3)
22
- activesupport (4.0.0)
23
- i18n (~> 0.6, >= 0.6.4)
24
- minitest (~> 4.2)
25
- multi_json (~> 1.3)
26
- thread_safe (~> 0.1)
27
- tzinfo (~> 0.3.37)
28
- addressable (2.3.5)
29
- arel (4.0.0)
30
- atomic (1.1.10)
31
- builder (3.1.4)
32
- diff-lcs (1.2.4)
33
- erubis (2.7.0)
34
- faraday (0.8.7)
35
- multipart-post (~> 1.1)
36
- git (1.2.5)
37
- github_api (0.10.1)
38
- addressable
39
- faraday (~> 0.8.1)
40
- hashie (>= 1.2)
41
- multi_json (~> 1.4)
42
- nokogiri (~> 1.5.2)
43
- oauth2
44
- hashie (2.0.5)
45
- highline (1.6.19)
46
- hike (1.2.3)
47
- httpauth (0.2.0)
48
- i18n (0.6.4)
49
- jeweler (1.8.6)
4
+ actioncable (5.1.4)
5
+ actionpack (= 5.1.4)
6
+ nio4r (~> 2.0)
7
+ websocket-driver (~> 0.6.1)
8
+ actionmailer (5.1.4)
9
+ actionpack (= 5.1.4)
10
+ actionview (= 5.1.4)
11
+ activejob (= 5.1.4)
12
+ mail (~> 2.5, >= 2.5.4)
13
+ rails-dom-testing (~> 2.0)
14
+ actionpack (5.1.4)
15
+ actionview (= 5.1.4)
16
+ activesupport (= 5.1.4)
17
+ rack (~> 2.0)
18
+ rack-test (>= 0.6.3)
19
+ rails-dom-testing (~> 2.0)
20
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
21
+ actionview (5.1.4)
22
+ activesupport (= 5.1.4)
23
+ builder (~> 3.1)
24
+ erubi (~> 1.4)
25
+ rails-dom-testing (~> 2.0)
26
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
27
+ activejob (5.1.4)
28
+ activesupport (= 5.1.4)
29
+ globalid (>= 0.3.6)
30
+ activemodel (5.1.4)
31
+ activesupport (= 5.1.4)
32
+ activerecord (5.1.4)
33
+ activemodel (= 5.1.4)
34
+ activesupport (= 5.1.4)
35
+ arel (~> 8.0)
36
+ activesupport (5.1.4)
37
+ concurrent-ruby (~> 1.0, >= 1.0.2)
38
+ i18n (~> 0.7)
39
+ minitest (~> 5.1)
40
+ tzinfo (~> 1.1)
41
+ addressable (2.4.0)
42
+ arel (8.0.0)
43
+ builder (3.2.3)
44
+ concurrent-ruby (1.0.5)
45
+ crass (1.0.3)
46
+ descendants_tracker (0.0.4)
47
+ thread_safe (~> 0.3, >= 0.3.1)
48
+ diff-lcs (1.3)
49
+ erubi (1.7.0)
50
+ faraday (0.9.2)
51
+ multipart-post (>= 1.2, < 3)
52
+ git (1.3.0)
53
+ github_api (0.16.0)
54
+ addressable (~> 2.4.0)
55
+ descendants_tracker (~> 0.0.4)
56
+ faraday (~> 0.8, < 0.10)
57
+ hashie (>= 3.4)
58
+ mime-types (>= 1.16, < 3.0)
59
+ oauth2 (~> 1.0)
60
+ globalid (0.4.1)
61
+ activesupport (>= 4.2.0)
62
+ hashie (3.5.7)
63
+ highline (1.7.10)
64
+ i18n (0.9.3)
65
+ concurrent-ruby (~> 1.0)
66
+ jeweler (2.3.9)
50
67
  builder
51
- bundler (~> 1.0)
68
+ bundler
52
69
  git (>= 1.2.5)
53
- github_api (= 0.10.1)
70
+ github_api (~> 0.16.0)
54
71
  highline (>= 1.6.15)
55
- nokogiri (= 1.5.10)
72
+ nokogiri (>= 1.5.10)
73
+ psych
56
74
  rake
57
75
  rdoc
58
- json (1.8.0)
59
- jwt (0.1.8)
60
- multi_json (>= 1.5)
61
- mail (2.5.4)
62
- mime-types (~> 1.16)
63
- treetop (~> 1.4.8)
64
- mime-types (1.23)
65
- minitest (4.7.5)
66
- multi_json (1.7.7)
67
- multi_xml (0.5.4)
68
- multipart-post (1.2.0)
69
- nokogiri (1.5.10)
70
- oauth2 (0.9.2)
71
- faraday (~> 0.8)
72
- httpauth (~> 0.2)
73
- jwt (~> 0.1.4)
74
- multi_json (~> 1.0)
76
+ semver2
77
+ jwt (1.5.6)
78
+ loofah (2.1.1)
79
+ crass (~> 1.0.2)
80
+ nokogiri (>= 1.5.9)
81
+ mail (2.7.0)
82
+ mini_mime (>= 0.1.1)
83
+ method_source (0.9.0)
84
+ mime-types (2.99.3)
85
+ mini_mime (1.0.0)
86
+ mini_portile2 (2.3.0)
87
+ minitest (5.11.3)
88
+ multi_json (1.13.1)
89
+ multi_xml (0.6.0)
90
+ multipart-post (2.0.0)
91
+ nio4r (2.2.0)
92
+ nokogiri (1.8.2)
93
+ mini_portile2 (~> 2.3.0)
94
+ oauth2 (1.4.0)
95
+ faraday (>= 0.8, < 0.13)
96
+ jwt (~> 1.0)
97
+ multi_json (~> 1.3)
75
98
  multi_xml (~> 0.5)
76
- rack (~> 1.2)
77
- polyglot (0.3.3)
78
- rack (1.5.2)
79
- rack-test (0.6.2)
80
- rack (>= 1.0)
81
- rails (4.0.0)
82
- actionmailer (= 4.0.0)
83
- actionpack (= 4.0.0)
84
- activerecord (= 4.0.0)
85
- activesupport (= 4.0.0)
86
- bundler (>= 1.3.0, < 2.0)
87
- railties (= 4.0.0)
88
- sprockets-rails (~> 2.0.0)
89
- railties (4.0.0)
90
- actionpack (= 4.0.0)
91
- activesupport (= 4.0.0)
99
+ rack (>= 1.2, < 3)
100
+ psych (3.0.2)
101
+ rack (2.0.4)
102
+ rack-test (0.8.2)
103
+ rack (>= 1.0, < 3)
104
+ rails (5.1.4)
105
+ actioncable (= 5.1.4)
106
+ actionmailer (= 5.1.4)
107
+ actionpack (= 5.1.4)
108
+ actionview (= 5.1.4)
109
+ activejob (= 5.1.4)
110
+ activemodel (= 5.1.4)
111
+ activerecord (= 5.1.4)
112
+ activesupport (= 5.1.4)
113
+ bundler (>= 1.3.0)
114
+ railties (= 5.1.4)
115
+ sprockets-rails (>= 2.0.0)
116
+ rails-dom-testing (2.0.3)
117
+ activesupport (>= 4.2.0)
118
+ nokogiri (>= 1.6)
119
+ rails-html-sanitizer (1.0.3)
120
+ loofah (~> 2.0)
121
+ railties (5.1.4)
122
+ actionpack (= 5.1.4)
123
+ activesupport (= 5.1.4)
124
+ method_source
92
125
  rake (>= 0.8.7)
93
126
  thor (>= 0.18.1, < 2.0)
94
- rake (10.1.0)
95
- rdoc (4.0.1)
96
- json (~> 1.4)
97
- redcarpet (2.3.0)
98
- rspec (2.14.0)
99
- rspec-core (~> 2.14.0)
100
- rspec-expectations (~> 2.14.0)
101
- rspec-mocks (~> 2.14.0)
102
- rspec-core (2.14.1)
103
- rspec-expectations (2.14.0)
104
- diff-lcs (>= 1.1.3, < 2.0)
105
- rspec-mocks (2.14.1)
106
- sprockets (2.10.0)
107
- hike (~> 1.2)
108
- multi_json (~> 1.0)
109
- rack (~> 1.0)
110
- tilt (~> 1.1, != 1.3.0)
111
- sprockets-rails (2.0.0)
112
- actionpack (>= 3.0)
113
- activesupport (>= 3.0)
114
- sprockets (~> 2.8)
115
- thor (0.18.1)
116
- thread_safe (0.1.0)
117
- atomic
118
- tilt (1.4.1)
119
- treetop (1.4.14)
120
- polyglot
121
- polyglot (>= 0.3.1)
122
- tzinfo (0.3.37)
123
- yard (0.8.6.2)
127
+ rake (12.3.0)
128
+ rdoc (6.0.1)
129
+ redcarpet (3.4.0)
130
+ rspec (3.7.0)
131
+ rspec-core (~> 3.7.0)
132
+ rspec-expectations (~> 3.7.0)
133
+ rspec-mocks (~> 3.7.0)
134
+ rspec-core (3.7.1)
135
+ rspec-support (~> 3.7.0)
136
+ rspec-expectations (3.7.0)
137
+ diff-lcs (>= 1.2.0, < 2.0)
138
+ rspec-support (~> 3.7.0)
139
+ rspec-its (1.2.0)
140
+ rspec-core (>= 3.0.0)
141
+ rspec-expectations (>= 3.0.0)
142
+ rspec-mocks (3.7.0)
143
+ diff-lcs (>= 1.2.0, < 2.0)
144
+ rspec-support (~> 3.7.0)
145
+ rspec-support (3.7.1)
146
+ semver2 (3.4.2)
147
+ sprockets (3.7.1)
148
+ concurrent-ruby (~> 1.0)
149
+ rack (> 1, < 3)
150
+ sprockets-rails (3.2.1)
151
+ actionpack (>= 4.0)
152
+ activesupport (>= 4.0)
153
+ sprockets (>= 3.0.0)
154
+ thor (0.20.0)
155
+ thread_safe (0.3.6)
156
+ tzinfo (1.2.5)
157
+ thread_safe (~> 0.1)
158
+ websocket-driver (0.6.5)
159
+ websocket-extensions (>= 0.1.0)
160
+ websocket-extensions (0.1.3)
161
+ yard (0.9.12)
124
162
 
125
163
  PLATFORMS
126
164
  ruby
@@ -132,4 +170,8 @@ DEPENDENCIES
132
170
  rails (>= 4.0)
133
171
  redcarpet
134
172
  rspec
173
+ rspec-its
135
174
  yard
175
+
176
+ BUNDLED WITH
177
+ 1.16.1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 1.4.1
@@ -2,18 +2,18 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: configoro 1.4.0 ruby lib
5
+ # stub: configoro 1.4.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
- s.name = "configoro"
9
- s.version = "1.4.0"
8
+ s.name = "configoro".freeze
9
+ s.version = "1.4.1"
10
10
 
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["Tim Morgan"]
14
- s.date = "2014-05-31"
15
- s.description = "Creates a YourApp::Configuration object whose methods are generated from environment-specific YAML files."
16
- s.email = "git@timothymorgan.info"
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["Tim Morgan".freeze]
14
+ s.date = "2018-02-07"
15
+ s.description = "Creates a YourApp::Configuration object whose methods are generated from environment-specific YAML files.".freeze
16
+ s.email = "git@timothymorgan.info".freeze
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE.txt",
19
19
  "README.md"
@@ -48,39 +48,42 @@ Gem::Specification.new do |s|
48
48
  "spec/data/other/development/basic.yml",
49
49
  "spec/spec_helper.rb"
50
50
  ]
51
- s.homepage = "http://github.com/RISCfuture/configoro"
52
- s.licenses = ["MIT"]
53
- s.rubygems_version = "2.2.2"
54
- s.summary = "Configuration object and YAML-based storage for Rails apps"
51
+ s.homepage = "http://github.com/RISCfuture/configoro".freeze
52
+ s.licenses = ["MIT".freeze]
53
+ s.rubygems_version = "2.7.5".freeze
54
+ s.summary = "Configuration object and YAML-based storage for Rails apps".freeze
55
55
 
56
56
  if s.respond_to? :specification_version then
57
57
  s.specification_version = 4
58
58
 
59
59
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
60
- s.add_runtime_dependency(%q<activesupport>, [">= 0"])
61
- s.add_development_dependency(%q<rails>, [">= 4.0"])
62
- s.add_development_dependency(%q<rspec>, [">= 0"])
63
- s.add_development_dependency(%q<yard>, [">= 0"])
64
- s.add_development_dependency(%q<redcarpet>, [">= 0"])
65
- s.add_development_dependency(%q<bundler>, [">= 0"])
66
- s.add_development_dependency(%q<jeweler>, [">= 0"])
60
+ s.add_runtime_dependency(%q<activesupport>.freeze, [">= 0"])
61
+ s.add_development_dependency(%q<rails>.freeze, [">= 4.0"])
62
+ s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
63
+ s.add_development_dependency(%q<rspec-its>.freeze, [">= 0"])
64
+ s.add_development_dependency(%q<yard>.freeze, [">= 0"])
65
+ s.add_development_dependency(%q<redcarpet>.freeze, [">= 0"])
66
+ s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
67
+ s.add_development_dependency(%q<jeweler>.freeze, [">= 0"])
67
68
  else
68
- s.add_dependency(%q<activesupport>, [">= 0"])
69
- s.add_dependency(%q<rails>, [">= 4.0"])
70
- s.add_dependency(%q<rspec>, [">= 0"])
71
- s.add_dependency(%q<yard>, [">= 0"])
72
- s.add_dependency(%q<redcarpet>, [">= 0"])
73
- s.add_dependency(%q<bundler>, [">= 0"])
74
- s.add_dependency(%q<jeweler>, [">= 0"])
69
+ s.add_dependency(%q<activesupport>.freeze, [">= 0"])
70
+ s.add_dependency(%q<rails>.freeze, [">= 4.0"])
71
+ s.add_dependency(%q<rspec>.freeze, [">= 0"])
72
+ s.add_dependency(%q<rspec-its>.freeze, [">= 0"])
73
+ s.add_dependency(%q<yard>.freeze, [">= 0"])
74
+ s.add_dependency(%q<redcarpet>.freeze, [">= 0"])
75
+ s.add_dependency(%q<bundler>.freeze, [">= 0"])
76
+ s.add_dependency(%q<jeweler>.freeze, [">= 0"])
75
77
  end
76
78
  else
77
- s.add_dependency(%q<activesupport>, [">= 0"])
78
- s.add_dependency(%q<rails>, [">= 4.0"])
79
- s.add_dependency(%q<rspec>, [">= 0"])
80
- s.add_dependency(%q<yard>, [">= 0"])
81
- s.add_dependency(%q<redcarpet>, [">= 0"])
82
- s.add_dependency(%q<bundler>, [">= 0"])
83
- s.add_dependency(%q<jeweler>, [">= 0"])
79
+ s.add_dependency(%q<activesupport>.freeze, [">= 0"])
80
+ s.add_dependency(%q<rails>.freeze, [">= 4.0"])
81
+ s.add_dependency(%q<rspec>.freeze, [">= 0"])
82
+ s.add_dependency(%q<rspec-its>.freeze, [">= 0"])
83
+ s.add_dependency(%q<yard>.freeze, [">= 0"])
84
+ s.add_dependency(%q<redcarpet>.freeze, [">= 0"])
85
+ s.add_dependency(%q<bundler>.freeze, [">= 0"])
86
+ s.add_dependency(%q<jeweler>.freeze, [">= 0"])
84
87
  end
85
88
  end
86
89
 
@@ -5,9 +5,6 @@ end
5
5
  require 'erb'
6
6
  require 'yaml'
7
7
 
8
- require 'bundler'
9
- Bundler.setup
10
-
11
8
  require 'active_support/hash_with_indifferent_access'
12
9
  require 'active_support/core_ext/hash/deep_merge'
13
10
 
@@ -5,23 +5,23 @@ describe Configoro::Hash do
5
5
 
6
6
  context "[getters]" do
7
7
  it "should allow access by symbol" do
8
- subject[:string].should eql('value')
8
+ expect(subject[:string]).to eql('value')
9
9
  end
10
10
 
11
11
  it "should allow access by string" do
12
- subject['fixnum'].should eql(123)
12
+ expect(subject['fixnum']).to eql(123)
13
13
  end
14
14
 
15
15
  it "should allow access by method" do
16
- subject.array.should eql([ 1, 2, 3 ])
17
- subject.array.should eql([ 1, 2, 3 ])
16
+ expect(subject.array).to eql([ 1, 2, 3 ])
17
+ expect(subject.array).to eql([ 1, 2, 3 ])
18
18
  end
19
19
 
20
20
  it "should allow access by predicate method" do
21
- subject.string?.should eql(true)
22
- subject.string?.should eql(true)
23
- subject.nilval?.should eql(false)
24
- subject.nilval?.should eql(false)
21
+ expect(subject.string?).to eql(true)
22
+ expect(subject.string?).to eql(true)
23
+ expect(subject.nilval?).to eql(false)
24
+ expect(subject.nilval?).to eql(false)
25
25
  end
26
26
 
27
27
  # We try the above methods twice: Once for creating the method, the other
@@ -30,39 +30,39 @@ describe Configoro::Hash do
30
30
 
31
31
  context "[accessor methods]" do
32
32
  it "should define an accessor method upon first access" do
33
- subject.methods.should_not include(:string)
34
- subject.methods.should_not include(:string?)
33
+ expect(subject.methods).not_to include(:string)
34
+ expect(subject.methods).not_to include(:string?)
35
35
  subject.string
36
- subject.methods.should include(:string)
37
- subject.methods.should include(:string?)
36
+ expect(subject.methods).to include(:string)
37
+ expect(subject.methods).to include(:string?)
38
38
  end
39
39
 
40
40
  it "should remove the accessor method if the key is removed from the hash" do
41
41
  subject.string
42
- subject.methods.should include(:string)
43
- subject.methods.should include(:string?)
42
+ expect(subject.methods).to include(:string)
43
+ expect(subject.methods).to include(:string?)
44
44
  subject.delete 'string'
45
- proc { subject.string }.should raise_error(NameError)
46
- subject.methods.should_not include(:string)
47
- subject.methods.should_not include(:string?)
45
+ expect { subject.string }.to raise_error(NameError)
46
+ expect(subject.methods).not_to include(:string)
47
+ expect(subject.methods).not_to include(:string?)
48
48
  end
49
49
 
50
50
  it "should not override existing methods" do
51
51
  subject['inspect'] = 'wrong!'
52
- subject.inspect.should_not eql('wrong!')
53
- subject.methods.should_not include(:inspect?)
52
+ expect(subject.inspect).not_to eql('wrong!')
53
+ expect(subject.methods).not_to include(:inspect?)
54
54
  end
55
55
  end
56
56
 
57
57
  describe "#include?" do
58
58
  it "should accept symbols" do
59
- subject.should include(:string)
60
- subject.should_not include(:string2)
59
+ expect(subject).to include(:string)
60
+ expect(subject).not_to include(:string2)
61
61
  end
62
62
 
63
63
  it "should accept strings" do
64
- subject.should include('fixnum')
65
- subject.should_not include('fixnum2')
64
+ expect(subject).to include('fixnum')
65
+ expect(subject).not_to include('fixnum2')
66
66
  end
67
67
  end
68
68
 
@@ -73,32 +73,32 @@ describe Configoro::Hash do
73
73
  subject << { :a => 'b', :b => { :c => 'd' } }
74
74
  subject << { :a => 'b', :b => { :d => 'e' } }
75
75
 
76
- subject.a.should eql('b')
77
- subject.b.c.should eql('d')
78
- subject.b.d.should eql('e')
76
+ expect(subject.a).to eql('b')
77
+ expect(subject.b.c).to eql('d')
78
+ expect(subject.b.d).to eql('e')
79
79
  end
80
80
 
81
81
  it "should load a YAML file and deep-merge its entries" do
82
82
  subject << "#{File.dirname __FILE__}/../data/config/environments/common/hash_test.yml"
83
83
  subject << "#{File.dirname __FILE__}/../data/config/environments/development/hash_test.yml"
84
84
 
85
- subject.hash_test.akey.should eql('value')
86
- subject.hash_test.subhash.key1.should eql('val1')
87
- subject.hash_test.subhash.key2.should eql('newval')
85
+ expect(subject.hash_test.akey).to eql('value')
86
+ expect(subject.hash_test.subhash.key1).to eql('val1')
87
+ expect(subject.hash_test.subhash.key2).to eql('newval')
88
88
  end
89
89
 
90
90
  it "should raise an error if the file is not a YAML file" do
91
- lambda { subject << "example.txt" }.should raise_error(ArgumentError)
91
+ expect { subject << "example.txt" }.to raise_error(ArgumentError)
92
92
  end
93
93
 
94
94
  it "should not change the receiver if the file doesn't exist" do
95
95
  subject << "example.yml"
96
- subject.should be_empty
96
+ expect(subject).to be_empty
97
97
  end
98
98
 
99
99
  it "should preprocess YAML file as ERB" do
100
100
  subject << "#{File.dirname __FILE__}/../data/config/environments/common/erb_test.yml"
101
- subject.erb_test.sum.should == 2
101
+ expect(subject.erb_test.sum_test).to eql(2)
102
102
  end
103
103
  end
104
104
 
@@ -108,15 +108,15 @@ describe Configoro::Hash do
108
108
  it "should merge in keys and values" do
109
109
  subject['a'] = 'old'
110
110
  subject.deep_merge! :a => 'new'
111
- subject.a.should eql('new')
111
+ expect(subject.a).to eql('new')
112
112
  end
113
113
 
114
114
  it "should deep-merge sub-hashes and convert them to Configoro::Hashes" do
115
115
  subject['hsh'] = { 'key1' => 'val1', 'key2' => 'val2' }
116
116
  subject.deep_merge! :hsh => { 'key2' => 'newval' }
117
117
 
118
- subject.hsh.key1.should eql('val1')
119
- subject.hsh.key2.should eql('newval')
118
+ expect(subject.hsh.key1).to eql('val1')
119
+ expect(subject.hsh.key2).to eql('newval')
120
120
  end
121
121
  end
122
122
 
@@ -7,51 +7,51 @@ describe Configoro do
7
7
 
8
8
  describe "#initialize" do
9
9
  it "should make the configuration available to MyApp::Configuration" do
10
- subject.should be_kind_of(Configoro::Hash)
10
+ expect(subject).to be_kind_of(Configoro::Hash)
11
11
  end
12
12
 
13
13
  it "should load data from the config files" do
14
- subject.basic.common_only.should eql('common')
14
+ expect(subject.basic.common_only).to eql('common')
15
15
  end
16
16
 
17
17
  it "should give priority to environment-specific files" do
18
- subject.basic.env_name.should eql('development')
18
+ expect(subject.basic.env_name).to eql('development')
19
19
  end
20
20
 
21
21
  it "should not load data from other environments" do
22
- subject.basic['should_not_exist'].should be_nil
22
+ expect(subject.basic['should_not_exist']).to be_nil
23
23
  end
24
24
 
25
25
  it "should convert hashes recursively" do
26
- subject.hash_test.akey.should eql('value')
26
+ expect(subject.hash_test.akey).to eql('value')
27
27
  end
28
28
 
29
29
  it "should deep-merge hashes" do
30
- subject.hash_test.subhash.key1.should eql('val1')
31
- subject.hash_test.subhash.key2.should eql('newval')
30
+ expect(subject.hash_test.subhash.key1).to eql('val1')
31
+ expect(subject.hash_test.subhash.key2).to eql('newval')
32
32
  end
33
33
 
34
34
  it "should not complain when there is no directory for the current environment" do
35
- Rails.stub!(:env).and_return('unknown')
35
+ allow(Rails).to receive(:env).and_return('unknown')
36
36
  Configoro.initialize
37
- MyApp::Configuration.should eql({"basic"=>{"common_only"=>"common", "env_name"=>"common"}, "erb_test" => {"sum" => 2}, "hash_test"=>{"akey"=>"value", "subhash"=>{"key1"=>"val1", "key2"=>"val2"}}})
37
+ expect(MyApp::Configuration).to eql({"basic"=>{"common_only"=>"common", "env_name"=>"common"}, "erb_test" => {"sum_test" => 2}, "hash_test"=>{"akey"=>"value", "subhash"=>{"key1"=>"val1", "key2"=>"val2"}}})
38
38
  end
39
39
 
40
40
  context "[custom search paths]" do
41
41
  before(:each) { Configoro.instance_variable_set :@paths, nil }
42
42
 
43
43
  it "should use common configuration under a custom search path" do
44
- Rails.stub!(:env).and_return('unknown')
44
+ allow(Rails).to receive(:env).and_return('unknown')
45
45
  Configoro.paths << File.join(File.dirname(__FILE__), 'data', 'other')
46
46
  Configoro.initialize
47
- MyApp::Configuration.basic.env_name.should eql('other_common')
47
+ expect(MyApp::Configuration.basic.env_name).to eql('other_common')
48
48
  end
49
49
 
50
50
  it "should use environment-specific configuration under a custom search path" do
51
- Rails.stub!(:env).and_return('development')
51
+ allow(Rails).to receive(:env).and_return('development')
52
52
  Configoro.paths << File.join(File.dirname(__FILE__), 'data', 'other')
53
53
  Configoro.initialize
54
- MyApp::Configuration.basic.env_name.should eql('other_development')
54
+ expect(MyApp::Configuration.basic.env_name).to eql('other_development')
55
55
  end
56
56
  end
57
57
  end
@@ -1,2 +1,2 @@
1
1
  ---
2
- sum: <%= 1 + 1 %>
2
+ sum_test: <%= 1 + 1 %>
@@ -15,8 +15,8 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
15
15
 
16
16
  RSpec.configure do |config|
17
17
  config.before :each do
18
- application = mock('Rails.application', :class => 'MyApp::Application')
19
- ::Rails = mock('Rails', :application => application, :env => 'development', :root => File.join(File.dirname(__FILE__), 'data'))
18
+ application = double('Rails.application', :class => 'MyApp::Application')
19
+ ::Rails = double('Rails', :application => application, :env => 'development', :root => File.join(File.dirname(__FILE__), 'data'))
20
20
  Configoro.initialize
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,111 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configoro
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-31 00:00:00.000000000 Z
11
+ date: 2018-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '4.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '4.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ! '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec-its
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: yard
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - ! '>='
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
75
  version: '0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - ! '>='
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: redcarpet
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
- - - ! '>='
87
+ - - ">="
74
88
  - !ruby/object:Gem::Version
75
89
  version: '0'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
- - - ! '>='
94
+ - - ">="
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: bundler
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - ! '>='
101
+ - - ">="
88
102
  - !ruby/object:Gem::Version
89
103
  version: '0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - ! '>='
108
+ - - ">="
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: jeweler
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
- - - ! '>='
115
+ - - ">="
102
116
  - !ruby/object:Gem::Version
103
117
  version: '0'
104
118
  type: :development
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
107
121
  requirements:
108
- - - ! '>='
122
+ - - ">="
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0'
111
125
  description: Creates a YourApp::Configuration object whose methods are generated from
@@ -117,10 +131,10 @@ extra_rdoc_files:
117
131
  - LICENSE.txt
118
132
  - README.md
119
133
  files:
120
- - .document
121
- - .rspec
122
- - .ruby-gemset
123
- - .ruby-version
134
+ - ".document"
135
+ - ".rspec"
136
+ - ".ruby-gemset"
137
+ - ".ruby-version"
124
138
  - Gemfile
125
139
  - Gemfile.lock
126
140
  - LICENSE.txt
@@ -155,17 +169,17 @@ require_paths:
155
169
  - lib
156
170
  required_ruby_version: !ruby/object:Gem::Requirement
157
171
  requirements:
158
- - - ! '>='
172
+ - - ">="
159
173
  - !ruby/object:Gem::Version
160
174
  version: '0'
161
175
  required_rubygems_version: !ruby/object:Gem::Requirement
162
176
  requirements:
163
- - - ! '>='
177
+ - - ">="
164
178
  - !ruby/object:Gem::Version
165
179
  version: '0'
166
180
  requirements: []
167
181
  rubyforge_project:
168
- rubygems_version: 2.2.2
182
+ rubygems_version: 2.7.5
169
183
  signing_key:
170
184
  specification_version: 4
171
185
  summary: Configuration object and YAML-based storage for Rails apps