shiny_json_logic 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/shiny_json_logic/operations/var.rb +10 -5
- data/lib/shiny_json_logic/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: 89439d740d79b2411cc0cb2da6cd2c1cdd67bd111ecf299fd32371b42abef582
|
|
4
|
+
data.tar.gz: c7d33d66da1ed31df8f0606150068018dcec511a0cc379c9b3868fd1a727ecd2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c15e0957616af3f8f30a0bc037b36cb60dd434a0b7892eee54867b3be4b99cd499583a9490cb7306d2048a03fab0cb0c2cd8f73d8d50aedea11fefce190265c7
|
|
7
|
+
data.tar.gz: b25ac6fdd493db726ac75ae9b75536cd788deeafc9943afd2ab0cda31ba819b02769129772ff651254835cff555256219c4254ac37aabfb1df3b753ff3a2f89f
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.2.12] - 2026-02-09
|
|
6
|
+
### Changed
|
|
7
|
+
- Fixes access error in var when value is false (previously returned nil due to bug).
|
|
8
|
+
|
|
5
9
|
## [0.2.11] - 2026-02-09
|
|
6
10
|
### Changed
|
|
7
11
|
- Removes monkey patches in favour of isolated modules.
|
data/Gemfile.lock
CHANGED
|
@@ -11,7 +11,8 @@ module ShinyJsonLogic
|
|
|
11
11
|
|
|
12
12
|
return data if key.nil? || key == ""
|
|
13
13
|
|
|
14
|
-
fetch_value(data, key)
|
|
14
|
+
result = fetch_value(data, key)
|
|
15
|
+
result.nil? ? default : result
|
|
15
16
|
rescue
|
|
16
17
|
default || data
|
|
17
18
|
end
|
|
@@ -28,10 +29,14 @@ module ShinyJsonLogic
|
|
|
28
29
|
return nil if current.nil?
|
|
29
30
|
|
|
30
31
|
if current.is_a?(Hash)
|
|
31
|
-
#
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
# Check if key exists (string or symbol) and return value
|
|
33
|
+
if current.key?(k)
|
|
34
|
+
current[k]
|
|
35
|
+
elsif current.key?(k.to_sym)
|
|
36
|
+
current[k.to_sym]
|
|
37
|
+
else
|
|
38
|
+
nil
|
|
39
|
+
end
|
|
35
40
|
elsif current.is_a?(Array)
|
|
36
41
|
current[k.to_i]
|
|
37
42
|
else
|