canfig 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/canfig/config.rb +1 -0
- data/lib/canfig/env_config.rb +1 -0
- data/lib/canfig/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a5e786da847f0b3b9f6c70578bcdb948f11d59bb7eab3a403ac7c4a900505a8
|
4
|
+
data.tar.gz: 21fa40cda7709f79b6604ea3f8883b84aa1f62f8e8b1bc3a73f5f415a5d4788a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fa3db95500d7b55fe6ceedfda1fa3467b6a6bdf212af67f5fda28fb98155d1522a4dad858165d1d3b58695c083df212a533336646dd2dc5aaa9162a666067d0
|
7
|
+
data.tar.gz: a80a8e1010ee71fd2bdded9c3c661552be8f887eb8a051711204fee0539725f19f484f1e6610224f6b9ac5ad33b4c2ea997e2bca2b3778edcdac40ddd82c4562
|
data/lib/canfig/config.rb
CHANGED
data/lib/canfig/env_config.rb
CHANGED
@@ -17,6 +17,7 @@ module Canfig
|
|
17
17
|
key = key.to_s.underscore.upcase
|
18
18
|
key = key.gsub(/^#{namespace}/, '') if namespace
|
19
19
|
val = ENV.fetch("#{namespace}#{key}", default, &block)
|
20
|
+
val = default if val.blank?
|
20
21
|
val && ENV.key?(val.to_s) ? env(val, default, &block) : val
|
21
22
|
end
|
22
23
|
end
|
data/lib/canfig/version.rb
CHANGED