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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6c51d139183162260ba3b85195e9e8854da441bedad9ca5753785d2a781b9d4
4
- data.tar.gz: 499f7e445cb8aadebb2397781c36b09722b688ee955994002963e38a0ce64b78
3
+ metadata.gz: 89439d740d79b2411cc0cb2da6cd2c1cdd67bd111ecf299fd32371b42abef582
4
+ data.tar.gz: c7d33d66da1ed31df8f0606150068018dcec511a0cc379c9b3868fd1a727ecd2
5
5
  SHA512:
6
- metadata.gz: 5723ddd51acda1014b43b9f84e4ce2054a7b9fc1ea6e86fecc7d30742bd8b6f51309d7d220f15a7546713a151be503977cc7452bac1953a08c21fd6efbd9d285
7
- data.tar.gz: bd2182abf594716ee39c4b892dae1079969f5d49402c258ad136d8b935460f9cd88d924dc6ffb8aa9336328578157f34eddbd04dc4ce8b7310c91cd4fbd18f48
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shiny_json_logic (0.2.11)
4
+ shiny_json_logic (0.2.12)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -11,7 +11,8 @@ module ShinyJsonLogic
11
11
 
12
12
  return data if key.nil? || key == ""
13
13
 
14
- fetch_value(data, key) || default
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
- # Try string key first, then symbol key for indifferent access
32
- result = current[k]
33
- result = current[k.to_sym] if result.nil? && !current.key?(k)
34
- result
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
@@ -1,3 +1,3 @@
1
1
  module ShinyJsonLogic
2
- VERSION = "0.2.11"
2
+ VERSION = "0.2.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shiny_json_logic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Moyano