easy-settings 1.0.0 → 1.0.1
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.
- checksums.yaml +4 -4
- data/docker-compose.yml +5 -0
- data/lib/easy-settings/env_source.rb +2 -2
- data/lib/easy-settings/path_source.rb +2 -2
- data/lib/easy-settings/version.rb +1 -1
- data/lib/easy-settings.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2201e0174f6b39d014d3367e0194ffd4d3d3ea49391ef469287f9ca743b18f3e
|
|
4
|
+
data.tar.gz: a09796a2e102518a629f38ad7d22e9e22caea788b447ef9ebb9c7ca03c33b912
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 574a86188bf824a33a213b4370158853c5bfed62e67a7da28e415ae06669983d87ac872ee612efaab25f37f41b8fcb65f482b664caf3dcc916696d08d02aa98f
|
|
7
|
+
data.tar.gz: 06de2fd33690b698d8bb7052f130a0f056c4dd6b0300bcec77dcfe353389634a7cce348450f6eb8ca9b83cde11d63a669d0b2188bd1dd35b18543a282bd85678
|
data/docker-compose.yml
CHANGED
|
@@ -20,9 +20,9 @@ class EasySettings::EnvSource
|
|
|
20
20
|
|
|
21
21
|
leaf = keys[0...-1].inject(data){ |h, key| h[key] ||= {} }
|
|
22
22
|
leaf[keys.last] = parse_values ? EasySettings::Coercion.new(value).run : value
|
|
23
|
-
rescue NoMethodError => e
|
|
24
|
-
raise "Invalid name converter: #{converter}"
|
|
25
23
|
end
|
|
26
24
|
end
|
|
25
|
+
rescue NoMethodError => e
|
|
26
|
+
raise "Invalid name converter: #{converter}"
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -23,9 +23,9 @@ class EasySettings::PathSource
|
|
|
23
23
|
|
|
24
24
|
leaf = keys[0...-1].inject(data){ |h, key| h[key] ||= {} }
|
|
25
25
|
leaf[keys.last] = parse_values ? EasySettings::Coercion.new(value).run : value
|
|
26
|
-
rescue NoMethodError => e
|
|
27
|
-
raise "Invalid name converter: #{converter}"
|
|
28
26
|
end
|
|
29
27
|
end
|
|
28
|
+
rescue NoMethodError => e
|
|
29
|
+
raise "Invalid name converter: #{converter}"
|
|
30
30
|
end
|
|
31
31
|
end
|
data/lib/easy-settings.rb
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
require "active_support"
|
|
2
|
+
require "active_support/core_ext/module/delegation"
|
|
3
|
+
|
|
1
4
|
require "easy-settings/version"
|
|
2
5
|
require "easy-settings/struct"
|
|
3
6
|
require "easy-settings/env_source"
|
|
@@ -7,7 +10,7 @@ require "easy-settings/yaml_source"
|
|
|
7
10
|
class EasySettings
|
|
8
11
|
delegate :respond_to?, to: :@data
|
|
9
12
|
|
|
10
|
-
def initialize(sources
|
|
13
|
+
def initialize(sources: [], fail_on_missing: true)
|
|
11
14
|
@sources = sources
|
|
12
15
|
@fail_on_missing = fail_on_missing
|
|
13
16
|
reload!
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: easy-settings
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Corin Langosch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-09-
|
|
11
|
+
date: 2019-09-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|