kumo_keisei 3.0.4.pre.alpha2 → 3.0.4
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/VERSION +1 -1
- data/lib/kumo_keisei/environment_config.rb +2 -2
- data/spec/lib/kumo_keisei/environment_config_spec.rb +12 -19
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: faa37c9fa0f21e7428850a43e4deb25dd50e581d
|
|
4
|
+
data.tar.gz: d4d3a9d281e1d408f31856eb81501f3d189325c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a6f893e0c445e9c4d32b647f47cf024ef318aab7a1f2e7a66304fc3a7d42f9620851842afe0476868d7df42f97d3cc2ab36a240d5e36e96371d61a09cebd46ab
|
|
7
|
+
data.tar.gz: 2c8a5763701b37efff2bd509b5bc4e4d703845b298cbc517a36d156253efed91422df8127939c849c50f09ead95a44d7d87f5a0f156c29ff7e73d920d9e2ec4c
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.0.4
|
|
1
|
+
3.0.4
|
|
@@ -23,10 +23,10 @@ module KumoKeisei
|
|
|
23
23
|
if options[:config_path]
|
|
24
24
|
@config_file_loader = KumoKeisei::FileLoader.new(config_dir_path: options[:config_path])
|
|
25
25
|
elsif options[:config_dir_path]
|
|
26
|
-
warn "[DEPRECATION] `:config_dir_path` is deprecated, please pass in `:config_path` instead"
|
|
26
|
+
@log.warn "[DEPRECATION] `:config_dir_path` is deprecated, please pass in `:config_path` instead"
|
|
27
27
|
@config_file_loader = KumoKeisei::FileLoader.new(config_dir_path: options[:config_dir_path])
|
|
28
28
|
else
|
|
29
|
-
@log.
|
|
29
|
+
@log.fatal "Please provide a :config_path"
|
|
30
30
|
raise ConfigurationError.new("Please provide a :config_path")
|
|
31
31
|
end
|
|
32
32
|
|
|
@@ -6,7 +6,7 @@ describe KumoKeisei::EnvironmentConfig do
|
|
|
6
6
|
let(:options) do
|
|
7
7
|
{
|
|
8
8
|
env_name: env_name,
|
|
9
|
-
|
|
9
|
+
config_path: config_dir_path,
|
|
10
10
|
params_template_file_path: params_template_file_path
|
|
11
11
|
}
|
|
12
12
|
end
|
|
@@ -36,7 +36,9 @@ describe KumoKeisei::EnvironmentConfig do
|
|
|
36
36
|
end
|
|
37
37
|
it 'will be used without complaint' do
|
|
38
38
|
expect(KumoKeisei::FileLoader).to receive(:new).with(config_dir_path: config_dir_path).and_return(nil)
|
|
39
|
-
|
|
39
|
+
expect(logger).to receive(:warn).at_most(0).times
|
|
40
|
+
expect(logger).to receive(:fatal).at_most(0).times
|
|
41
|
+
described_class.new(options, logger)
|
|
40
42
|
end
|
|
41
43
|
end
|
|
42
44
|
|
|
@@ -48,20 +50,10 @@ describe KumoKeisei::EnvironmentConfig do
|
|
|
48
50
|
}
|
|
49
51
|
end
|
|
50
52
|
|
|
51
|
-
before do
|
|
52
|
-
@orig_stderr = $stderr
|
|
53
|
-
$stderr = StringIO.new
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
after do
|
|
57
|
-
$stderr = @orig_stderr
|
|
58
|
-
end
|
|
59
|
-
|
|
60
53
|
it 'will be used if given and raise a deprecation warning' do
|
|
61
54
|
expect(KumoKeisei::FileLoader).to receive(:new).with(config_dir_path: config_dir_path).and_return(nil)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
expect($stderr.string.chomp).to eq("[DEPRECATION] `:config_dir_path` is deprecated, please pass in `:config_path` instead")
|
|
55
|
+
expect(logger).to receive(:warn).with("[DEPRECATION] `:config_dir_path` is deprecated, please pass in `:config_path` instead")
|
|
56
|
+
described_class.new(options, logger)
|
|
65
57
|
end
|
|
66
58
|
end
|
|
67
59
|
|
|
@@ -73,7 +65,8 @@ describe KumoKeisei::EnvironmentConfig do
|
|
|
73
65
|
end
|
|
74
66
|
|
|
75
67
|
it 'will raise an error' do
|
|
76
|
-
expect
|
|
68
|
+
expect(logger).to receive(:fatal).with("Please provide a :config_path")
|
|
69
|
+
expect { described_class.new(options, logger)}.to raise_error(KumoKeisei::EnvironmentConfig::ConfigurationError)
|
|
77
70
|
end
|
|
78
71
|
end
|
|
79
72
|
end
|
|
@@ -96,7 +89,7 @@ describe KumoKeisei::EnvironmentConfig do
|
|
|
96
89
|
let(:options) do
|
|
97
90
|
{
|
|
98
91
|
env_name: env_name,
|
|
99
|
-
|
|
92
|
+
config_path: config_dir_path
|
|
100
93
|
}
|
|
101
94
|
end
|
|
102
95
|
|
|
@@ -136,7 +129,7 @@ describe KumoKeisei::EnvironmentConfig do
|
|
|
136
129
|
let(:options) do
|
|
137
130
|
{
|
|
138
131
|
env_name: env_name,
|
|
139
|
-
|
|
132
|
+
config_path: config_dir_path,
|
|
140
133
|
params_template_file_path: params_template_file_path,
|
|
141
134
|
injected_config: { "injected" => "yes" }
|
|
142
135
|
}
|
|
@@ -243,7 +236,7 @@ describe KumoKeisei::EnvironmentConfig do
|
|
|
243
236
|
expect(
|
|
244
237
|
described_class.new({
|
|
245
238
|
env_name: environment,
|
|
246
|
-
|
|
239
|
+
config_path: '',
|
|
247
240
|
params_template_file_path: ''}
|
|
248
241
|
).development?).to eq false
|
|
249
242
|
end
|
|
@@ -253,7 +246,7 @@ describe KumoKeisei::EnvironmentConfig do
|
|
|
253
246
|
expect(
|
|
254
247
|
described_class.new({
|
|
255
248
|
env_name: 'fred',
|
|
256
|
-
|
|
249
|
+
config_path: '',
|
|
257
250
|
params_template_file_path: ''}
|
|
258
251
|
).development?).to eq true
|
|
259
252
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kumo_keisei
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.4
|
|
4
|
+
version: 3.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Redbubble
|
|
@@ -130,9 +130,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
130
130
|
version: '0'
|
|
131
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
requirements:
|
|
133
|
-
- - "
|
|
133
|
+
- - ">="
|
|
134
134
|
- !ruby/object:Gem::Version
|
|
135
|
-
version:
|
|
135
|
+
version: '0'
|
|
136
136
|
requirements: []
|
|
137
137
|
rubyforge_project:
|
|
138
138
|
rubygems_version: 2.5.1
|