json_logic_ruby 0.2.0 → 0.2.3

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: ca5319a17275ae6b07caa25ed7fb14f8e3a507ac83d19a44c6b8bbc61783ced0
4
- data.tar.gz: 1d728aecb2b1901441567e343c433ed45419b8da21dc6f070bdfb420a7a01609
3
+ metadata.gz: 331a993f35775659005673c1627c25e9a6a9fba1b6ae457d56643c0dd19ea3ce
4
+ data.tar.gz: 429fa17806f595566ec659c8209c60ed1cc74d7cdecafeaa10865a385ebb6b58
5
5
  SHA512:
6
- metadata.gz: 7d728d93db6bbda69b82bdb6915c1ff3cfe10f05ed5c0648d264b1b8ba287d115397abb3422beb0b852593ba7b476ac2f56c881a595f4b8a191d5f817b1a209e
7
- data.tar.gz: e5245e733f1d727a58467f2d23a301273934eed585bdfc92f87df8cabc4b102ebcaa5efc1cc4a785380c86198a545dd9669b1af9024a5791c387994d6e304a9b
6
+ metadata.gz: 5fb1dbd4b674963ff19754b60814e7a4ccf37db4bdb31b6d7a664ae0c48fc4244e7b4e2d87f3145a57b3d05d1f86b93ddc5feecd904b63b1efa8df4f4bd1a2b4
7
+ data.tar.gz: 5f8560cf10d8a22a86905913a111533a5b11d73d8e473525c33e624ee9fba99ecc36c1b06496547eaeec187557ec6eb9b30e6796da66c4463ec2f06410c5e5d8
@@ -96,7 +96,7 @@ module JsonLogic
96
96
  end
97
97
 
98
98
  if rules.is_a?(Hash)
99
- rules.each { |_, rule| fetch_var_values(rule, var_name, values) }
99
+ rules.each_value { |rule| fetch_var_values(rule, var_name, values) }
100
100
  return values
101
101
  end
102
102
 
@@ -134,7 +134,7 @@ module JsonLogic
134
134
  rescue TypeError
135
135
  data = data[key.to_i]
136
136
  end
137
- data || default_value
137
+ data.nil? ? default_value : data
138
138
  end
139
139
 
140
140
  # This method retrieves the variable name from a hash of rules based on the given operator.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JsonLogic
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_logic_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volodymyr Stashchenko
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-11-23 00:00:00.000000000 Z
12
+ date: 2024-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -27,7 +27,9 @@ dependencies:
27
27
  version: '7.0'
28
28
  description: Build complex rules, serialize them as JSON, and execute them in ruby.
29
29
  See https://jsonlogic.com
30
- email:
30
+ email:
31
+ - stashchenko@ukr.net
32
+ - savka.ai2015@gmail.com
31
33
  executables: []
32
34
  extensions: []
33
35
  extra_rdoc_files: []
@@ -39,7 +41,7 @@ files:
39
41
  - lib/json_logic/rule.rb
40
42
  - lib/json_logic/validator.rb
41
43
  - lib/json_logic/version.rb
42
- homepage: https://github.com/useful-libs/json_logic
44
+ homepage: https://github.com/useful-libs/json_logic_ruby
43
45
  licenses:
44
46
  - MIT
45
47
  metadata: