activerecord_json_validator 1.2.0 → 2.1.0

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
- SHA1:
3
- metadata.gz: aefb212198c5482c5fcc13ac5617c07a0bf0ea0a
4
- data.tar.gz: c96cd0fc7fd5ee1206a820b368cc7b820d3ce240
2
+ SHA256:
3
+ metadata.gz: 4d73e408cd69522e53d830509f0a4772607eeee5b7a0102b25aea4a0e3f2fb62
4
+ data.tar.gz: 9f3b97d92b0c5f8a55608fdd590e906b576d00036c87cff151967392244b7ada
5
5
  SHA512:
6
- metadata.gz: 1f8335b9236577517e50934d4fb3cd356e64bcb07c70ffdb8fbed564e6abc35316a8aa6032eb07b914dd0f815cfbe86c11a317f79509bbe11a9b5fbb453f6ec6
7
- data.tar.gz: 044eb0b74afe8a73799dcbc3e5c4a4d30f4b723ff3548afa9f99a262993cf22ccef3319f4d21575ee5b99d8be82fc2c762243b3db69063cbf426df2df2209e42
6
+ metadata.gz: f2fcf0da7354630f8619d075988f904dbb8b61b977e2f2fdd87f2f29fc545d5aaf0a0331e57c5e8d2bce5eeef9913900392a3a2978f6df17dd840546b9a706ca
7
+ data.tar.gz: 7fd00e24032a036bccf04d1e9c677de07ae085ee7d46f658b8dcda0e2bc35d0cb0c263662b18c0fb86ed144eb3d248cfc213f9216641abae84d0c5afd9403675
data/.travis.yml CHANGED
@@ -1,15 +1,33 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.2.2
5
- - 2.3.1
4
+ - 2.4.6
5
+ - 2.6.3
6
+ - 2.7.5
6
7
 
7
8
  gemfile:
8
9
  - gemfiles/Gemfile.activerecord-4.2.x
9
10
  - gemfiles/Gemfile.activerecord-5.0.x
11
+ - gemfiles/Gemfile.activerecord-6.0.x
12
+ - gemfiles/Gemfile.activerecord-7.0.x
13
+
14
+ matrix:
15
+ exclude:
16
+ - gemfile: gemfiles/Gemfile.activerecord-6.0.x
17
+ rvm: 2.4.6
18
+ - gemfile: gemfiles/Gemfile.activerecord-7.0.x
19
+ rvm: 2.4.6
20
+ - gemfile: gemfiles/Gemfile.activerecord-7.0.x
21
+ rvm: 2.6.3
22
+ - gemfile: gemfiles/Gemfile.activerecord-4.2.x
23
+ rvm: 2.7.5
10
24
 
11
25
  sudo: false
12
26
 
27
+ services:
28
+ - mysql
29
+ - postgresql
30
+
13
31
  env:
14
32
  - DB_ADAPTER=mysql2
15
33
  - DB_ADAPTER=postgresql
@@ -21,6 +39,3 @@ before_script:
21
39
  script:
22
40
  - 'echo "Checking code style" && bundle exec phare'
23
41
  - 'echo "Running tests" && bundle exec rake spec'
24
-
25
- addons:
26
- postgresql: 9.3
data/Gemfile CHANGED
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
  gemspec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <p align="center">
2
2
  <a href="https://github.com/mirego/activerecord_json_validator">
3
- <img src="https://cloud.githubusercontent.com/assets/11348/6099354/cffcf35e-afc3-11e4-9a4d-d872941bbcf6.png" alt="" />
3
+ <img src="https://user-images.githubusercontent.com/11348/126779905-3468eb15-d554-46d5-925b-235f68169d86.png" alt="" />
4
4
  </a>
5
5
  <br />
6
6
  <code>ActiveRecord::JSONValidator</code> makes it easy to validate<br /> JSON attributes against a <a href="http://json-schema.org/">JSON schema</a>.
@@ -16,17 +16,19 @@
16
16
  Add this line to your application's Gemfile:
17
17
 
18
18
  ```ruby
19
- gem 'activerecord_json_validator'
19
+ gem 'activerecord_json_validator', '~> 2.0.0'
20
20
  ```
21
21
 
22
22
  ## Usage
23
23
 
24
24
  ### JSON Schema
25
25
 
26
+ Schemas should be a JSON file
27
+
26
28
  ```json
27
29
  {
28
30
  "type": "object",
29
- "$schema": "http://json-schema.org/draft-04/schema",
31
+ "$schema": "http://json-schema.org/draft-04/schema#",
30
32
  "properties": {
31
33
  "city": { "type": "string" },
32
34
  "country": { "type": "string" }
@@ -45,7 +47,7 @@ end
45
47
 
46
48
  class User < ActiveRecord::Base
47
49
  # Constants
48
- PROFILE_JSON_SCHEMA = Rails.root.join('config', 'schemas', 'profile.json_schema').to_s
50
+ PROFILE_JSON_SCHEMA = Pathname.new(Rails.root.join('config', 'schemas', 'profile.json'))
49
51
 
50
52
  # Validations
51
53
  validates :name, presence: true
@@ -65,17 +67,16 @@ user.profile_invalid_json # => '{invalid JSON":}'
65
67
 
66
68
  #### Options
67
69
 
68
- | Option | Description
69
- |------------|-----------------------------------------------------
70
- | `:schema` | The JSON schema to validate the data against (see **Schema** section)
71
- | `:message` | The ActiveRecord message added to the record errors (see **Message** section)
72
- | `:options` | A `Hash` of [`json-schema`](https://github.com/ruby-json-schema/json-schema)-supported options to pass to the validator
70
+ | Option | Description |
71
+ | ---------- | ------------------------------------------------------------------------------------------------------------------------------ |
72
+ | `:schema` | The JSON schema to validate the data against (see **Schema** section) |
73
+ | `:message` | The ActiveRecord message added to the record errors (see **Message** section) |
74
+ | `:options` | A `Hash` of [`json_schemer`](https://github.com/davishmcclurg/json_schemer#options)-supported options to pass to the validator |
73
75
 
74
76
  ##### Schema
75
77
 
76
- `ActiveRecord::JSONValidator` uses the `json-schema` gem to validate the JSON
77
- data against a JSON schema. You can use [any value](https://github.com/ruby-json-schema/json-schema/tree/master#usage) that
78
- `JSON::Validator.validate` would take as the `schema` argument.
78
+ `ActiveRecord::JSONValidator` uses the [json_schemer](https://github.com/davishmcclurg/json_schemer) gem to validate the JSON
79
+ data against a JSON schema.
79
80
 
80
81
  Additionally, you can use a `Symbol` or a `Proc`. Both will be executed in the
81
82
  context of the validated record (`Symbol` will be sent as a method and the
@@ -122,7 +123,7 @@ user.errors.full_messages
122
123
 
123
124
  ## License
124
125
 
125
- `ActiveRecord::JSONValidator` is © 2013-2016 [Mirego](http://www.mirego.com) and may be freely distributed under the [New BSD license](http://opensource.org/licenses/BSD-3-Clause). See the [`LICENSE.md`](https://github.com/mirego/activerecord_json_validator/blob/master/LICENSE.md) file.
126
+ `ActiveRecord::JSONValidator` is © 2013-2016 [Mirego](http://www.mirego.com) and may be freely distributed under the [New BSD license](http://opensource.org/licenses/BSD-3-Clause). See the [`LICENSE.md`](https://github.com/mirego/activerecord_json_validator/blob/master/LICENSE.md) file.
126
127
 
127
128
  The tree logo is based on [this lovely icon](http://thenounproject.com/term/tree/51004/) by [Sara Quintana](http://thenounproject.com/sara.quintana.75), from The Noun Project. Used under a [Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/) license.
128
129
 
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler'
2
4
  require 'rake'
3
5
  require 'bundler/gem_tasks'
@@ -12,7 +14,7 @@ end
12
14
 
13
15
  desc 'Start an IRB session with the gem'
14
16
  task :console do
15
- $LOAD_PATH.unshift File.expand_path('..', __FILE__)
17
+ $LOAD_PATH.unshift File.expand_path(__dir__)
16
18
  require 'activerecord_json_validator'
17
19
  require 'irb'
18
20
 
@@ -18,15 +18,15 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_development_dependency 'bundler', '~> 1.12'
21
+ spec.add_development_dependency 'bundler', '>= 1.12'
22
22
  spec.add_development_dependency 'rake'
23
23
  spec.add_development_dependency 'rspec', '~> 3.5'
24
24
  spec.add_development_dependency 'pg'
25
25
  spec.add_development_dependency 'mysql2'
26
- spec.add_development_dependency 'activesupport', '>= 4.2.0', '< 6'
26
+ spec.add_development_dependency 'activesupport', '>= 4.2.0', '< 8'
27
27
  spec.add_development_dependency 'phare'
28
28
  spec.add_development_dependency 'rubocop', '~> 0.28'
29
29
 
30
- spec.add_dependency 'json-schema', '~> 2.8'
31
- spec.add_dependency 'activerecord', '>= 4.2.0', '< 6'
30
+ spec.add_dependency 'json_schemer', '~> 0.2.18'
31
+ spec.add_dependency 'activerecord', '>= 4.2.0', '< 8'
32
32
  end
@@ -3,3 +3,4 @@ source 'https://rubygems.org'
3
3
  gemspec path: '../'
4
4
 
5
5
  gem 'activerecord', '~> 4.2'
6
+ gem 'pg', '~> 0.15'
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+
5
+ gem 'activerecord', '~> 6.0'
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+
5
+ gem 'activerecord', '~> 7.0.0.rc1'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class JsonValidator < ActiveModel::EachValidator
2
4
  def initialize(options)
3
5
  options.reverse_merge!(message: :invalid_json)
@@ -12,8 +14,8 @@ class JsonValidator < ActiveModel::EachValidator
12
14
 
13
15
  # Validate the JSON value with a JSON schema path or String
14
16
  def validate_each(record, attribute, value)
15
- # Validate value with JSON::Validator
16
- errors = ::JSON::Validator.fully_validate(schema(record), validatable_value(value), options.fetch(:options))
17
+ # Validate value with JSON Schemer
18
+ errors = JSONSchemer.schema(schema(record), **options.fetch(:options)).validate(value).to_a
17
19
 
18
20
  # Everything is good if we don’t have any errors and we got valid JSON value
19
21
  return if errors.empty? && record.send(:"#{attribute}_invalid_json").blank?
@@ -47,7 +49,7 @@ protected
47
49
  end
48
50
  end
49
51
 
50
- # Return a valid schema for JSON::Validator.fully_validate, recursively calling
52
+ # Return a valid schema, recursively calling
51
53
  # itself until it gets a non-Proc/non-Symbol value.
52
54
  def schema(record, schema = nil)
53
55
  schema ||= options.fetch(:schema)
@@ -59,11 +61,6 @@ protected
59
61
  end
60
62
  end
61
63
 
62
- def validatable_value(value)
63
- return value if value.is_a?(String)
64
- ::ActiveSupport::JSON.encode(value)
65
- end
66
-
67
64
  def message(errors)
68
65
  message = options.fetch(:message)
69
66
 
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveRecord
2
4
  module JSONValidator
3
- VERSION = '1.2.0'.freeze
5
+ VERSION = '2.1.0'
4
6
  end
5
7
  end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_record'
2
- require 'json-schema'
4
+ require 'json_schemer'
3
5
 
4
6
  require 'active_record/json_validator/version'
5
7
  require 'active_record/json_validator/validator'
@@ -1,106 +1,52 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # rubocop:disable Metrics/BlockLength
2
4
  require 'spec_helper'
3
5
 
4
6
  describe JsonValidator do
5
- describe :initialize do
6
- # NOTE: We do not explicitely call `JsonValidator.new` in the tests,
7
- # because we let Rails (ActiveModel::Validations) do that when we call
8
- # `validates … json: true` on the model.
9
- #
10
- # This allows us to test the constructor behavior when executed in
11
- # different Rails versions that do not pass the same arguments to it.
7
+ describe :validate_each do
12
8
  before do
13
9
  run_migration do
14
10
  create_table(:users, force: true) do |t|
15
- t.string :name
16
11
  t.text :data
17
12
  end
18
13
  end
19
14
 
20
15
  spawn_model 'User' do
16
+ schema = '
17
+ {
18
+ "type": "object",
19
+ "properties": {
20
+ "city": { "type": "string" },
21
+ "country": { "type": "string" }
22
+ },
23
+ "required": ["country"]
24
+ }
25
+ '
21
26
  serialize :data, JSON
22
- validates :data, json: true
23
- end
24
-
25
- record.data = data
26
- end
27
-
28
- let(:record) { User.new }
29
-
30
- context 'with valid JSON data' do
31
- let(:data) { 'What? This is not JSON at all.' }
32
- it { expect(record.data_invalid_json).to eql(data) }
33
- end
34
-
35
- context 'with invalid JSON data' do
36
- let(:data) { { foo: 'bar' } }
37
- it { expect(record.data_invalid_json).to be_nil }
38
- end
39
- end
40
-
41
- describe :validate_each do
42
- let(:validator) { JsonValidator.new(options) }
43
- let(:options) { { attributes: [attribute], options: { strict: true } } }
44
- let(:validate_each!) { validator.validate_each(record, attribute, value) }
45
-
46
- # Doubles
47
- let(:attribute) { double(:attribute, to_s: 'attribute_name') }
48
- let(:record) { double(:record, errors: record_errors) }
49
- let(:record_errors) { double(:errors) }
50
- let(:value) { double(:value) }
51
- let(:schema) { double(:schema) }
52
- let(:validatable_value) { double(:validatable_value) }
53
- let(:validator_errors) { double(:validator_errors) }
54
-
55
- before do
56
- expect(validator).to receive(:schema).with(record).and_return(schema)
57
- expect(validator).to receive(:validatable_value).with(value).and_return(validatable_value)
58
- expect(::JSON::Validator).to receive(:fully_validate).with(schema, validatable_value, options[:options]).and_return(validator_errors)
59
- end
60
-
61
- context 'with JSON::Validator errors' do
62
- before do
63
- expect(validator_errors).to receive(:empty?).and_return(false)
64
- expect(record).not_to receive(:"#{attribute}_invalid_json")
65
- expect(record_errors).to receive(:add).with(attribute, options[:message], value: value)
27
+ validates :data, json: { schema: schema, message: ->(errors) { errors.map { |error| error['details'].to_a.flatten.join(' ') } } }
66
28
  end
67
-
68
- specify { validate_each! }
69
29
  end
70
30
 
71
- context 'without JSON::Validator errors but with invalid JSON data' do
72
- before do
73
- expect(validator_errors).to receive(:empty?).and_return(true)
74
- expect(record).to receive(:"#{attribute}_invalid_json").and_return('foo"{]')
75
- expect(record_errors).to receive(:add).with(attribute, options[:message], value: value)
76
- end
31
+ context 'with valid JSON data but schema errors' do
32
+ let(:user) { User.new(data: '{"city":"Quebec City"}') }
77
33
 
78
- specify { validate_each! }
79
- end
80
-
81
- context 'without JSON::Validator errors and valid JSON data' do
82
- before do
83
- expect(validator_errors).to receive(:empty?).and_return(true)
84
- expect(record).to receive(:"#{attribute}_invalid_json").and_return(nil)
85
- expect(record_errors).not_to receive(:add)
34
+ specify do
35
+ expect(user).not_to be_valid
36
+ expect(user.errors.full_messages).to eql(['Data missing_keys country'])
37
+ expect(user.data).to eql({ 'city' => 'Quebec City' })
38
+ expect(user.data_invalid_json).to be_nil
86
39
  end
87
-
88
- specify { validate_each! }
89
40
  end
90
41
 
91
- context 'with multiple error messages' do
92
- let(:options) { { attributes: [attribute], message: message, options: { strict: true } } }
93
- let(:message) { ->(errors) { errors.to_a } }
42
+ context 'with invalid JSON data' do
43
+ let(:data) { 'What? This is not JSON at all.' }
44
+ let(:user) { User.new(data: data) }
94
45
 
95
- before do
96
- expect(validator_errors).to receive(:empty?).and_return(false)
97
- expect(validator_errors).to receive(:to_a).and_return(%i(first_error second_error))
98
- expect(record).not_to receive(:"#{attribute}_invalid_json")
99
- expect(record_errors).to receive(:add).with(attribute, :first_error, value: value)
100
- expect(record_errors).to receive(:add).with(attribute, :second_error, value: value)
46
+ specify do
47
+ expect(user.data_invalid_json).to eql(data)
48
+ expect(user.data).to eql({})
101
49
  end
102
-
103
- specify { validate_each! }
104
50
  end
105
51
  end
106
52
 
@@ -153,27 +99,11 @@ describe JsonValidator do
153
99
  end
154
100
  end
155
101
 
156
- describe :validatable_value do
157
- let(:validator) { JsonValidator.new(options) }
158
- let(:options) { { attributes: [:foo] } }
159
- let(:validatable_value) { validator.send(:validatable_value, value) }
160
-
161
- context 'with non-String value' do
162
- let(:value) { { foo: 'bar' } }
163
- it { expect(validatable_value).to eql('{"foo":"bar"}') }
164
- end
165
-
166
- context 'with String value' do
167
- let(:value) { '{\"foo\":\"bar\"}' }
168
- it { expect(validatable_value).to eql(value) }
169
- end
170
- end
171
-
172
102
  describe :message do
173
103
  let(:validator) { JsonValidator.new(options) }
174
104
  let(:options) { { attributes: [:foo], message: message_option } }
175
105
  let(:message) { validator.send(:message, errors) }
176
- let(:errors) { %i(first_error second_error) }
106
+ let(:errors) { %i[first_error second_error] }
177
107
 
178
108
  context 'with Symbol message' do
179
109
  let(:message_option) { :invalid_json }
@@ -182,7 +112,7 @@ describe JsonValidator do
182
112
 
183
113
  context 'with String value' do
184
114
  let(:message_option) { ->(errors) { errors } }
185
- it { expect(message).to eql(%i(first_error second_error)) }
115
+ it { expect(message).to eql(%i[first_error second_error]) }
186
116
  end
187
117
  end
188
118
  end
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,6 @@
1
- $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.unshift File.expand_path('lib', __dir__)
2
4
 
3
5
  require 'active_support/all'
4
6
  require 'rspec'
@@ -8,7 +10,7 @@ require 'pg'
8
10
  require 'activerecord_json_validator'
9
11
 
10
12
  # Require our macros and extensions
11
- Dir[File.expand_path('../../spec/support/macros/**/*.rb', __FILE__)].map(&method(:require))
13
+ Dir[File.expand_path('../spec/support/macros/**/*.rb', __dir__)].map(&method(:require))
12
14
 
13
15
  RSpec.configure do |config|
14
16
  # Include our macros
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class DatabaseAdapter
2
4
  def initialize(opts = {})
3
5
  @database = opts[:database]
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'database_adapter'
2
4
 
3
5
  class Mysql2Adapter < DatabaseAdapter
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'database_adapter'
2
4
 
3
5
  class PostgresqlAdapter < DatabaseAdapter
@@ -1,8 +1,16 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module DatabaseMacros
2
4
  # Run migrations in the test database
3
5
  def run_migration(&block)
6
+ migration_class = if ActiveRecord::Migration.respond_to?(:[])
7
+ ActiveRecord::Migration[4.2]
8
+ else
9
+ ActiveRecord::Migration
10
+ end
11
+
4
12
  # Create a new migration class
5
- klass = Class.new(ActiveRecord::Migration)
13
+ klass = Class.new(migration_class)
6
14
 
7
15
  # Create a new `up` that executes the argument
8
16
  klass.send(:define_method, :up) { instance_exec(&block) }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ModelMacros
2
4
  # Create a new model class
3
5
  def spawn_model(klass_name, parent_klass = ActiveRecord::Base, &block)
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_json_validator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rémi Prévost
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-08 00:00:00.000000000 Z
11
+ date: 2021-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.12'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.12'
27
27
  - !ruby/object:Gem::Dependency
@@ -89,7 +89,7 @@ dependencies:
89
89
  version: 4.2.0
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
- version: '6'
92
+ version: '8'
93
93
  type: :development
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
@@ -99,7 +99,7 @@ dependencies:
99
99
  version: 4.2.0
100
100
  - - "<"
101
101
  - !ruby/object:Gem::Version
102
- version: '6'
102
+ version: '8'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: phare
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -129,19 +129,19 @@ dependencies:
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0.28'
131
131
  - !ruby/object:Gem::Dependency
132
- name: json-schema
132
+ name: json_schemer
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: '2.8'
137
+ version: 0.2.18
138
138
  type: :runtime
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: '2.8'
144
+ version: 0.2.18
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: activerecord
147
147
  requirement: !ruby/object:Gem::Requirement
@@ -151,7 +151,7 @@ dependencies:
151
151
  version: 4.2.0
152
152
  - - "<"
153
153
  - !ruby/object:Gem::Version
154
- version: '6'
154
+ version: '8'
155
155
  type: :runtime
156
156
  prerelease: false
157
157
  version_requirements: !ruby/object:Gem::Requirement
@@ -161,7 +161,7 @@ dependencies:
161
161
  version: 4.2.0
162
162
  - - "<"
163
163
  - !ruby/object:Gem::Version
164
- version: '6'
164
+ version: '8'
165
165
  description: ActiveRecord::JSONValidator makes it easy to validate JSON attributes
166
166
  with a JSON schema.
167
167
  email:
@@ -181,6 +181,8 @@ files:
181
181
  - activerecord_json_validator.gemspec
182
182
  - gemfiles/Gemfile.activerecord-4.2.x
183
183
  - gemfiles/Gemfile.activerecord-5.0.x
184
+ - gemfiles/Gemfile.activerecord-6.0.x
185
+ - gemfiles/Gemfile.activerecord-7.0.x
184
186
  - lib/active_record/json_validator/validator.rb
185
187
  - lib/active_record/json_validator/version.rb
186
188
  - lib/activerecord_json_validator.rb
@@ -210,8 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
212
  - !ruby/object:Gem::Version
211
213
  version: '0'
212
214
  requirements: []
213
- rubyforge_project:
214
- rubygems_version: 2.6.8
215
+ rubygems_version: 3.1.6
215
216
  signing_key:
216
217
  specification_version: 4
217
218
  summary: ActiveRecord::JSONValidator makes it easy to validate JSON attributes with