anyway_config 2.0.4 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +241 -181
  3. data/README.md +231 -13
  4. data/lib/.rbnext/1995.next/anyway/config.rb +438 -0
  5. data/lib/.rbnext/1995.next/anyway/dynamic_config.rb +31 -0
  6. data/lib/.rbnext/1995.next/anyway/env.rb +56 -0
  7. data/lib/.rbnext/1995.next/anyway/loaders/base.rb +21 -0
  8. data/lib/.rbnext/1995.next/anyway/tracing.rb +181 -0
  9. data/lib/.rbnext/2.7/anyway/auto_cast.rb +39 -19
  10. data/lib/.rbnext/2.7/anyway/config.rb +61 -16
  11. data/lib/.rbnext/2.7/anyway/rails/loaders/yaml.rb +30 -0
  12. data/lib/.rbnext/2.7/anyway/rbs.rb +92 -0
  13. data/lib/.rbnext/2.7/anyway/settings.rb +79 -0
  14. data/lib/.rbnext/2.7/anyway/tracing.rb +6 -6
  15. data/lib/.rbnext/2.7/anyway/type_casting.rb +130 -0
  16. data/lib/.rbnext/3.0/anyway/auto_cast.rb +53 -0
  17. data/lib/.rbnext/{2.8 → 3.0}/anyway/config.rb +61 -16
  18. data/lib/.rbnext/{2.8 → 3.0}/anyway/loaders/base.rb +0 -0
  19. data/lib/.rbnext/{2.8 → 3.0}/anyway/loaders.rb +0 -0
  20. data/lib/.rbnext/{2.8 → 3.0}/anyway/tracing.rb +6 -6
  21. data/lib/anyway/auto_cast.rb +39 -19
  22. data/lib/anyway/config.rb +75 -30
  23. data/lib/anyway/dynamic_config.rb +6 -2
  24. data/lib/anyway/env.rb +1 -1
  25. data/lib/anyway/ext/deep_dup.rb +12 -0
  26. data/lib/anyway/ext/hash.rb +10 -12
  27. data/lib/anyway/loaders/base.rb +1 -1
  28. data/lib/anyway/loaders/env.rb +3 -1
  29. data/lib/anyway/loaders/yaml.rb +9 -5
  30. data/lib/anyway/option_parser_builder.rb +1 -3
  31. data/lib/anyway/optparse_config.rb +5 -7
  32. data/lib/anyway/rails/loaders/credentials.rb +4 -4
  33. data/lib/anyway/rails/loaders/secrets.rb +6 -8
  34. data/lib/anyway/rails/loaders/yaml.rb +11 -0
  35. data/lib/anyway/rails/settings.rb +9 -2
  36. data/lib/anyway/rbs.rb +92 -0
  37. data/lib/anyway/settings.rb +52 -2
  38. data/lib/anyway/tracing.rb +9 -9
  39. data/lib/anyway/type_casting.rb +121 -0
  40. data/lib/anyway/utils/deep_merge.rb +21 -0
  41. data/lib/anyway/version.rb +1 -1
  42. data/lib/anyway_config.rb +4 -0
  43. data/sig/anyway_config.rbs +123 -0
  44. metadata +42 -15
  45. data/lib/.rbnext/2.7/anyway/option_parser_builder.rb +0 -31
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b904056fa9aacdea82b6f1637842533d7def209c93f567b0367f286ea80f9d03
4
- data.tar.gz: 711e2db3dbf53098621d145c260967a529a0a384c4431f26f361b6a32f064730
3
+ metadata.gz: 87d32ae676d03c8a9fd3a0b22efe3321d76661f226438f52fd313f4d73b1876d
4
+ data.tar.gz: 82f2ab5d663b03622f650fbcf8e37216a71d81fdfd9270d54f539fd6253ada9d
5
5
  SHA512:
6
- metadata.gz: 77df85ae073e7b919e0f54b4bbb8626cef280745302f22f5771f7b14033404b8414ddc8b91e2ddc5fba7a6f1a01e8a0b380a112aa5d4ef7129521c5cdf218888
7
- data.tar.gz: 2c101d67759f17b04cba5fbadfffb224ce54cb39a96d369784d291b9c6991801a2dc5a4cd422a52dfd4a1e9c46d219629588e744c527846f720089250cb8c5a7
6
+ metadata.gz: 9f7952609c7964cc9866fe530a9a519cf981f0551f9979c72f38b2acd31e59edd98d6234f095da99419acd462bcfc7c6b7d5016c41ded3bb0206d7f1e03550b3
7
+ data.tar.gz: 1559b8e140b7df15164134233fd6c65e11d9283f94c9495a0d92f6afdcc69271cec68a7bc6f5052b8ec06dab35e33f1cadd32f4f044701156bfcc0ca4676ba41
data/CHANGELOG.md CHANGED
@@ -1,5 +1,79 @@
1
1
  # Change log
2
2
 
3
+ ## master
4
+
5
+ ## 2.2.0 ⛓
6
+
7
+ - Add RBS signatures and generator. ([@palkan][])
8
+
9
+ Anyway Config now ships with the basic RBS support. To use config types with Steep, add `library "anyway_config"` to your Steepfile.
10
+
11
+ We also provide an API to generate a signature for you config class: `MyConfig.to_rbs`. You can use this method to generate a scaffold for your config class.
12
+
13
+ - Add type coercion support. ([@palkan][])
14
+
15
+ Example:
16
+
17
+ ```ruby
18
+ class CoolConfig < Anyway::Config
19
+ attr_config :port, :user
20
+
21
+ coerce_types port: :string, user: {dob: :date}
22
+ end
23
+
24
+ ENV["COOL_USER__DOB"] = "1989-07-01"
25
+
26
+ config = CoolConfig.new({port: 8080})
27
+ config.port == "8080" #=> true
28
+ config.user["dob"] == Date.new(1989, 7, 1) #=> true
29
+ ```
30
+
31
+ You can also add `.disable_auto_cast!` to your config class to disable automatic conversion.
32
+
33
+ **Warning** Now values from all sources are coerced (e.g., YAML files). That could lead to a different behaviour.
34
+
35
+ - Do not dup modules/classes passed as configuration values. ([@palkan][])
36
+
37
+ - Handle loading empty YAML config files. ([@micahlee][])
38
+
39
+ ## 2.1.0 (2020-12-29)
40
+
41
+ - Drop deprecated `attr_config` instance variables support.
42
+
43
+ Config setters no longer write instance variables.
44
+
45
+ - Add `config.anyway_config.future` to allow enabling upcoming features. ([@palkan][])
46
+
47
+ For smoother upgrades, we provide a mechanism to opt-out to the new defaults beforehand.
48
+ Currently, only `:unwrap_known_environments` feature could be enabled (see below):
49
+
50
+ ```ruby
51
+ config.anyway_config.future.use :unwrap_known_environments
52
+ ```
53
+
54
+ - Allow to skip environment keys completely (e.g., `development:`, `test:`) in a config YML when used with Rails. In that case same config is loaded in all known environments (same mechanism as for non-Rails applications)
55
+
56
+ - Add the `known_environments` property to Anyway::Settings under Rails. Use `config.anyway_config.known_environments << "staging"` to make the gem aware of custom environments. ([@progapandist][])
57
+
58
+ - Make it possible to specify default YML configs directory. ([@palkan][])
59
+
60
+ For example:
61
+
62
+ ```ruby
63
+ Anyway::Settings.default_config_path = "path/to/configs"
64
+
65
+ # or in Rails
66
+ config.anyway_config.default_config_path = Rails.root.join("my/configs")
67
+ ```
68
+
69
+ ## 2.0.6 (2020-07-7)
70
+
71
+ - Fix Ruby 2.7 warnings. ([@palkan][])
72
+
73
+ ## 2.0.5 (2020-05-15)
74
+
75
+ - Use `YAML.load` instead of `YAML.safe_laad`. ([@palkan][])
76
+
3
77
  ## 2.0.4 (2020-05-15)
4
78
 
5
79
  - Fix regression with adding `ruby-next` as a runtime dependency even for RubyGems release. ([@palkan][])
@@ -12,13 +86,13 @@
12
86
 
13
87
  - Make sure configs are eager loaded in Rails when `config.eager_load = true`. ([@palkan][])
14
88
 
15
- Fixes [#58](https://github.com/palkan/anyway_config/issues/58).
89
+ Fixes [#58](https://github.com/palkan/anyway_config/issues/58).
16
90
 
17
91
  ## 2.0.1 (2020-04-15)
18
92
 
19
93
  - Fix loading Railtie when application has been already initialized. ([@palkan][])
20
94
 
21
- Fixes [#56](https://github.com/palkan/anyway_config/issues/56).
95
+ Fixes [#56](https://github.com/palkan/anyway_config/issues/56).
22
96
 
23
97
  ## 2.0.0 (2020-04-14)
24
98
 
@@ -28,166 +102,166 @@
28
102
 
29
103
  - Add predicate methods for attributes with boolean defaults. ([@palkan][])
30
104
 
31
- For example:
105
+ For example:
32
106
 
33
- ```ruby
34
- class MyConfig < Anyway::Config
35
- attr_config :key, :secret, debug: false
36
- end
107
+ ```ruby
108
+ class MyConfig < Anyway::Config
109
+ attr_config :key, :secret, debug: false
110
+ end
37
111
 
38
- MyConfig.new.debug? #=> false
39
- MyConfig.new(debug: true).debug? #=> true
40
- ```
112
+ MyConfig.new.debug? #=> false
113
+ MyConfig.new(debug: true).debug? #=> true
114
+ ```
41
115
 
42
116
  - Add `Config#deconstruct_keys`. ([@palkan][])
43
117
 
44
- Now you can use configs in pattern matching:
118
+ Now you can use configs in pattern matching:
45
119
 
46
- ```ruby
47
- case AWSConfig.new
48
- in bucket:, region: "eu-west-1"
49
- setup_eu_storage(bucket)
50
- in bucket:, region: "us-east-1"
51
- setup_us_storage(bucket)
52
- end
53
- ```
120
+ ```ruby
121
+ case AWSConfig.new
122
+ in bucket:, region: "eu-west-1"
123
+ setup_eu_storage(bucket)
124
+ in bucket:, region: "us-east-1"
125
+ setup_us_storage(bucket)
126
+ end
127
+ ```
54
128
 
55
129
  - Add pretty_print support. ([@palkan][])
56
130
 
57
- Whenever you use `pp`, the output would contain pretty formatted config information
58
- including the sources.
131
+ Whenever you use `pp`, the output would contain pretty formatted config information
132
+ including the sources.
59
133
 
60
- Example:
134
+ Example:
61
135
 
62
- ```ruby
63
- pp CoolConfig.new
136
+ ```ruby
137
+ pp CoolConfig.new
64
138
 
65
- # #<CoolConfig
66
- # config_name="cool"
67
- # env_prefix="COOL"
68
- # values:
69
- # port => 3334 (type=load),
70
- # host => "test.host" (type=yml path=./config/cool.yml),
71
- # user =>
72
- # name => "john" (type=env key=COOL_USER__NAME),
73
- # password => "root" (type=yml path=./config/cool.yml)>
74
- ```
139
+ # #<CoolConfig
140
+ # config_name="cool"
141
+ # env_prefix="COOL"
142
+ # values:
143
+ # port => 3334 (type=load),
144
+ # host => "test.host" (type=yml path=./config/cool.yml),
145
+ # user =>
146
+ # name => "john" (type=env key=COOL_USER__NAME),
147
+ # password => "root" (type=yml path=./config/cool.yml)>
148
+ ```
75
149
 
76
150
  - Add source tracing support. ([@palkan][])
77
151
 
78
- You can get the information on where a particular parameter value came from
79
- (which loader) through via `#to_source_trace` method:
80
-
81
- ```ruby
82
- conf = MyConfig.new
83
- conf.to_source_trace
84
- # {
85
- # "host" => {value: "test.host", source: {type: :user, called_from: "/rails/root/config/application.rb:21"}},
86
- # "user" => {
87
- # "name" => {value: "john", source: {type: :env, key: "COOL_USER__NAME"}},
88
- # "password" => {value: "root", source: {type: :yml, path: "config/cool.yml"}}
89
- # },
90
- # "port" => {value: 9292, source: {type: :defaults}}
91
- # }
92
- ```
152
+ You can get the information on where a particular parameter value came from
153
+ (which loader) through via `#to_source_trace` method:
154
+
155
+ ```ruby
156
+ conf = MyConfig.new
157
+ conf.to_source_trace
158
+ # {
159
+ # "host" => {value: "test.host", source: {type: :user, called_from: "/rails/root/config/application.rb:21"}},
160
+ # "user" => {
161
+ # "name" => {value: "john", source: {type: :env, key: "COOL_USER__NAME"}},
162
+ # "password" => {value: "root", source: {type: :yml, path: "config/cool.yml"}}
163
+ # },
164
+ # "port" => {value: 9292, source: {type: :defaults}}
165
+ # }
166
+ ```
93
167
 
94
168
  - Change the way Rails configs autoloading works. ([@palkan][])
95
169
 
96
- In Rails 6, autoloading before initialization is [deprecated](https://github.com/rails/rails/commit/3e66ba91d511158e22f90ff96b594d61f40eda01). We can still
97
- make it work by using our own autoloading mechanism (custom Zeitwerk loader).
170
+ In Rails 6, autoloading before initialization is [deprecated](https://github.com/rails/rails/commit/3e66ba91d511158e22f90ff96b594d61f40eda01). We can still
171
+ make it work by using our own autoloading mechanism (custom Zeitwerk loader).
98
172
 
99
- This forces us to use a custom directory (not `app/`) for configs required at the boot time.
100
- By default, we put _static_ configs into `config/configs` but you can still use `app/configs` for
101
- _dynamic_ (runtime) configs.
173
+ This forces us to use a custom directory (not `app/`) for configs required at the boot time.
174
+ By default, we put _static_ configs into `config/configs` but you can still use `app/configs` for
175
+ _dynamic_ (runtime) configs.
102
176
 
103
- **NOTE:** if you used `app/configs` with 2.0.0.preX and relied on configs during initialization,
104
- you can set static configs path to `app/configs`:
177
+ **NOTE:** if you used `app/configs` with 2.0.0.preX and relied on configs during initialization,
178
+ you can set static configs path to `app/configs`:
105
179
 
106
- ```ruby
107
- config.anyway_config.autoload_static_config_path = "app/configs"
108
- ```
180
+ ```ruby
181
+ config.anyway_config.autoload_static_config_path = "app/configs"
182
+ ```
109
183
 
110
- You can do this by running the generator:
184
+ You can do this by running the generator:
111
185
 
112
- ```sh
113
- rails g anyway:install --configs-path=app/configs
114
- ```
186
+ ```sh
187
+ rails g anyway:install --configs-path=app/configs
188
+ ```
115
189
 
116
190
  - Add Rails generators. ([@palkan][])
117
191
 
118
- You can create config classes with the predefined attributes like this:
192
+ You can create config classes with the predefined attributes like this:
119
193
 
120
- ```sh
121
- rails generate config aws access_key_id secret_access_key region
122
- ```
194
+ ```sh
195
+ rails generate config aws access_key_id secret_access_key region
196
+ ```
123
197
 
124
198
  - **BREAKING** The accessors generated by `attr_config` are not longer `attr_accessor`-s. ([@palkan][])
125
199
 
126
- You cannot rely on instance variables anymore. Instead, you can use `super` when overriding accessors or
127
- `values[name]`:
200
+ You cannot rely on instance variables anymore. Instead, you can use `super` when overriding accessors or
201
+ `values[name]`:
128
202
 
129
- ```ruby
130
- attr_config :host, :port, :url, :meta
203
+ ```ruby
204
+ attr_config :host, :port, :url, :meta
131
205
 
132
- # override writer to handle type coercion
133
- def meta=(val)
134
- super JSON.parse(val)
135
- end
206
+ # override writer to handle type coercion
207
+ def meta=(val)
208
+ super JSON.parse(val)
209
+ end
136
210
 
137
- # or override reader to handle missing values
138
- def url
139
- values[:url] ||= "#{host}:#{port}"
140
- end
211
+ # or override reader to handle missing values
212
+ def url
213
+ values[:url] ||= "#{host}:#{port}"
214
+ end
141
215
 
142
- # in <2.1 it's still possible to read instance variables,
143
- # i.e. the following would also work
144
- def url
145
- @url ||= "#{host}:#{port}"
146
- end
147
- ```
216
+ # in <2.1 it's still possible to read instance variables,
217
+ # i.e. the following would also work
218
+ def url
219
+ @url ||= "#{host}:#{port}"
220
+ end
221
+ ```
148
222
 
149
- **NOTE**: we still set instance variables in writers (for backward compatibility), but that would
150
- be removed in 2.1.
223
+ **NOTE**: we still set instance variables in writers (for backward compatibility), but that would
224
+ be removed in 2.1.
151
225
 
152
226
  - Add `Config#dig` method. ([@palkan][])
153
227
 
154
228
  - Add ability to specify types for OptionParser options. ([@palkan][])
155
229
 
156
- ```ruby
157
- describe_options(
158
- concurrency: {
159
- desc: "number of threads to use",
160
- type: String
161
- }
162
- )
163
- ```
230
+ ```ruby
231
+ describe_options(
232
+ concurrency: {
233
+ desc: "number of threads to use",
234
+ type: String
235
+ }
236
+ )
237
+ ```
164
238
 
165
239
  - Add param presence validation. ([@palkan][])
166
240
 
167
- You can specify some params as required, and the validation
168
- error would be raised if they're missing or empty (only for strings):
241
+ You can specify some params as required, and the validation
242
+ error would be raised if they're missing or empty (only for strings):
169
243
 
170
- ```ruby
171
- class MyConfig < Anyway::Config
172
- attr_config :api_key, :api_secret, :debug
244
+ ```ruby
245
+ class MyConfig < Anyway::Config
246
+ attr_config :api_key, :api_secret, :debug
173
247
 
174
- required :api_key, :api_secret
175
- end
248
+ required :api_key, :api_secret
249
+ end
176
250
 
177
- MyConfig.new(api_secret: "") #=> raises Anyway::Config::ValidationError
178
- ```
251
+ MyConfig.new(api_secret: "") #=> raises Anyway::Config::ValidationError
252
+ ```
179
253
 
180
- You can change the validation behaviour by overriding the `#validate!` method in your config class.
254
+ You can change the validation behaviour by overriding the `#validate!` method in your config class.
181
255
 
182
256
  - Validate config attribute names. ([@palkan][])
183
257
 
184
- Do not allow using reserved names (`Anyway::Config` method names).
185
- Allow only alphanumeric names (matching `/^[a-z_]([\w]+)?$/`).
258
+ Do not allow using reserved names (`Anyway::Config` method names).
259
+ Allow only alphanumeric names (matching `/^[a-z_]([\w]+)?$/`).
186
260
 
187
261
  - Add Loaders API. ([@palkan][])
188
262
 
189
- All config sources have standardized via _loaders_ API. It's possible to define
190
- custom loaders or change the sources order.
263
+ All config sources have standardized via _loaders_ API. It's possible to define
264
+ custom loaders or change the sources order.
191
265
 
192
266
  ## 2.0.0.pre2 (2019-04-26)
193
267
 
@@ -197,73 +271,58 @@
197
271
 
198
272
  - **BREAKING** Changed the way of providing explicit values. ([@palkan][])
199
273
 
200
- ```ruby
201
- # BEFORE
202
- Config.new(overrides: data)
274
+ ```ruby
275
+ # BEFORE
276
+ Config.new(overrides: data)
203
277
 
204
- # AFTER
205
- Config.new(data)
206
- ```
278
+ # AFTER
279
+ Config.new(data)
280
+ ```
207
281
 
208
282
  - Add Railtie. ([@palkan][])
209
283
 
210
- `Anyway::Railtie` provides `Anyway::Settings` access via `Rails.applicaiton.configuration.anyway_config`.
284
+ `Anyway::Railtie` provides `Anyway::Settings` access via `Rails.applicaiton.configuration.anyway_config`.
211
285
 
212
- It also adds `app/configs` path to autoload paths (low-level, `ActiveSupport::Dependencies`) to
213
- make it possible to use configs in the app configuration files.
286
+ It also adds `app/configs` path to autoload paths (low-level, `ActiveSupport::Dependencies`) to
287
+ make it possible to use configs in the app configuration files.
214
288
 
215
289
  - Add test helpers. ([@palkan][])
216
290
 
217
- Added `with_env` helper to test code in the context of the specified
218
- environment variables.
291
+ Added `with_env` helper to test code in the context of the specified
292
+ environment variables.
219
293
 
220
- Included automatically in RSpec for examples with the `type: :config` meta
221
- or with the `spec/configs` path.
294
+ Included automatically in RSpec for examples with the `type: :config` meta
295
+ or with the `spec/configs` path.
222
296
 
223
297
  - Add support for _local_ files. ([@palkan][])
224
298
 
225
- Now users can store their personal configurations in _local_ files:
226
- - `<config_name>.local.yml`
227
- - `config/credentials/local.yml.enc` (for Rails 6).
299
+ Now users can store their personal configurations in _local_ files:
300
+
301
+ - `<config_name>.local.yml`
302
+ - `config/credentials/local.yml.enc` (for Rails 6).
228
303
 
229
- Local configs are meant for using in development and only loaded if
230
- `Anyway::Settings.use_local_files` is `true` (which is true by default if
231
- `RACK_ENV` or `RAILS_ENV` env variable is equal to `"development"`).
304
+ Local configs are meant for using in development and only loaded if
305
+ `Anyway::Settings.use_local_files` is `true` (which is true by default if
306
+ `RACK_ENV` or `RAILS_ENV` env variable is equal to `"development"`).
232
307
 
233
308
  - Add Rails credentials support. ([@palkan][])
234
309
 
235
- The data from credentials is loaded after the data from YAML config and secrets,
236
- but before environmental variables (i.e. env variables are _stronger_)
310
+ The data from credentials is loaded after the data from YAML config and secrets,
311
+ but before environmental variables (i.e. env variables are _stronger_)
237
312
 
238
313
  - Update config name inference logic. ([@palkan][])
239
314
 
240
- Config name is automatically inferred only if:
241
- - the class name has a form of `<Module>::Config` (`SomeModule::Config => "some_module"`)
242
- - the class name has a form of `<Something>Config` (`SomeConfig => "some"`)
243
-
244
- - Fix config classes inheritance. ([@palkan][])
315
+ Config name is automatically inferred only if:
245
316
 
246
- Previously, inheritance didn't work due to the lack of proper handling of class-level
247
- configuration (naming, option parses settings, defaults).
317
+ - the class name has a form of `<Module>::Config` (`SomeModule::Config => "some_module"`)
318
+ - the class name has a form of `<Something>Config` (`SomeConfig => "some"`)
248
319
 
249
- Now it's possible to extend config classes without breaking the original classes functionality.
250
-
251
- Noticeable features:
252
- - if `config_name` is explicitly defined on class, it's inherited by subclasses:
253
-
254
- ```ruby
255
- class MyAppBaseConfig < Anyway::Config
256
- config_name :my_app
257
- end
258
-
259
- class MyServiceConfig < MyAppBaseConfig
260
- end
320
+ - Fix config classes inheritance. ([@palkan][])
261
321
 
262
- MyServiceConfig.config_name #=> "my_app"
263
- ```
322
+ Previously, inheritance didn't work due to the lack of proper handling of class-level
323
+ configuration (naming, option parses settings, defaults).
264
324
 
265
- - defaults are merged leaving the parent class defaults unchanged
266
- - option parse extension are not overriden, but added to the parent class extensions
325
+ Now it's possible to extend config classes without breaking the original classes functionality.
267
326
 
268
327
  - **Require Ruby >= 2.5.0.**
269
328
 
@@ -283,26 +342,26 @@
283
342
 
284
343
  - Add OptionParse integration ([@jastkand][])
285
344
 
286
- See more [PR#18](https://github.com/palkan/anyway_config/pull/18).
345
+ See more [PR#18](https://github.com/palkan/anyway_config/pull/18).
287
346
 
288
347
  - Use underscored config name as an env prefix. ([@palkan][])
289
348
 
290
- For a config class:
349
+ For a config class:
291
350
 
292
- ```ruby
293
- class MyApp < Anyway::Config
294
- end
295
- ```
351
+ ```ruby
352
+ class MyApp < Anyway::Config
353
+ end
354
+ ```
296
355
 
297
- Before this change we use `MYAPP_` prefix, now it's `MY_APP_`.
356
+ Before this change we use `MYAPP_` prefix, now it's `MY_APP_`.
298
357
 
299
- You can specify the prefix explicitly:
358
+ You can specify the prefix explicitly:
300
359
 
301
- ```ruby
302
- class MyApp < Anyway::Config
303
- env_prefix "MYAPP_"
304
- end
305
- ```
360
+ ```ruby
361
+ class MyApp < Anyway::Config
362
+ env_prefix "MYAPP_"
363
+ end
364
+ ```
306
365
 
307
366
  ## 1.3.0 (2018-06-15)
308
367
 
@@ -318,18 +377,18 @@ Now works on JRuby 9.1+.
318
377
 
319
378
  - Allow to pass raw hash with explicit values to `Config.new`. ([@dsalahutdinov][])
320
379
 
321
- Example:
380
+ Example:
322
381
 
323
- ```ruby
324
- Sniffer::Config.new(
325
- overrides: {
326
- enabled: true,
327
- storage: {capacity: 500}
328
- }
329
- )
330
- ```
382
+ ```ruby
383
+ Sniffer::Config.new(
384
+ overrides: {
385
+ enabled: true,
386
+ storage: {capacity: 500}
387
+ }
388
+ )
389
+ ```
331
390
 
332
- See more [PR#10](https://github.com/palkan/anyway_config/pull/10).
391
+ See more [PR#10](https://github.com/palkan/anyway_config/pull/10).
333
392
 
334
393
  ## 1.1.2 (2017-11-19)
335
394
 
@@ -343,7 +402,7 @@ Now works on JRuby 9.1+.
343
402
 
344
403
  - Add `#to_h` method. ([@palkan][])
345
404
 
346
- See [#4](https://github.com/palkan/anyway_config/issues/4).
405
+ See [#4](https://github.com/palkan/anyway_config/issues/4).
347
406
 
348
407
  - Make it possible to extend configuration parameters. ([@palkan][])
349
408
 
@@ -357,17 +416,18 @@ Now works on JRuby 9.1+.
357
416
 
358
417
  - Drop `active_support` dependency. ([@palkan][])
359
418
 
360
- Use custom refinements instead of requiring `active_support`.
419
+ Use custom refinements instead of requiring `active_support`.
361
420
 
362
- No we're dependency-free!
421
+ No we're dependency-free!
363
422
 
364
423
  ## 0.1.0 (2015-01-20)
365
424
 
366
- Initial version.
425
+ - Initial version.
367
426
 
368
427
  [@palkan]: https://github.com/palkan
369
428
  [@onemanstartup]: https://github.com/onemanstartup
370
429
  [@dsalahutdinov]: https://github.com/dsalahutdinov
371
430
  [@charlie-wasp]: https://github.com/charlie-wasp
372
431
  [@jastkand]: https://github.com/jastkand
373
- [@Envek]: https://github.com/Envek
432
+ [@envek]: https://github.com/Envek
433
+ [@progapandist]: https://github.com/progapandist