shiny_json_logic 0.2.1 → 0.2.2
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/badges/compat.json +1 -1
- data/lib/shiny_json_logic/numericals/with_error_handling.rb +7 -0
- data/lib/shiny_json_logic/operations/division.rb +0 -7
- data/lib/shiny_json_logic/operations/modulo.rb +5 -1
- data/lib/shiny_json_logic/version.rb +1 -1
- data/results/ruby.json +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: ff4b2cb52b4896163788f2bb7b463a8d56df09f962be45a98264e3944ca4f505
|
|
4
|
+
data.tar.gz: b77fd0016b591540e980bc28f5887a89f07b8d2b232d3485bf20c20a4ccd19a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 59d457440b77bcd7a02ed0fbd4bd8f147e14537b0308e29ff299a8875706eb6764152eeb247f4eb947033cc18adfca88b542817e72df1f0e8b2333272a899dd2
|
|
7
|
+
data.tar.gz: c153f940a1f9b99e329b51215ba62563bc6ac6191bc80175a84d262e63c531dcf32bfb9488008e52af5a6ac3398710ea7b66042f0e34bdcc476bff5b63c0db15
|
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
|
+
## [0.2.2] - 2026-02-02
|
|
5
|
+
### Changed
|
|
6
|
+
- Improves compatibility of modulo operator
|
|
7
|
+
|
|
4
8
|
## [0.2.1] - 2026-02-02
|
|
5
9
|
### Changed
|
|
6
10
|
- Improves compatibility of subtraction operator
|
data/Gemfile.lock
CHANGED
data/badges/compat.json
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
require "shiny_json_logic/operations/base"
|
|
2
2
|
require "shiny_json_logic/numericals/with_error_handling"
|
|
3
|
+
require "shiny_json_logic/numericals/numerify"
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
module ShinyJsonLogic
|
|
6
7
|
module Operations
|
|
7
8
|
class Modulo < Base
|
|
8
9
|
include Numericals::WithErrorHandling
|
|
10
|
+
include Numericals::Numerify
|
|
9
11
|
|
|
10
12
|
protected
|
|
11
13
|
|
|
12
14
|
def run
|
|
15
|
+
return handle_no_operators if rules.size < 2
|
|
16
|
+
|
|
13
17
|
safe_arithmetic do
|
|
14
|
-
|
|
18
|
+
numerified.reduce { |a, b| a.remainder(b) }
|
|
15
19
|
end
|
|
16
20
|
end
|
|
17
21
|
end
|
data/results/ruby.json
CHANGED