anyway_config 2.0.6 → 2.2.2

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