anyway_config 2.0.5 → 2.2.1

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