dry-config 1.2.3 → 1.2.4

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
  SHA1:
3
- metadata.gz: 930941affd9017b1baf6523ff3f7bdd1446556f5
4
- data.tar.gz: fe728b093446b3db3cbb0c4433230572246e4ada
3
+ metadata.gz: 676591550dec732ede12a3bb7b72452ab2ea6347
4
+ data.tar.gz: 9f140632b65169bafc5306c6f945cd846626be91
5
5
  SHA512:
6
- metadata.gz: f5a1875c5fd8705e613b950fc08ac9ef983ba6a5b52d392a23721e332806782978d3fa6fc7d0fbca57f49255caf6c611b04d65694a01af12536a2c771a94c7e7
7
- data.tar.gz: edf646def929bb16f294ffef1badeabfbd38c0856f35e1a7e6680214ec6bc11cf2cc4bfb3d13e4378d65a827e1613e8bd2d2db9b528b6976338a97b8e50b2d25
6
+ metadata.gz: 5fc431b635f0f9284b37366051ffa57a28073d2eb64a35ee7bc0278c317982240dd984ea3dd07d435489d1268c3529add547bf25ab195983db1468ce7a0c9c2f
7
+ data.tar.gz: 6100ea47ef1e198cfab7d024b09ad8f7b5d00f6ee1835313e4dbf48b9271b0078db15181e20b129fc633be14586ec5e3ae94cb6ce92cefc43d7258ac6d7afba3
data/README.md CHANGED
@@ -149,13 +149,10 @@ The default configuration is provided below, override any of these values on con
149
149
  symbolize: true, # provide symbol based key access for everything i.e. access :development instead of 'development' as a rule
150
150
  unsymbolize_to_yaml: true, # on to_yaml or write_yaml_file unsymbolize keys (several external tools do not do well with symbolized keys i.e. write `development:` instead of `:development:`
151
151
  default_configuration: {}, # seed configuration (file contents overlay this)
152
- potential_environments:
153
- [:development, :test, :staging, :production] # used for pruning (optional)
152
+ prune:
153
+ [:development, :test, :staging, :production] # used for pruning final configuration (optional - nice to have cleanup)
154
154
  }
155
155
  ```
156
- - Expected environments are `[:development, :test, :staging, :production]`. Expand or redefine `@potential_environments` these by overriding the `#initialize` or doing so in your optional `#seed_default_configuration`. This is used in the used in the overlay pruning process to prevent unused branches of configuration from showing up in the resolved configuration.
157
- - An optional `#seed_default_configuration` allows you to provide a configuration base
158
- - `#clear` will restore to the seed configuration, allowing you to `#load!` new settings.
159
156
 
160
157
  ## Contributing
161
158
 
@@ -28,13 +28,13 @@ module Dry
28
28
  symbolize: true, # provide symbol based key access for everything
29
29
  unsymbolize_to_yaml: true, # on to_yaml or write_yaml_file unsymbolize keys
30
30
  default_configuration: {}, # seed configuration
31
- potential_environments: [:development, :test, :staging, :production] # used for pruning (optional)
31
+ prune: [:development, :test, :staging, :production] # used for pruning (optional)
32
32
  }.merge options
33
33
 
34
34
  @default_configuration = @options[:default_configuration]
35
35
 
36
36
  # (optional) used for pruning initial base set. See #resolve_config
37
- @potential_environments = @options[:potential_environments]
37
+ @prune = @options[:prune]
38
38
 
39
39
  # setup a default configuration
40
40
  clear
@@ -69,7 +69,7 @@ module Dry
69
69
  should_overlay_environment = environment && config[environment]
70
70
 
71
71
  # Prune all known environments so that we end up with the top-level configuration.
72
- @potential_environments.each do |env|
72
+ @prune.each do |env|
73
73
  config.delete(env)
74
74
  end
75
75
 
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  module Config
3
- VERSION = '1.2.3'
3
+ VERSION = '1.2.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-config
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Ross