config 1.7.0 → 1.7.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
2
  SHA256:
3
- metadata.gz: b706fa8c599dff6bd37f9faf7ef9846cdfa712f0b4bd97b2164e9b481277647b
4
- data.tar.gz: 9b4345f38ef41b3c1ad466eabeb57ec506eb8f1386bef5ec50d094f4fe74006a
3
+ metadata.gz: 05ec20932e5311696e9bae343bc24d55ee1b0f818f86b1d5f0b1efabeac2a899
4
+ data.tar.gz: 5e32995fde87da7a845c96332a996a6a2ae2e4e8f6b133ec21f15549ef96ae78
5
5
  SHA512:
6
- metadata.gz: 0a049ea2053deecc4929019a6e1bc059f2907f222515b1e7f51063b5ab59f42e3fefa4238ba04c97cd2cafc7aeb4e26a4d7e9b25cad5f63d6cdabd33316ec011
7
- data.tar.gz: 70288ae9514f87bd3ed855292a4cf6a525eff7a23ae7bb585c7b785c585683cceec79f5751516739758b05ecf5673ec615461d8a13b5cddff97ef326309616fc
6
+ metadata.gz: 24ddab2768eea5131fd798253b1ad3c4bc387cf4b7c2cafa15b91bad29cdf814eefac87874a2b3c49b31e07a5781a75c00d4809dea607adb44a2b7fafbaf176d
7
+ data.tar.gz: b31afd2be15bd2ff2e8d9119516044e930323dded2680c23f7d16028495489d4daa7235d4f0f7de9e77311e05594bc222a001503ff9cf868a4fff3b4abe04e39
@@ -4,15 +4,28 @@
4
4
 
5
5
  ...
6
6
 
7
+ ## 1.7.1
8
+
9
+ ### New features
10
+
11
+ * Upgrade dependencies ([#211](https://github.com/railsconfig/config/pull/211))
12
+
13
+ ### Changes
14
+
15
+ * Add Ruby 2.5 and Rails 5.1 to the testing matrix on Travis ([#201](https://github.com/railsconfig/config/pull/201))
16
+ * Add Ruby 2.6 tto the test matrix ([#210](https://github.com/railsconfig/config/pull/210))
17
+ * Add Rails 5.2 to the test matrix ([#212](https://github.com/railsconfig/config/pull/212))
18
+
7
19
  ## 1.7.0
8
20
 
9
- **New features:**
21
+ ### New features
10
22
 
11
23
  * **WARNING:** `nil` values will from now on overwrite an existing value when merging configs! This change of behavior can be reverted via `config.merge_nil_values = false` in your Config initializer ([#196](https://github.com/railsconfig/config/pull/196))
12
24
 
13
25
  ## 1.6.1
14
26
 
15
- **Bug fixes:**
27
+ ### Bug fixes
28
+
16
29
  * Make dry-validation dependency less strict allowing to use newer versions ([#183](https://github.com/railsconfig/config/pull/183))
17
30
  * Fix `key?` and `has_key?`, which raise NoMethodError in non Rails environment, by using ActiveSupport `#delegate` implicitly ([#185](https://github.com/railsconfig/config/pull/185))
18
31
  * Update `deep_merge` dependency to latest version (v1.2.1) ([#191](https://github.com/railsconfig/config/pull/191))
@@ -21,35 +34,35 @@
21
34
 
22
35
  ## 1.6.0
23
36
 
24
- **New features:**
37
+ ### New features
25
38
 
26
39
  * `Config#fail_on_missing` option (default `false`) to raise a `KeyError` exception when accessing a non-existing key
27
40
  * Add ability to test if a value was set for a given key with `key?` and `has_key?` ([#182](https://github.com/railsconfig/config/pull/182))
28
41
 
29
42
  ## 1.5.1
30
43
 
31
- **New features:**
44
+ ### New features
32
45
 
33
46
  * Add parsing of ENV variable values to Boolean type ([#180](https://github.com/railsconfig/config/pull/180))
34
47
 
35
48
  ## 1.5.0
36
49
 
37
- **New features:**
50
+ ### New features
38
51
 
39
52
  * Add ability to validate config schema ([#155](https://github.com/railsconfig/config/pull/155) thanks to [@ok32](https://github.com/ok32))
40
53
  * Add count to the reserved names list ([#167](https://github.com/railsconfig/config/pull/167) thanks to [@carbonin](https://github.com/carbonin))
41
54
 
42
- **Bug fixes:**
55
+ ### Bug fixes
43
56
 
44
57
  * Correctly parse `env_prefix`, which contains `env_separator` ([#177](https://github.com/railsconfig/config/pull/177) thanks to [@rdodson41](https://github.com/rdodson41))
45
58
 
46
59
  ## 1.4.0
47
60
 
48
- **New features:**
61
+ ### New features
49
62
 
50
63
  * Added support for passing a raw ruby hash into to both `Settings.add_source!` and `Settings.prepend_source!` ([#108](https://github.com/railsconfig/config/pull/159) thanks to [@halloffame](https://github.com/halloffame))
51
64
 
52
- **Bug fixes:**
65
+ ### Bug fixes
53
66
 
54
67
  * Added new reserved name `test` ([#158](https://github.com/railsconfig/config/pull/158) thanks to [@milushov](https://github.com/milushov))
55
68
  * `to_hash` should not replace nested config objects with Hash ([#160](https://github.com/railsconfig/config/issues/160) thanks to [@seikichi](https://github.com/seikichi))
@@ -1,9 +1,7 @@
1
1
  $:.push File.expand_path('../lib', __FILE__)
2
2
 
3
- # Maintain your gem's version:
4
3
  require 'config/version'
5
4
 
6
- # Describe your gem and declare its dependencies:
7
5
  Gem::Specification.new do |s|
8
6
  s.name = 'config'
9
7
  s.version = Config::VERSION
@@ -11,7 +9,8 @@ Gem::Specification.new do |s|
11
9
  s.authors = ['Piotr Kuczynski', 'Fred Wu', 'Jacques Crocker']
12
10
  s.email = %w(piotr.kuczynski@gmail.com ifredwu@gmail.com railsjedi@gmail.com)
13
11
  s.summary = 'Effortless multi-environment settings in Rails, Sinatra, Pandrino and others'
14
- s.description = 'Easiest way to manage multi-environment settings in any ruby project or framework: Rails, Sinatra, Pandrino and others'
12
+ s.description = 'Easiest way to manage multi-environment settings in any ruby project or framework: ' +
13
+ 'Rails, Sinatra, Pandrino and others'
15
14
  s.homepage = 'https://github.com/railsconfig/config'
16
15
  s.license = 'MIT'
17
16
  s.extra_rdoc_files = %w(README.md CHANGELOG.md LICENSE.md)
@@ -26,30 +25,33 @@ Gem::Specification.new do |s|
26
25
 
27
26
  s.add_dependency 'activesupport', '>= 3.0'
28
27
  s.add_dependency 'deep_merge', '~> 1.2.1'
29
- s.add_dependency 'dry-validation', '>= 0.10.4' if RUBY_VERSION >= '2.1'
28
+
29
+ s.add_dependency 'dry-validation', '>= 0.10.7' if RUBY_VERSION >= '2.1' && RUBY_VERSION < '2.2'
30
+ s.add_dependency 'dry-validation', '>= 0.12.2' if RUBY_VERSION >= '2.2'
30
31
 
31
32
  s.add_development_dependency 'bundler', '~> 1.13', '>= 1.13.6'
32
33
  s.add_development_dependency 'rake', '~> 12.0', '>= 12.0.0'
33
34
 
34
35
  # Testing
35
36
  s.add_development_dependency 'appraisal', '~> 2.2', '>= 2.2.0'
36
- s.add_development_dependency 'rails', '~> 5.1', '>= 5.1.4'
37
+ s.add_development_dependency 'rails', '~> 5.2', '>= 5.2.2'
37
38
  s.add_development_dependency 'rspec', '~> 3.7', '>= 3.7.0'
38
39
  s.add_development_dependency 'rspec-rails', '~> 3.7', '>= 3.7.2'
39
40
  s.add_development_dependency 'test-unit', '~> 3.2', '>= 3.2.7'
40
41
  s.add_development_dependency 'sqlite3', '~> 1.3', '>= 1.3.13'
41
42
 
42
43
  # Static code analysis
43
- s.add_development_dependency 'mdl', '~> 0.4', '>= 0.4.0'
44
+ s.add_development_dependency 'mdl', '~> 0.5', '>= 0.5.0'
44
45
 
45
- if RUBY_VERSION < '2.1'
46
- s.add_development_dependency 'rubocop', '~> 0.50', '>= 0.50.0'
47
- else
48
- s.add_development_dependency 'rubocop', '~> 0.52', '>= 0.52.1'
49
- end
46
+ # Version 0.51 drops support for Ruby 2.0
47
+ s.add_development_dependency 'rubocop', '~> 0.50', '< 0.51' if RUBY_VERSION < '2.1'
48
+ # Version 0.58 drops support for Ruby 2.1
49
+ s.add_development_dependency 'rubocop', '~> 0.57', '< 0.58' if RUBY_VERSION >= '2.1' && RUBY_VERSION < '2.2'
50
+ # Version 0.62 requires Ruby 2.2
51
+ s.add_development_dependency 'rubocop', '~> 0.62' if RUBY_VERSION >= '2.2'
50
52
 
51
53
  if ENV['TRAVIS']
54
+ s.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.9'
52
55
  s.add_development_dependency 'simplecov', '~> 0.13.0'
53
- s.add_development_dependency 'codeclimate-test-reporter', '~> 1.0.8'
54
56
  end
55
57
  end
@@ -7,19 +7,19 @@ module Config
7
7
  attr_accessor :path
8
8
 
9
9
  def initialize(path)
10
- @path = path
10
+ @path = path.to_s
11
11
  end
12
12
 
13
13
  # returns a config hash from the YML file
14
14
  def load
15
- if @path and File.exist?(@path.to_s)
16
- result = YAML.load(ERB.new(IO.read(@path.to_s)).result)
17
- end
15
+ result = YAML.load(ERB.new(IO.read(@path)).result) if @path and File.exist?(@path)
16
+
18
17
  result || {}
19
- rescue Psych::SyntaxError => e
20
- raise "YAML syntax error occurred while parsing #{@path}. " \
21
- "Please note that YAML must be consistently indented using spaces. Tabs are not allowed. " \
22
- "Error: #{e.message}"
18
+
19
+ rescue Psych::SyntaxError => e
20
+ raise "YAML syntax error occurred while parsing #{@path}. " \
21
+ "Please note that YAML must be consistently indented using spaces. Tabs are not allowed. " \
22
+ "Error: #{e.message}"
23
23
  end
24
24
  end
25
25
  end
@@ -9,7 +9,8 @@ module Config
9
9
  v_res = Config.schema.(self.to_hash)
10
10
 
11
11
  unless v_res.success?
12
- raise Config::Validation::Error.new("Config validation failed:\n\n#{Config::Validation::Error.format(v_res)}")
12
+ error = Config::Validation::Error.format(v_res)
13
+ raise Config::Validation::Error.new("Config validation failed:\n\n#{error}")
13
14
  end
14
15
  end
15
16
  end
@@ -1,3 +1,3 @@
1
1
  module Config
2
- VERSION = '1.7.0'
2
+ VERSION = '1.7.1'
3
3
  end
@@ -0,0 +1,24 @@
1
+ # README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Kuczynski
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-02-09 00:00:00.000000000 Z
13
+ date: 2019-01-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -46,14 +46,14 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 0.10.4
49
+ version: 0.12.2
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: 0.10.4
56
+ version: 0.12.2
57
57
  - !ruby/object:Gem::Dependency
58
58
  name: bundler
59
59
  requirement: !ruby/object:Gem::Requirement
@@ -78,82 +78,82 @@ dependencies:
78
78
  name: rake
79
79
  requirement: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: '12.0'
84
81
  - - ">="
85
82
  - !ruby/object:Gem::Version
86
83
  version: 12.0.0
84
+ - - "~>"
85
+ - !ruby/object:Gem::Version
86
+ version: '12.0'
87
87
  type: :development
88
88
  prerelease: false
89
89
  version_requirements: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - "~>"
92
- - !ruby/object:Gem::Version
93
- version: '12.0'
94
91
  - - ">="
95
92
  - !ruby/object:Gem::Version
96
93
  version: 12.0.0
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '12.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: appraisal
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '2.2'
104
101
  - - ">="
105
102
  - !ruby/object:Gem::Version
106
103
  version: 2.2.0
104
+ - - "~>"
105
+ - !ruby/object:Gem::Version
106
+ version: '2.2'
107
107
  type: :development
108
108
  prerelease: false
109
109
  version_requirements: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - "~>"
112
- - !ruby/object:Gem::Version
113
- version: '2.2'
114
111
  - - ">="
115
112
  - !ruby/object:Gem::Version
116
113
  version: 2.2.0
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '2.2'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: rails
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '5.1'
123
+ version: '5.2'
124
124
  - - ">="
125
125
  - !ruby/object:Gem::Version
126
- version: 5.1.4
126
+ version: 5.2.2
127
127
  type: :development
128
128
  prerelease: false
129
129
  version_requirements: !ruby/object:Gem::Requirement
130
130
  requirements:
131
131
  - - "~>"
132
132
  - !ruby/object:Gem::Version
133
- version: '5.1'
133
+ version: '5.2'
134
134
  - - ">="
135
135
  - !ruby/object:Gem::Version
136
- version: 5.1.4
136
+ version: 5.2.2
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: rspec
139
139
  requirement: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - "~>"
142
- - !ruby/object:Gem::Version
143
- version: '3.7'
144
141
  - - ">="
145
142
  - !ruby/object:Gem::Version
146
143
  version: 3.7.0
144
+ - - "~>"
145
+ - !ruby/object:Gem::Version
146
+ version: '3.7'
147
147
  type: :development
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - "~>"
152
- - !ruby/object:Gem::Version
153
- version: '3.7'
154
151
  - - ">="
155
152
  - !ruby/object:Gem::Version
156
153
  version: 3.7.0
154
+ - - "~>"
155
+ - !ruby/object:Gem::Version
156
+ version: '3.7'
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: rspec-rails
159
159
  requirement: !ruby/object:Gem::Requirement
@@ -218,42 +218,36 @@ dependencies:
218
218
  name: mdl
219
219
  requirement: !ruby/object:Gem::Requirement
220
220
  requirements:
221
- - - "~>"
222
- - !ruby/object:Gem::Version
223
- version: '0.4'
224
221
  - - ">="
225
222
  - !ruby/object:Gem::Version
226
- version: 0.4.0
223
+ version: 0.5.0
224
+ - - "~>"
225
+ - !ruby/object:Gem::Version
226
+ version: '0.5'
227
227
  type: :development
228
228
  prerelease: false
229
229
  version_requirements: !ruby/object:Gem::Requirement
230
230
  requirements:
231
- - - "~>"
232
- - !ruby/object:Gem::Version
233
- version: '0.4'
234
231
  - - ">="
235
232
  - !ruby/object:Gem::Version
236
- version: 0.4.0
233
+ version: 0.5.0
234
+ - - "~>"
235
+ - !ruby/object:Gem::Version
236
+ version: '0.5'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: rubocop
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
241
  - - "~>"
242
242
  - !ruby/object:Gem::Version
243
- version: '0.52'
244
- - - ">="
245
- - !ruby/object:Gem::Version
246
- version: 0.52.1
243
+ version: '0.62'
247
244
  type: :development
248
245
  prerelease: false
249
246
  version_requirements: !ruby/object:Gem::Requirement
250
247
  requirements:
251
248
  - - "~>"
252
249
  - !ruby/object:Gem::Version
253
- version: '0.52'
254
- - - ">="
255
- - !ruby/object:Gem::Version
256
- version: 0.52.1
250
+ version: '0.62'
257
251
  description: 'Easiest way to manage multi-environment settings in any ruby project
258
252
  or framework: Rails, Sinatra, Pandrino and others'
259
253
  email:
@@ -294,6 +288,7 @@ files:
294
288
  - lib/generators/config/templates/settings/production.yml
295
289
  - lib/generators/config/templates/settings/test.yml
296
290
  - spec/app/rails_5.1/README.md
291
+ - spec/app/rails_5.2/README.md
297
292
  - spec/app/rails_5/README.md
298
293
  homepage: https://github.com/railsconfig/config
299
294
  licenses:
@@ -316,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
316
311
  version: '0'
317
312
  requirements: []
318
313
  rubyforge_project:
319
- rubygems_version: 2.7.5
314
+ rubygems_version: 2.7.8
320
315
  signing_key:
321
316
  specification_version: 4
322
317
  summary: Effortless multi-environment settings in Rails, Sinatra, Pandrino and others