shiny_json_logic 0.2.14 → 0.2.15
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/.github/workflows/compat.yml +2 -2
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +4 -5
- data/badges/compat.json +2 -2
- data/bin/test.sh +8 -67
- data/lib/shiny_json_logic/engine.rb +4 -1
- data/lib/shiny_json_logic/errors/base.rb +2 -0
- data/lib/shiny_json_logic/errors/invalid_arguments.rb +2 -0
- data/lib/shiny_json_logic/errors/not_a_number.rb +2 -0
- data/lib/shiny_json_logic/errors/unknown_operator.rb +2 -0
- data/lib/shiny_json_logic/numericals/min_max_collection.rb +2 -0
- data/lib/shiny_json_logic/numericals/numerify.rb +7 -4
- data/lib/shiny_json_logic/numericals/with_error_handling.rb +2 -0
- data/lib/shiny_json_logic/operations/addition.rb +2 -0
- data/lib/shiny_json_logic/operations/all.rb +2 -0
- data/lib/shiny_json_logic/operations/and.rb +2 -0
- data/lib/shiny_json_logic/operations/base.rb +3 -1
- data/lib/shiny_json_logic/operations/coalesce.rb +2 -0
- data/lib/shiny_json_logic/operations/concatenation.rb +2 -0
- data/lib/shiny_json_logic/operations/different.rb +2 -0
- data/lib/shiny_json_logic/operations/division.rb +2 -0
- data/lib/shiny_json_logic/operations/double_not.rb +2 -0
- data/lib/shiny_json_logic/operations/equal.rb +2 -0
- data/lib/shiny_json_logic/operations/exists.rb +2 -0
- data/lib/shiny_json_logic/operations/filter.rb +2 -0
- data/lib/shiny_json_logic/operations/greater.rb +2 -0
- data/lib/shiny_json_logic/operations/greater_equal.rb +2 -0
- data/lib/shiny_json_logic/operations/if.rb +2 -0
- data/lib/shiny_json_logic/operations/inclusion.rb +2 -0
- data/lib/shiny_json_logic/operations/iterable/base.rb +2 -0
- data/lib/shiny_json_logic/operations/map.rb +2 -0
- data/lib/shiny_json_logic/operations/max.rb +2 -0
- data/lib/shiny_json_logic/operations/merge.rb +2 -0
- data/lib/shiny_json_logic/operations/min.rb +2 -0
- data/lib/shiny_json_logic/operations/missing.rb +2 -0
- data/lib/shiny_json_logic/operations/missing_some.rb +2 -0
- data/lib/shiny_json_logic/operations/modulo.rb +2 -0
- data/lib/shiny_json_logic/operations/none.rb +2 -0
- data/lib/shiny_json_logic/operations/not.rb +2 -0
- data/lib/shiny_json_logic/operations/or.rb +2 -0
- data/lib/shiny_json_logic/operations/preserve.rb +2 -0
- data/lib/shiny_json_logic/operations/product.rb +2 -0
- data/lib/shiny_json_logic/operations/reduce.rb +2 -0
- data/lib/shiny_json_logic/operations/smaller.rb +2 -0
- data/lib/shiny_json_logic/operations/smaller_equal.rb +2 -0
- data/lib/shiny_json_logic/operations/some.rb +2 -0
- data/lib/shiny_json_logic/operations/strict_different.rb +2 -0
- data/lib/shiny_json_logic/operations/strict_equal.rb +2 -0
- data/lib/shiny_json_logic/operations/substring.rb +2 -0
- data/lib/shiny_json_logic/operations/subtraction.rb +2 -0
- data/lib/shiny_json_logic/operations/throw.rb +2 -0
- data/lib/shiny_json_logic/operations/try.rb +2 -0
- data/lib/shiny_json_logic/operations/val.rb +2 -0
- data/lib/shiny_json_logic/operations/var.rb +2 -0
- data/lib/shiny_json_logic/operator_solver.rb +51 -47
- data/lib/shiny_json_logic/truthy.rb +2 -0
- data/lib/shiny_json_logic/version.rb +3 -1
- data/lib/shiny_json_logic.rb +3 -1
- data/results/ruby.json +2 -2
- 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: ff0a154c1e7efab1b183eec02c91b413311ede5763a920563ff1e72eaac3aa2d
|
|
4
|
+
data.tar.gz: 51ec7875a3f873d33463b416d415b94b5cf495715ff451735d68e1f9e50a918d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 835be2a2c516c43edfe0c89736c68ca4792f12912e87d11b1325009e0ac1447ee5d94f4efcbe2adb3d1e53f01f22643b019e01b6874e8d743946faeb0c0911ce
|
|
7
|
+
data.tar.gz: a3e86add800f4dbde67e1c566e094209a3a9c9c32debaa1ed6101e62ce0188d01a356a3108752f708ea00ff6f5c49da911f964fda9b87400e73314e628874300
|
|
@@ -45,14 +45,14 @@ jobs:
|
|
|
45
45
|
cat > badges/compat.json <<EOF
|
|
46
46
|
{
|
|
47
47
|
"schemaVersion": 1,
|
|
48
|
-
"label": "
|
|
48
|
+
"label": "official tests",
|
|
49
49
|
"message": "${PCT}% (${PASSED}/${TOTAL})",
|
|
50
50
|
"color": "${COLOR}"
|
|
51
51
|
}
|
|
52
52
|
EOF
|
|
53
53
|
|
|
54
54
|
{
|
|
55
|
-
echo "## JSONLogic compatibility"
|
|
55
|
+
echo "## JSONLogic compatibility (official tests)"
|
|
56
56
|
echo ""
|
|
57
57
|
echo "- **${PCT}%** (${PASSED}/${TOTAL})"
|
|
58
58
|
echo "- exit code (ignored): ${exit_code:-0}"
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
|
+
## [0.2.15] - 2026-02-15
|
|
5
|
+
### Changed
|
|
6
|
+
- Refactors operation solvers to improve performance.
|
|
7
|
+
- Includes frozen string literals to optimize string handling.
|
|
8
|
+
- Stops relying in compat tables as a measure of validity.
|
|
4
9
|
|
|
5
10
|
## [0.2.14] - 2026-02-14
|
|
6
11
|
### Fixed
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -198,12 +198,11 @@ Error classes:
|
|
|
198
198
|
|
|
199
199
|
## Compatibility
|
|
200
200
|
|
|
201
|
-
Compatibility is measured against
|
|
201
|
+
Compatibility is measured against the official JSONLogic test suite (`json-logic/.github/tests`):
|
|
202
202
|
|
|
203
|
-
| Test Suite | Status |
|
|
204
|
-
|
|
205
|
-
| **
|
|
206
|
-
| **official tests** (`json-logic/.github/tests`) | 100% (601/601) | Official spec tests |
|
|
203
|
+
| Test Suite | Status |
|
|
204
|
+
|------------|--------|
|
|
205
|
+
| **Official tests** | 100% (601/601) |
|
|
207
206
|
|
|
208
207
|
See `badges/compat.json` for the exact numbers behind the badge.
|
|
209
208
|
|
data/badges/compat.json
CHANGED
data/bin/test.sh
CHANGED
|
@@ -5,12 +5,9 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
5
5
|
cd "$ROOT_DIR"
|
|
6
6
|
|
|
7
7
|
# Config
|
|
8
|
-
COMPAT_REF="${COMPAT_REF:-main}"
|
|
9
|
-
COMPAT_REPO="${COMPAT_REPO:-json-logic/compat-tables}"
|
|
10
8
|
OFFICIAL_REF="${OFFICIAL_REF:-main}"
|
|
11
9
|
OFFICIAL_REPO="${OFFICIAL_REPO:-json-logic/.github}"
|
|
12
10
|
TMP_DIR="${TMP_DIR:-$ROOT_DIR/tmp}"
|
|
13
|
-
SUITES_DIR="$TMP_DIR/compat-suites"
|
|
14
11
|
OFFICIAL_DIR="$TMP_DIR/official-tests"
|
|
15
12
|
|
|
16
13
|
# Helpers
|
|
@@ -19,27 +16,7 @@ log() { printf "\n\033[1m%s\033[0m\n" "$*"; }
|
|
|
19
16
|
log "Installing gems"
|
|
20
17
|
bundle install
|
|
21
18
|
|
|
22
|
-
# ----
|
|
23
|
-
# Download ONLY the suites folder from the compat-tables repo archive.
|
|
24
|
-
# This avoids a full git clone and works everywhere as long as curl+tar exist.
|
|
25
|
-
|
|
26
|
-
log "Fetching compat suites from GitHub: $COMPAT_REPO@$COMPAT_REF"
|
|
27
|
-
|
|
28
|
-
rm -rf "$SUITES_DIR"
|
|
29
|
-
mkdir -p "$SUITES_DIR"
|
|
30
|
-
|
|
31
|
-
ARCHIVE_URL="https://codeload.github.com/${COMPAT_REPO}/tar.gz/${COMPAT_REF}"
|
|
32
|
-
|
|
33
|
-
# Extract only: compat-tables-<ref>/suites -> tmp/compat-suites
|
|
34
|
-
# Different refs create different top-level folder names; we strip the first path component.
|
|
35
|
-
curl -fsSL "$ARCHIVE_URL" \
|
|
36
|
-
| tar -xz \
|
|
37
|
-
--strip-components=2 \
|
|
38
|
-
-C "$SUITES_DIR" \
|
|
39
|
-
"compat-tables-${COMPAT_REF}/suites" 2>/dev/null \
|
|
40
|
-
|
|
41
|
-
log "Compat suites ready at: $SUITES_DIR"
|
|
42
|
-
|
|
19
|
+
# ---- Official tests (json-logic/.github/tests) ----
|
|
43
20
|
log "Fetching official tests from GitHub: $OFFICIAL_REPO@$OFFICIAL_REF"
|
|
44
21
|
|
|
45
22
|
rm -rf "$OFFICIAL_DIR"
|
|
@@ -56,12 +33,12 @@ curl -fsSL "$OFFICIAL_URL" \
|
|
|
56
33
|
|
|
57
34
|
log "Official tests ready at: $OFFICIAL_DIR"
|
|
58
35
|
|
|
59
|
-
log "Running
|
|
60
|
-
|
|
36
|
+
log "Running official tests"
|
|
37
|
+
OFFICIAL_OUT="$TMP_DIR/official-rspec.out"
|
|
61
38
|
|
|
62
39
|
set +e
|
|
63
|
-
|
|
64
|
-
|
|
40
|
+
OFFICIAL_TESTS_DIR="$OFFICIAL_DIR" bundle exec rspec spec/official_spec.rb | tee "$OFFICIAL_OUT"
|
|
41
|
+
OFFICIAL_EXIT=${PIPESTATUS[0]}
|
|
65
42
|
set -e
|
|
66
43
|
|
|
67
44
|
# Parse totals from RSpec summary
|
|
@@ -70,14 +47,14 @@ TOTAL=$(ruby -e '
|
|
|
70
47
|
m = s.match(/(\d+)\s+examples?,\s+(\d+)\s+failures?/)
|
|
71
48
|
abort "Could not parse RSpec summary" unless m
|
|
72
49
|
puts m[1]
|
|
73
|
-
' < "$
|
|
50
|
+
' < "$OFFICIAL_OUT")
|
|
74
51
|
|
|
75
52
|
FAILURES=$(ruby -e '
|
|
76
53
|
s = STDIN.read
|
|
77
54
|
m = s.match(/(\d+)\s+examples?,\s+(\d+)\s+failures?/)
|
|
78
55
|
abort "Could not parse RSpec summary" unless m
|
|
79
56
|
puts m[2]
|
|
80
|
-
' < "$
|
|
57
|
+
' < "$OFFICIAL_OUT")
|
|
81
58
|
|
|
82
59
|
PASSED=$((TOTAL - FAILURES))
|
|
83
60
|
|
|
@@ -93,42 +70,6 @@ cat > results/ruby.json <<EOF
|
|
|
93
70
|
}
|
|
94
71
|
EOF
|
|
95
72
|
|
|
96
|
-
echo "Compat: ${PASSED}/${TOTAL} (failures: ${FAILURES}, exit: ${COMPAT_EXIT})"
|
|
97
|
-
|
|
98
|
-
# ---- Official tests (informational only, does not affect badge) ----
|
|
99
|
-
log "Running official tests (informational)"
|
|
100
|
-
OFFICIAL_OUT="$TMP_DIR/official-rspec.out"
|
|
101
|
-
|
|
102
|
-
set +e
|
|
103
|
-
OFFICIAL_TESTS_DIR="$OFFICIAL_DIR" bundle exec rspec spec/official_spec.rb | tee "$OFFICIAL_OUT"
|
|
104
|
-
OFFICIAL_EXIT=${PIPESTATUS[0]}
|
|
105
|
-
set -e
|
|
106
|
-
|
|
107
|
-
# Parse totals from RSpec summary
|
|
108
|
-
OFFICIAL_TOTAL=$(ruby -e '
|
|
109
|
-
s = STDIN.read
|
|
110
|
-
m = s.match(/(\d+)\s+examples?,\s+(\d+)\s+failures?/)
|
|
111
|
-
if m
|
|
112
|
-
puts m[1]
|
|
113
|
-
else
|
|
114
|
-
puts "0"
|
|
115
|
-
end
|
|
116
|
-
' < "$OFFICIAL_OUT")
|
|
117
|
-
|
|
118
|
-
OFFICIAL_FAILURES=$(ruby -e '
|
|
119
|
-
s = STDIN.read
|
|
120
|
-
m = s.match(/(\d+)\s+examples?,\s+(\d+)\s+failures?/)
|
|
121
|
-
if m
|
|
122
|
-
puts m[2]
|
|
123
|
-
else
|
|
124
|
-
puts "0"
|
|
125
|
-
end
|
|
126
|
-
' < "$OFFICIAL_OUT")
|
|
127
|
-
|
|
128
|
-
OFFICIAL_PASSED=$((OFFICIAL_TOTAL - OFFICIAL_FAILURES))
|
|
129
|
-
|
|
130
|
-
echo "Official: ${OFFICIAL_PASSED}/${OFFICIAL_TOTAL} (failures: ${OFFICIAL_FAILURES}, exit: ${OFFICIAL_EXIT})"
|
|
131
73
|
echo ""
|
|
132
74
|
echo "=== Summary ==="
|
|
133
|
-
echo "
|
|
134
|
-
echo "Official (info): ${OFFICIAL_PASSED}/${OFFICIAL_TOTAL}"
|
|
75
|
+
echo "Official: ${PASSED}/${TOTAL} (failures: ${FAILURES}, exit: ${OFFICIAL_EXIT})"
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require "shiny_json_logic/operator_solver"
|
|
2
4
|
|
|
3
5
|
module ShinyJsonLogic
|
|
@@ -13,6 +15,7 @@ module ShinyJsonLogic
|
|
|
13
15
|
|
|
14
16
|
operation, args = rule.to_a.first
|
|
15
17
|
operation_key = operation.to_s
|
|
18
|
+
|
|
16
19
|
return rule unless operations.key?(operation_key)
|
|
17
20
|
|
|
18
21
|
operations.fetch(operation_key).new(args, scope_stack).call
|
|
@@ -28,7 +31,7 @@ module ShinyJsonLogic
|
|
|
28
31
|
attr_reader :rule, :scope_stack
|
|
29
32
|
|
|
30
33
|
def operations
|
|
31
|
-
|
|
34
|
+
OperatorSolver::SOLVERS
|
|
32
35
|
end
|
|
33
36
|
end
|
|
34
37
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module ShinyJsonLogic
|
|
2
4
|
module Numericals
|
|
3
5
|
module Numerify
|
|
@@ -14,11 +16,12 @@ module ShinyJsonLogic
|
|
|
14
16
|
raise TypeError, "Cannot convert #{value.inspect} to a number"
|
|
15
17
|
end
|
|
16
18
|
|
|
19
|
+
# Regex to match valid numeric strings (integers, floats, scientific notation)
|
|
20
|
+
# Examples: "123", "-45.67", "+3.14", "1e10", "2.5E-3", ".5", "-.5"
|
|
21
|
+
NUMERIC_REGEX = /\A[+-]?(?:\d+\.?\d*|\d*\.?\d+)(?:[eE][+-]?\d+)?\z/
|
|
22
|
+
|
|
17
23
|
def numeric_string?(value)
|
|
18
|
-
|
|
19
|
-
true
|
|
20
|
-
rescue ArgumentError
|
|
21
|
-
false
|
|
24
|
+
NUMERIC_REGEX.match?(value)
|
|
22
25
|
end
|
|
23
26
|
end
|
|
24
27
|
end
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require "shiny_json_logic/truthy"
|
|
2
4
|
require "shiny_json_logic/utils/array"
|
|
3
5
|
|
|
@@ -53,7 +55,7 @@ module ShinyJsonLogic
|
|
|
53
55
|
def operation?(value)
|
|
54
56
|
return false unless value.is_a?(Hash) && !value.empty?
|
|
55
57
|
|
|
56
|
-
OperatorSolver.
|
|
58
|
+
OperatorSolver.operation?(value)
|
|
57
59
|
end
|
|
58
60
|
end
|
|
59
61
|
end
|
|
@@ -1,56 +1,60 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
Dir[File.join(__dir__, "operations/**/*.rb")].each do |file|
|
|
2
4
|
require file
|
|
3
5
|
end
|
|
4
6
|
|
|
5
7
|
module ShinyJsonLogic
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
module OperatorSolver
|
|
9
|
+
SOLVERS = {
|
|
10
|
+
"var" => Operations::Var,
|
|
11
|
+
"missing" => Operations::Missing,
|
|
12
|
+
"missing_some" => Operations::MissingSome,
|
|
13
|
+
"==" => Operations::Equal,
|
|
14
|
+
"===" => Operations::StrictEqual,
|
|
15
|
+
"!=" => Operations::Different,
|
|
16
|
+
"!==" => Operations::StrictDifferent,
|
|
17
|
+
">" => Operations::Greater,
|
|
18
|
+
">=" => Operations::GreaterEqual,
|
|
19
|
+
"<" => Operations::Smaller,
|
|
20
|
+
"<=" => Operations::SmallerEqual,
|
|
21
|
+
"!" => Operations::Not,
|
|
22
|
+
"or" => Operations::Or,
|
|
23
|
+
"and" => Operations::And,
|
|
24
|
+
"in" => Operations::Inclusion,
|
|
25
|
+
"cat" => Operations::Concatenation,
|
|
26
|
+
"%" => Operations::Modulo,
|
|
27
|
+
"max" => Operations::Max,
|
|
28
|
+
"min" => Operations::Min,
|
|
29
|
+
"+" => Operations::Addition,
|
|
30
|
+
"*" => Operations::Product,
|
|
31
|
+
"-" => Operations::Subtraction,
|
|
32
|
+
"/" => Operations::Division,
|
|
33
|
+
"substr" => Operations::Substring,
|
|
34
|
+
"merge" => Operations::Merge,
|
|
35
|
+
"!!" => Operations::DoubleNot,
|
|
36
|
+
"val" => Operations::Val,
|
|
37
|
+
"??" => Operations::Coalesce,
|
|
38
|
+
"exists" => Operations::Exists,
|
|
39
|
+
"throw" => Operations::Throw,
|
|
40
|
+
"try" => Operations::Try,
|
|
41
|
+
"if" => Operations::If,
|
|
42
|
+
"?:" => Operations::If,
|
|
43
|
+
"filter" => Operations::Filter,
|
|
44
|
+
"map" => Operations::Map,
|
|
45
|
+
"reduce" => Operations::Reduce,
|
|
46
|
+
"all" => Operations::All,
|
|
47
|
+
"none" => Operations::None,
|
|
48
|
+
"some" => Operations::Some,
|
|
49
|
+
"preserve" => Operations::Preserve,
|
|
50
|
+
}.freeze
|
|
51
|
+
|
|
52
|
+
def self.solvers
|
|
53
|
+
SOLVERS
|
|
9
54
|
end
|
|
10
55
|
|
|
11
|
-
def
|
|
12
|
-
|
|
13
|
-
"var" => Operations::Var,
|
|
14
|
-
"missing" => Operations::Missing,
|
|
15
|
-
"missing_some" => Operations::MissingSome,
|
|
16
|
-
"==" => Operations::Equal,
|
|
17
|
-
"===" => Operations::StrictEqual,
|
|
18
|
-
"!=" => Operations::Different,
|
|
19
|
-
"!==" => Operations::StrictDifferent,
|
|
20
|
-
">" => Operations::Greater,
|
|
21
|
-
">=" => Operations::GreaterEqual,
|
|
22
|
-
"<" => Operations::Smaller,
|
|
23
|
-
"<=" => Operations::SmallerEqual,
|
|
24
|
-
"!" => Operations::Not,
|
|
25
|
-
"or" => Operations::Or,
|
|
26
|
-
"and" => Operations::And,
|
|
27
|
-
"in" => Operations::Inclusion,
|
|
28
|
-
"cat" => Operations::Concatenation,
|
|
29
|
-
"%" => Operations::Modulo,
|
|
30
|
-
"max" => Operations::Max,
|
|
31
|
-
"min" => Operations::Min,
|
|
32
|
-
"+" => Operations::Addition,
|
|
33
|
-
"*" => Operations::Product,
|
|
34
|
-
"-" => Operations::Subtraction,
|
|
35
|
-
"/" => Operations::Division,
|
|
36
|
-
"substr" => Operations::Substring,
|
|
37
|
-
"merge" => Operations::Merge,
|
|
38
|
-
"!!" => Operations::DoubleNot,
|
|
39
|
-
"val" => Operations::Val,
|
|
40
|
-
"??" => Operations::Coalesce,
|
|
41
|
-
"exists" => Operations::Exists,
|
|
42
|
-
"throw" => Operations::Throw,
|
|
43
|
-
"try" => Operations::Try,
|
|
44
|
-
"if" => Operations::If,
|
|
45
|
-
"?:" => Operations::If,
|
|
46
|
-
"filter" => Operations::Filter,
|
|
47
|
-
"map" => Operations::Map,
|
|
48
|
-
"reduce" => Operations::Reduce,
|
|
49
|
-
"all" => Operations::All,
|
|
50
|
-
"none" => Operations::None,
|
|
51
|
-
"some" => Operations::Some,
|
|
52
|
-
"preserve" => Operations::Preserve,
|
|
53
|
-
}
|
|
56
|
+
def self.operation?(value)
|
|
57
|
+
value.keys.any? { |key| SOLVERS.key?(key.to_s) }
|
|
54
58
|
end
|
|
55
59
|
end
|
|
56
|
-
end
|
|
60
|
+
end
|
data/lib/shiny_json_logic.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require "shiny_json_logic/version"
|
|
2
4
|
require "shiny_json_logic/engine"
|
|
3
5
|
require "shiny_json_logic/errors/base"
|
|
@@ -30,7 +32,7 @@ module ShinyJsonLogic
|
|
|
30
32
|
operation, args = rule.first
|
|
31
33
|
|
|
32
34
|
# Check if operation is known
|
|
33
|
-
unless OperatorSolver.
|
|
35
|
+
unless OperatorSolver::SOLVERS.key?(operation.to_s)
|
|
34
36
|
raise Errors::UnknownOperator
|
|
35
37
|
end
|
|
36
38
|
|
data/results/ruby.json
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shiny_json_logic
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.15
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Luis Moyano
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02-
|
|
11
|
+
date: 2026-02-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|