canfig 0.0.13 → 0.0.14

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
  SHA256:
3
- metadata.gz: 1a5e786da847f0b3b9f6c70578bcdb948f11d59bb7eab3a403ac7c4a900505a8
4
- data.tar.gz: 21fa40cda7709f79b6604ea3f8883b84aa1f62f8e8b1bc3a73f5f415a5d4788a
3
+ metadata.gz: f5cf1818dc05ca85705475f4f667a025716f351f6c846b17ad2ca8d71ca94967
4
+ data.tar.gz: 0b94d7c75bbb9e4cb443ee07094881af53b42dca689c5373fc28b04fb76f5fd9
5
5
  SHA512:
6
- metadata.gz: 2fa3db95500d7b55fe6ceedfda1fa3467b6a6bdf212af67f5fda28fb98155d1522a4dad858165d1d3b58695c083df212a533336646dd2dc5aaa9162a666067d0
7
- data.tar.gz: a80a8e1010ee71fd2bdded9c3c661552be8f887eb8a051711204fee0539725f19f484f1e6610224f6b9ac5ad33b4c2ea997e2bca2b3778edcdac40ddd82c4562
6
+ metadata.gz: c07a4de23a58dffad06507b3dcadbae8c5ba77b24ab841a98ce1064c37b1caf55726502c9ca2d4abeab8ce753b7869b9aea52c316ce5309a972d15673ea973e3
7
+ data.tar.gz: 3e7ac47e76ece7eb4311fbca9b3786ba445a6ed59b4e520aaaf44350f567c5c420762f7770bd2dc78e9d8f5a43c614d154ed9a6c37bf3a56305a649cd881f4bb
@@ -40,7 +40,9 @@ module Canfig
40
40
  @state[key] ||= begin
41
41
  val = ENV.fetch(key.to_s.underscore.upcase, default, &block)
42
42
  val = default if val.blank?
43
- val && ENV.key?(val.to_s) ? env(val, default, &block) : val
43
+ val = env(val, default, &block) if val && ENV.key?(val.to_s)
44
+ val = eval(val) if val == 'true' || val == 'false'
45
+ val
44
46
  end
45
47
  end
46
48
 
@@ -18,7 +18,9 @@ module Canfig
18
18
  key = key.gsub(/^#{namespace}/, '') if namespace
19
19
  val = ENV.fetch("#{namespace}#{key}", default, &block)
20
20
  val = default if val.blank?
21
- val && ENV.key?(val.to_s) ? env(val, default, &block) : val
21
+ val = env(val, default, &block) if val && ENV.key?(val.to_s)
22
+ val = eval(val) if val == 'true' || val == 'false'
23
+ val
22
24
  end
23
25
  end
24
26
 
@@ -1,3 +1,3 @@
1
1
  module Canfig
2
- VERSION = '0.0.13'
2
+ VERSION = '0.0.14'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canfig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rebec
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-31 00:00:00.000000000 Z
11
+ date: 2021-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport