jsoncfg 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jsoncfg.rb +6 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62417306da4c75b321783b383d516f868c73c26a9035fba139169fdd6a49004a
4
- data.tar.gz: 48476e31d69d8731c5dd6b20ef2d2b3130e086f6f5a6f31d890dcf9134b35d6f
3
+ metadata.gz: 10dd9edade04ab7d07c57520c43ad61e228f017ec62ec87ff511957c08b3f188
4
+ data.tar.gz: 9e28b89de1165d66a297e197f5079c46fa6bccdd0129f853ba951dd5cfa1a9c7
5
5
  SHA512:
6
- metadata.gz: b574084bea3c28b09e45aeb11d18a26edc8cfcfbe75732c432b7abc47dd1b16532517259754da61fba2d4f033a13623a0a2fe8a50371d82cdf94770afc61dd93
7
- data.tar.gz: 12774c0ee0c4c9cb991996b19d2a1a8f8d910b01998fd305cfb0b81ed90d497e10104c98399a29cdc579fa876117421a9ed9977871e39aff7ececf19650127f8
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 !@config[key].nil?
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
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-07 00:00:00.000000000 Z
11
+ date: 2019-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake