jsoncfg 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jsoncfg.rb +6 -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: 10dd9edade04ab7d07c57520c43ad61e228f017ec62ec87ff511957c08b3f188
|
4
|
+
data.tar.gz: 9e28b89de1165d66a297e197f5079c46fa6bccdd0129f853ba951dd5cfa1a9c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfb17d2a39a6af7babd42b269f4cac6834337b0a3e1208d2d26dccdbe582d7eb486e2b1f6a9269aec0e481734b1a7fde6994886bd4e2ac6fd81953c872dcd3e1
|
7
|
+
data.tar.gz: 376aed23c27b3231ad087084dec1337f165bdaee8539b3ec1a32b229da160a9504093ecfdced28c977b0d5100e4b2da16ad3f21679dced5784f77678bafd643f
|
data/lib/jsoncfg.rb
CHANGED
@@ -18,7 +18,12 @@ class JSONConfig
|
|
18
18
|
|
19
19
|
def add_key(key)
|
20
20
|
define_method "#{key}?" do
|
21
|
-
return
|
21
|
+
return false if @config[key].nil?
|
22
|
+
begin
|
23
|
+
return !@config[key].empty?
|
24
|
+
rescue
|
25
|
+
return true
|
26
|
+
end
|
22
27
|
end
|
23
28
|
define_method "get_#{key}" do
|
24
29
|
return get(key)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsoncfg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Whittaker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|