json_schemer 0.2.19 → 0.2.20

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: 4bb0fdef6cdd7303f21d0883f02ac24525274155cee95b0722e50d7ee43eb200
4
- data.tar.gz: 64872048d2466a7dfa262fc418244eaa34f179d3b2d8c9ba3a1a6a01c90086ab
3
+ metadata.gz: 79ed6f849e3328efd2414b4015f6e1d2d4d897d5aa97400fabf99f0dd5c2dbc5
4
+ data.tar.gz: e33eb4f20852cf54fd14d591d2a2cee7892ada8516477e78f605107eebc7a6c8
5
5
  SHA512:
6
- metadata.gz: 899ed69d44cfd6d588422df2b09278e492a753dc8858ef60ab61b074040dd88c89dc225223d610a57e3fa47938cf080dac8653021918705140cb7cfda740db7a
7
- data.tar.gz: f0e01692075e92a1efafabdebc2e0ee82a6b0d8d8445417f39962285e3678392ca81fc7111d4d121f022c3f2b458b35cd49c4e30d5595f5c7bb331a04e7bede6
6
+ metadata.gz: 611e3e327169b79b74adb979b00fd0e8124ac224c3971bb7f02dfc8040c17024720f4bd0308428eaa79c138c5ab461cb06ae9ea12b122ca4ed75ad0e396804bd
7
+ data.tar.gz: ee237ca11f77f20aa4d1dd7a1c192744019abfddcaeebaf5e1c0e63ebdf53eb15fc1a3c52a3f34af9bee41f868b28f0f2ae1e131476880d46177ad10be5c4ea8
@@ -6,7 +6,7 @@ jobs:
6
6
  fail-fast: false
7
7
  matrix:
8
8
  os: [ubuntu-latest, windows-latest, macos-latest]
9
- ruby: [2.4, 2.5, 2.6, 2.7, 3.0, head, jruby, jruby-head, truffleruby, truffleruby-head]
9
+ ruby: [2.4, 2.5, 2.6, 2.7, 3.0, 3.1, head, jruby, jruby-head, truffleruby, truffleruby-head]
10
10
  exclude:
11
11
  - os: windows-latest
12
12
  ruby: jruby
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- json_schemer (0.2.19)
4
+ json_schemer (0.2.20)
5
5
  ecma-re-validator (~> 0.3)
6
6
  hana (~> 1.3)
7
7
  regexp_parser (~> 2.0)
@@ -10,12 +10,12 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- ecma-re-validator (0.4.0)
14
- regexp_parser (~> 2.2)
13
+ ecma-re-validator (0.3.0)
14
+ regexp_parser (~> 2.0)
15
15
  hana (1.3.7)
16
16
  minitest (5.14.3)
17
17
  rake (13.0.1)
18
- regexp_parser (2.2.1)
18
+ regexp_parser (2.1.1)
19
19
  uri_template (0.7.0)
20
20
 
21
21
  PLATFORMS
@@ -355,8 +355,7 @@ module JSONSchemer
355
355
  validate_exclusive_minimum(instance, exclusive_minimum, minimum, &block) if exclusive_minimum
356
356
 
357
357
  if multiple_of
358
- quotient = data / multiple_of.to_f
359
- yield error(instance, 'multipleOf') unless quotient.floor == quotient
358
+ yield error(instance, 'multipleOf') unless BigDecimal(data.to_s).modulo(multiple_of).zero?
360
359
  end
361
360
  end
362
361
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module JSONSchemer
3
- VERSION = '0.2.19'
3
+ VERSION = '0.2.20'
4
4
  end
data/lib/json_schemer.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  require 'base64'
3
+ require 'bigdecimal'
3
4
  require 'ipaddr'
4
5
  require 'json'
5
6
  require 'net/http'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_schemer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.19
4
+ version: 0.2.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Harsha
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-02-18 00:00:00.000000000 Z
11
+ date: 2022-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,7 +108,7 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '2.0'
111
- description:
111
+ description:
112
112
  email:
113
113
  - davishmcclurg@gmail.com
114
114
  executables: []
@@ -138,7 +138,7 @@ homepage: https://github.com/davishmcclurg/json_schemer
138
138
  licenses:
139
139
  - MIT
140
140
  metadata: {}
141
- post_install_message:
141
+ post_install_message:
142
142
  rdoc_options: []
143
143
  require_paths:
144
144
  - lib
@@ -153,8 +153,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  requirements: []
156
- rubygems_version: 3.3.3
157
- signing_key:
156
+ rubygems_version: 3.1.4
157
+ signing_key:
158
158
  specification_version: 4
159
159
  summary: JSON Schema validator. Supports drafts 4, 6, and 7.
160
160
  test_files: []