ransack 2.4.1 → 2.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/cronjob.yml +105 -0
  3. data/.github/workflows/rubocop.yml +20 -0
  4. data/.github/workflows/test.yml +37 -3
  5. data/.rubocop.yml +44 -0
  6. data/CHANGELOG.md +4 -3
  7. data/CONTRIBUTING.md +2 -2
  8. data/Gemfile +4 -2
  9. data/bug_report_templates/test-ransack-scope-and-column-same-name.rb +78 -0
  10. data/bug_report_templates/test-ransacker-arel-present-predicate.rb +71 -0
  11. data/docs/img/create_release.png +0 -0
  12. data/docs/release_process.md +20 -0
  13. data/lib/polyamorous/activerecord_6.2_ruby_2/join_association.rb +1 -0
  14. data/lib/polyamorous/activerecord_6.2_ruby_2/join_dependency.rb +1 -0
  15. data/lib/polyamorous/activerecord_6.2_ruby_2/reflection.rb +1 -0
  16. data/lib/polyamorous/polyamorous.rb +1 -1
  17. data/lib/ransack.rb +2 -2
  18. data/lib/ransack/adapters/active_record/context.rb +3 -3
  19. data/lib/ransack/adapters/active_record/ransack/constants.rb +1 -1
  20. data/lib/ransack/constants.rb +2 -3
  21. data/lib/ransack/helpers.rb +1 -1
  22. data/lib/ransack/helpers/form_builder.rb +3 -3
  23. data/lib/ransack/nodes/attribute.rb +1 -1
  24. data/lib/ransack/nodes/condition.rb +0 -2
  25. data/lib/ransack/nodes/sort.rb +1 -1
  26. data/lib/ransack/nodes/value.rb +1 -1
  27. data/lib/ransack/version.rb +1 -1
  28. data/ransack.gemspec +4 -3
  29. data/spec/blueprints/articles.rb +1 -1
  30. data/spec/blueprints/comments.rb +1 -1
  31. data/spec/blueprints/notes.rb +1 -1
  32. data/spec/blueprints/tags.rb +1 -1
  33. data/spec/console.rb +5 -5
  34. data/spec/helpers/ransack_helper.rb +1 -1
  35. data/spec/ransack/adapters/active_record/base_spec.rb +2 -3
  36. data/spec/ransack/adapters/active_record/context_spec.rb +1 -2
  37. data/spec/ransack/helpers/form_helper_spec.rb +16 -16
  38. data/spec/ransack/nodes/grouping_spec.rb +2 -2
  39. data/spec/ransack/predicate_spec.rb +1 -1
  40. data/spec/spec_helper.rb +7 -6
  41. data/spec/support/schema.rb +0 -2
  42. metadata +13 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2c8153add4e8f7cc4123bb1c6b7f8b6f4db1fdbb65c2d8498a61ef7fc98eea53
4
- data.tar.gz: 1bae6d37282b621109534060b7c32ecbff7c02366cff88d271d48607ca6fd4cb
3
+ metadata.gz: a7e53f2a86ba264e751c3311254c7cb4b25efdb0c876310835b6f6221ab24928
4
+ data.tar.gz: 161ca5255a24fa42c63d6afbbf38e518581189db773e7e43940b31b1b8d86850
5
5
  SHA512:
6
- metadata.gz: ec86fcdc8b81a73c77f3da4e3e9eb2ce7480cae4ce948d64c55d5514d836474fe0c60c727be5d1bca39814afdc96c8bd997e2d245d557689badea217fce67f92
7
- data.tar.gz: 6526a66311015b73c4132d7c1b95b2006526cf929c47cb5aec91fc79287f07eb0df85a47d22e47d2b88547796501ce8ecb57c81c044e0113f716e45e516b151d
6
+ metadata.gz: 17c4701dbf3523dfa16feae0dd0dddc8bd077237d7e695eb69664f1b9c5ab5e2fea4a59b5878fe8e607b135ea834f12284f03c42a9ce2971f2f9c9b65d347205
7
+ data.tar.gz: 4c9d09980609ffc43bc505a947781b9fcdc97efb7897c3bbc3278d8391ab219e4fdffd8a813272a3af7403eefc162fddb6f9f379b713894d3951ff2fc7a141f3
@@ -0,0 +1,105 @@
1
+ name: cronjob
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 0 * * *"
6
+
7
+ jobs:
8
+ sqlite3:
9
+ runs-on: ubuntu-20.04
10
+ strategy:
11
+ fail-fast: false
12
+ matrix:
13
+ ruby:
14
+ - 3.0.0
15
+ - 2.7.2
16
+ - 2.6.6
17
+ env:
18
+ DB: sqlite3
19
+ RAILS: main
20
+ steps:
21
+ - uses: actions/checkout@v2
22
+ - name: Set up Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: ${{ matrix.ruby }}
26
+ - name: Install dependencies
27
+ run: bundle install
28
+ - name: Run tests
29
+ run: bundle exec rspec
30
+
31
+ mysql:
32
+ runs-on: ubuntu-20.04
33
+ strategy:
34
+ fail-fast: false
35
+ matrix:
36
+ ruby:
37
+ - 3.0.0
38
+ - 2.7.2
39
+ - 2.6.6
40
+ env:
41
+ DB: mysql
42
+ RAILS: main
43
+ MYSQL_USERNAME: root
44
+ MYSQL_PASSWORD: root
45
+ steps:
46
+ - uses: actions/checkout@v2
47
+ - name: Set up Ruby
48
+ uses: ruby/setup-ruby@v1
49
+ with:
50
+ ruby-version: ${{ matrix.ruby }}
51
+ - name: Startup MySQL
52
+ run: |
53
+ sudo systemctl start mysql.service
54
+ - name: Setup databases
55
+ run: |
56
+ mysql --user=root --password=root --host=127.0.0.1 -e 'create database ransack collate utf8_general_ci;';
57
+ mysql --user=root --password=root --host=127.0.0.1 -e 'use ransack;show variables like "%character%";show variables like "%collation%";';
58
+ - name: Install dependencies
59
+ run: bundle install
60
+ - name: Run tests
61
+ run: bundle exec rspec
62
+
63
+ postgres:
64
+ runs-on: ubuntu-20.04
65
+ strategy:
66
+ fail-fast: false
67
+ matrix:
68
+ ruby:
69
+ - 3.0.0
70
+ - 2.7.2
71
+ - 2.6.6
72
+ env:
73
+ DB: postgres
74
+ RAILS: main
75
+ DATABASE_USERNAME: postgres
76
+ DATABASE_PASSWORD: postgres
77
+ DATABASE_HOST: 127.0.0.1
78
+ services:
79
+ postgres:
80
+ image: postgres
81
+ ports:
82
+ - 5432:5432
83
+ env:
84
+ POSTGRES_PASSWORD: postgres
85
+ POSTGRES_HOST_AUTH_METHOD: trust
86
+ # Set health checks to wait until postgres has started
87
+ options: >-
88
+ --health-cmd pg_isready
89
+ --health-interval 10s
90
+ --health-timeout 5s
91
+ --health-retries 5
92
+
93
+ steps:
94
+ - uses: actions/checkout@v2
95
+ - name: Set up Ruby
96
+ uses: ruby/setup-ruby@v1
97
+ with:
98
+ ruby-version: ${{ matrix.ruby }}
99
+ - name: Setup databases
100
+ run: |
101
+ psql -h localhost -p 5432 -W postgres -c 'create database ransack;' -U postgres;
102
+ - name: Install dependencies
103
+ run: bundle install
104
+ - name: Run tests
105
+ run: bundle exec rspec
@@ -0,0 +1,20 @@
1
+ name: rubocop
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-20.04
10
+
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - name: Set up Ruby
14
+ uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: 3.0.0
17
+ - name: Install gems
18
+ run: bundle install --jobs 4 --retry 3
19
+ - name: Run RuboCop
20
+ run: bundle exec rubocop --parallel
@@ -11,14 +11,20 @@ jobs:
11
11
  fail-fast: false
12
12
  matrix:
13
13
  rails:
14
- - v6.1.0.rc2
14
+ - v6.1.1
15
15
  - v6.0.3
16
16
  - 6-0-stable
17
17
  - 5-2-stable
18
18
  - v5.2.4
19
19
  ruby:
20
+ - 3.0.0
20
21
  - 2.7.2
21
22
  - 2.6.6
23
+ exclude:
24
+ - rails: v5.2.4
25
+ ruby: 3.0.0
26
+ - rails: 5-2-stable
27
+ ruby: 3.0.0
22
28
  env:
23
29
  DB: sqlite3
24
30
  RAILS: ${{ matrix.rails }}
@@ -39,14 +45,20 @@ jobs:
39
45
  fail-fast: false
40
46
  matrix:
41
47
  rails:
42
- - v6.1.0.rc2
48
+ - v6.1.1
43
49
  - v6.0.3
44
50
  - 6-0-stable
45
51
  - 5-2-stable
46
52
  - v5.2.4
47
53
  ruby:
54
+ - 3.0.0
48
55
  - 2.7.2
49
56
  - 2.6.6
57
+ exclude:
58
+ - rails: v5.2.4
59
+ ruby: 3.0.0
60
+ - rails: 5-2-stable
61
+ ruby: 3.0.0
50
62
  env:
51
63
  DB: mysql
52
64
  RAILS: ${{ matrix.rails }}
@@ -76,14 +88,20 @@ jobs:
76
88
  fail-fast: false
77
89
  matrix:
78
90
  rails:
79
- - v6.1.0.rc2
91
+ - v6.1.1
80
92
  - v6.0.3
81
93
  - 6-0-stable
82
94
  - 5-2-stable
83
95
  - v5.2.4
84
96
  ruby:
97
+ - 3.0.0
85
98
  - 2.7.2
86
99
  - 2.6.6
100
+ exclude:
101
+ - rails: v5.2.4
102
+ ruby: 3.0.0
103
+ - rails: 5-2-stable
104
+ ruby: 3.0.0
87
105
  env:
88
106
  DB: postgres
89
107
  RAILS: ${{ matrix.rails }}
@@ -118,3 +136,19 @@ jobs:
118
136
  run: bundle install
119
137
  - name: Run tests
120
138
  run: bundle exec rspec
139
+
140
+ bug-report-templates:
141
+ runs-on: ubuntu-20.04
142
+ steps:
143
+ - uses: actions/checkout@v2
144
+ - name: Set up Ruby
145
+ uses: ruby/setup-ruby@v1
146
+ with:
147
+ ruby-version: 3.0.0
148
+ - name: Install dependencies
149
+ run: bundle install
150
+ - name: Run bug report templates
151
+ run: |
152
+ ruby bug_report_templates/test-ransacker-arel-present-predicate.rb
153
+ ruby bug_report_templates/test-ransack-scope-and-column-same-name.rb
154
+ rm Gemfile Gemfile.lock
@@ -0,0 +1,44 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+
4
+ DisabledByDefault: true
5
+
6
+ Layout/EmptyLineAfterMagicComment:
7
+ Enabled: true
8
+
9
+ Layout/EmptyLineBetweenDefs:
10
+ Enabled: true
11
+
12
+ Layout/EmptyLines:
13
+ Enabled: true
14
+
15
+ Layout/FirstArrayElementIndentation:
16
+ EnforcedStyle: consistent
17
+
18
+ Layout/SpaceAfterComma:
19
+ Enabled: true
20
+
21
+ Layout/SpaceInsideBlockBraces:
22
+ Enabled: true
23
+
24
+ Layout/SpaceInsideHashLiteralBraces:
25
+ Enabled: true
26
+
27
+ Layout/SpaceInsideParens:
28
+ Enabled: true
29
+
30
+ Layout/TrailingEmptyLines:
31
+ Enabled: true
32
+
33
+ Style/RedundantFileExtensionInRequire:
34
+ Enabled: true
35
+
36
+ Style/RedundantReturn:
37
+ Enabled: true
38
+
39
+ Style/SelfAssignment:
40
+ Enabled: true
41
+
42
+ Style/Semicolon:
43
+ Enabled: true
44
+
@@ -1,14 +1,15 @@
1
1
  # Change Log
2
2
 
3
+ * Drop support for rubies under 2.5. PR #1189
4
+
5
+ ## 2.4.1 - 2020-12-21
6
+
3
7
  * Add `ActiveRecord::Base.ransack!` which raises error if passed unknown condition
4
8
 
5
9
  *Aaron Lipman*
6
10
 
7
11
  ## 2.4.0 - 2020-11-27
8
12
 
9
- *
10
- PR []()
11
-
12
13
  * Support ActiveRecord 6.1.0.rc1.
13
14
  PR [1172](https://github.com/activerecord-hackery/ransack/pull/1172)
14
15
 
@@ -26,8 +26,8 @@ Steps:
26
26
  Ransack and not in your code or another gem.
27
27
 
28
28
  4. **Report the issue** by providing the link to a self-contained
29
- gist like [this](https://gist.github.com/jonatack/63048bc5062a84ba9e09) or
30
- [this](https://gist.github.com/jonatack/5df41a0edb53b7bad989). Please use
29
+ gist like [this](https://github.com/activerecord-hackery/ransack/blob/run_bug_report_templates/bug_report_templates/test-ransack-scope-and-column-same-name.rb) or
30
+ [this](https://github.com/activerecord-hackery/ransack/blob/run_bug_report_templates/bug_report_templates/test-ransacker-arel-present-predicate.rb). Please use
31
31
  these code examples as a bug-report template for your Ransack issue!
32
32
 
33
33
  If you do not provide a self-contained gist and would like your issue to be reviewed, do provide at a minimum:
data/Gemfile CHANGED
@@ -14,8 +14,8 @@ rails_version = case rails
14
14
  rails
15
15
  end
16
16
 
17
- gem 'faker', '~> 1.0'
18
- gem 'sqlite3', ::Gem::Version.new(rails_version) >= ::Gem::Version.new('6-0-stable') ? '~> 1.4.1' : '~> 1.3.3'
17
+ gem 'faker', '~> 2.0'
18
+ gem 'sqlite3', ::Gem::Version.new(rails_version == 'main' ? '6.2.0.alpha' : rails_version) >= ::Gem::Version.new('6-0-stable') ? '~> 1.4.1' : '~> 1.3.3'
19
19
  gem 'pg', '~> 1.0'
20
20
  gem 'pry', '~> 0.12.2'
21
21
  gem 'byebug'
@@ -49,3 +49,5 @@ group :test do
49
49
  gem 'rspec', '~> 3'
50
50
  gem 'simplecov', :require => false
51
51
  end
52
+
53
+ gem 'rubocop', require: false
@@ -0,0 +1,78 @@
1
+ # test-ransack-scope-and-column-same-name.rb
2
+
3
+ # This is a stand-alone test case.
4
+
5
+ # Run it in your console with: `ruby test-ransack-scope-and-column-same-name.rb`
6
+
7
+ # If you change the gem dependencies, run it with:
8
+ # `rm gemfile* && ruby test-ransack-scope-and-column-same-name.rb`
9
+
10
+ unless File.exist?('Gemfile')
11
+ File.write('Gemfile', <<-GEMFILE)
12
+ source 'https://rubygems.org'
13
+
14
+ # Rails master
15
+ gem 'rails', github: 'rails/rails', branch: '6-1-stable'
16
+
17
+ # Rails last release
18
+ # gem 'rails'
19
+
20
+ gem 'sqlite3'
21
+ gem 'ransack', github: 'activerecord-hackery/ransack'
22
+ GEMFILE
23
+
24
+ system 'bundle install'
25
+ end
26
+
27
+ require 'bundler'
28
+ Bundler.setup(:default)
29
+
30
+ require 'active_record'
31
+ require 'minitest/autorun'
32
+ require 'logger'
33
+ require 'ransack'
34
+
35
+ # This connection will do for database-independent bug reports.
36
+ ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
37
+ ActiveRecord::Base.logger = Logger.new(STDOUT)
38
+
39
+ # Display versions.
40
+ message = "Running test case with Ruby #{RUBY_VERSION}, Active Record #{
41
+ ::ActiveRecord::VERSION::STRING}, Arel #{Arel::VERSION} and #{
42
+ ::ActiveRecord::Base.connection.adapter_name}"
43
+ line = '=' * message.length
44
+ puts line, message, line
45
+
46
+ ActiveRecord::Schema.define do
47
+ create_table :users, force: true do |t|
48
+ t.boolean :active, null: false, default: true
49
+ end
50
+ end
51
+
52
+ class User < ActiveRecord::Base
53
+ scope :activated, -> (boolean = true) { where(active: boolean) }
54
+
55
+ private
56
+
57
+ def self.ransackable_scopes(auth_object = nil)
58
+ %i(activated)
59
+ end
60
+ end
61
+
62
+ class BugTest < Minitest::Test
63
+ def test_activated_scope_equals_true
64
+ sql = User.ransack({ activated: true }).result.to_sql
65
+ puts sql
66
+ assert_equal(
67
+ "SELECT \"users\".* FROM \"users\" WHERE \"users\".\"active\" = 1", sql
68
+ )
69
+ end
70
+
71
+ def test_activated_scope_equals_false
72
+ sql = User.ransack({ activated: false }).result.to_sql
73
+ puts sql
74
+ assert_equal(
75
+ "SELECT \"users\".* FROM \"users\"", sql
76
+ )
77
+ end
78
+ end
@@ -0,0 +1,71 @@
1
+ # test-ransacker-arel-present-predicate.rb
2
+
3
+ # Run it in your console with: `ruby test-ransacker-arel-present-predicate.rb`
4
+
5
+ # If you change the gem dependencies, run it with:
6
+ # `rm gemfile* && ruby test-ransacker-arel-present-predicate.rb`
7
+
8
+ unless File.exist?('Gemfile')
9
+ File.write('Gemfile', <<-GEMFILE)
10
+ source 'https://rubygems.org'
11
+
12
+ # Rails master
13
+ gem 'rails', github: 'rails/rails', branch: '6-1-stable'
14
+
15
+ # Rails last release
16
+ # gem 'rails'
17
+
18
+ gem 'sqlite3'
19
+ gem 'ransack', github: 'activerecord-hackery/ransack'
20
+ GEMFILE
21
+
22
+ system 'bundle install'
23
+ end
24
+
25
+ require 'bundler'
26
+ Bundler.setup(:default)
27
+
28
+ require 'active_record'
29
+ require 'minitest/autorun'
30
+ require 'logger'
31
+ require 'ransack'
32
+
33
+ # This connection will do for database-independent bug reports.
34
+ ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
35
+ ActiveRecord::Base.logger = Logger.new(STDOUT)
36
+
37
+ # Display versions.
38
+ message = "Running test case with Ruby #{RUBY_VERSION}, Active Record #{
39
+ ::ActiveRecord::VERSION::STRING}, Arel #{Arel::VERSION} and #{
40
+ ::ActiveRecord::Base.connection.adapter_name}"
41
+ line = '=' * message.length
42
+ puts line, message, line
43
+
44
+ ActiveRecord::Schema.define do
45
+ create_table :projects, force: true do |t|
46
+ t.string :name
47
+ t.string :number
48
+ end
49
+ end
50
+
51
+ class Project < ActiveRecord::Base
52
+ ransacker :name do
53
+ Arel.sql('projects.name')
54
+ end
55
+
56
+ ransacker :number do |parent|
57
+ parent.table[:number]
58
+ end
59
+ end
60
+
61
+ class BugTest < Minitest::Test
62
+ def test_ransackers
63
+ sql = Project.ransack({ number_present: 1 }).result.to_sql
64
+ puts sql
65
+ assert_equal "SELECT \"projects\".* FROM \"projects\" WHERE (\"projects\".\"number\" IS NOT NULL AND \"projects\".\"number\" != '')", sql
66
+
67
+ sql = Project.ransack({ name_present: 1 }).result.to_sql
68
+ puts sql
69
+ assert_equal "SELECT \"projects\".* FROM \"projects\" WHERE (projects.name IS NOT NULL AND projects.name != '')", sql
70
+ end
71
+ end
@@ -0,0 +1,20 @@
1
+ ## Release Process
2
+
3
+ *For maintainers of Ransack.*
4
+
5
+ To release a new version of Ransack and publish it to RubyGems, take the following steps:
6
+
7
+ - Create a new release, marked `Prerelease`.
8
+ <<<<<<< Updated upstream
9
+ - Update the versions file to the new release, commit and push to `master`.
10
+ =======
11
+ - Update the [version.rb](../lib/ransack/version.rb) file to the new release, commit and push to `master`.
12
+ >>>>>>> Stashed changes
13
+ - From the terminal, run the following commands
14
+
15
+ ```bash
16
+ rake build
17
+ rake release
18
+ ```
19
+
20
+ ![Create a Release](img/create_release.png)
@@ -0,0 +1 @@
1
+ require 'polyamorous/activerecord_6.1_ruby_2/join_association'
@@ -0,0 +1 @@
1
+ require 'polyamorous/activerecord_6.1_ruby_2/join_dependency'
@@ -0,0 +1 @@
1
+ require 'polyamorous/activerecord_6.1_ruby_2/reflection'
@@ -11,7 +11,7 @@ if defined?(::ActiveRecord)
11
11
  require 'polyamorous/join'
12
12
  require 'polyamorous/swapping_reflection_class'
13
13
 
14
- ar_version = ::ActiveRecord::VERSION::STRING[0,3]
14
+ ar_version = ::ActiveRecord::VERSION::STRING[0, 3]
15
15
  %w(join_association join_dependency reflection).each do |file|
16
16
  require "polyamorous/activerecord_#{ar_version}_ruby_2/#{file}"
17
17
  end
@@ -1,13 +1,13 @@
1
1
  require 'active_support/core_ext'
2
2
  require 'ransack/configuration'
3
3
  require 'ransack/adapters'
4
- require 'polyamorous/polyamorous.rb'
4
+ require 'polyamorous/polyamorous'
5
5
 
6
6
  Ransack::Adapters.object_mapper.require_constants
7
7
 
8
8
  module Ransack
9
9
  extend Configuration
10
- class UntraversableAssociationError < StandardError; end;
10
+ class UntraversableAssociationError < StandardError; end
11
11
  end
12
12
 
13
13
  Ransack.configure do |config|
@@ -106,7 +106,7 @@ module Ransack
106
106
  def join_sources
107
107
  base, joins = begin
108
108
  alias_tracker = ::ActiveRecord::Associations::AliasTracker.create(self.klass.connection, @object.table.name, [])
109
- constraints = if ::Gem::Version.new(::ActiveRecord::VERSION::STRING) >= ::Gem::Version.new(Constants::RAILS_6_1_ALPHA)
109
+ constraints = if ::Gem::Version.new(::ActiveRecord::VERSION::STRING) >= ::Gem::Version.new(Constants::RAILS_6_1)
110
110
  @join_dependency.join_constraints(@object.joins_values, alias_tracker, @object.references_values)
111
111
  elsif ::Gem::Version.new(::ActiveRecord::VERSION::STRING) >= ::Gem::Version.new(Constants::RAILS_6_0)
112
112
  @join_dependency.join_constraints(@object.joins_values, alias_tracker)
@@ -334,7 +334,7 @@ module Ransack
334
334
  @join_dependency.instance_variable_get(:@join_root).children.push found_association
335
335
 
336
336
  # Builds the arel nodes properly for this association
337
- if ::Gem::Version.new(::ActiveRecord::VERSION::STRING) >= ::Gem::Version.new(Constants::RAILS_6_1_ALPHA)
337
+ if ::Gem::Version.new(::ActiveRecord::VERSION::STRING) >= ::Gem::Version.new(Constants::RAILS_6_1)
338
338
  @tables_pot[found_association] = @join_dependency.construct_tables_for_association!(jd.instance_variable_get(:@join_root), found_association)
339
339
  else
340
340
  @join_dependency.send(:construct_tables!, jd.instance_variable_get(:@join_root))
@@ -348,7 +348,7 @@ module Ransack
348
348
  def extract_joins(association)
349
349
  parent = @join_dependency.instance_variable_get(:@join_root)
350
350
  reflection = association.reflection
351
- join_constraints = if ::Gem::Version.new(::ActiveRecord::VERSION::STRING) >= ::Gem::Version.new(Constants::RAILS_6_1_ALPHA)
351
+ join_constraints = if ::Gem::Version.new(::ActiveRecord::VERSION::STRING) >= ::Gem::Version.new(Constants::RAILS_6_1)
352
352
  association.join_constraints_with_tables(
353
353
  parent.table,
354
354
  parent.base_klass,
@@ -97,7 +97,7 @@ module Ransack
97
97
  arel_predicate: proc { |v| v ? EQ : NOT_EQ },
98
98
  compounds: false,
99
99
  type: :boolean,
100
- validator: proc { |v| BOOLEAN_VALUES.include?(v)},
100
+ validator: proc { |v| BOOLEAN_VALUES.include?(v) },
101
101
  formatter: proc { |v| nil }
102
102
  }
103
103
  ],
@@ -36,7 +36,7 @@ module Ransack
36
36
  'lt'.freeze, 'lteq'.freeze,
37
37
  'gt'.freeze, 'gteq'.freeze,
38
38
  'in'.freeze, 'not_in'.freeze
39
- ].freeze
39
+ ].freeze
40
40
  A_S_I = ['a'.freeze, 's'.freeze, 'i'.freeze].freeze
41
41
 
42
42
  EQ = 'eq'.freeze
@@ -46,10 +46,9 @@ module Ransack
46
46
  CONT = 'cont'.freeze
47
47
 
48
48
  RAILS_6_0 = '6.0.0'.freeze
49
- RAILS_6_1_ALPHA = '6.1.0.alpha'.freeze
49
+ RAILS_6_1 = '6.1.0'.freeze
50
50
 
51
51
  RANSACK_SLASH_SEARCHES = 'ransack/searches'.freeze
52
52
  RANSACK_SLASH_SEARCHES_SLASH_SEARCH = 'ransack/searches/search'.freeze
53
53
  end
54
54
  end
55
-
@@ -1,2 +1,2 @@
1
1
  require 'ransack/helpers/form_builder'
2
- require 'ransack/helpers/form_helper'
2
+ require 'ransack/helpers/form_helper'
@@ -45,9 +45,9 @@ module Ransack
45
45
  end
46
46
 
47
47
  def attribute_select(options = nil, html_options = nil, action = nil)
48
- options = options || {}
49
- html_options = html_options || {}
50
- action = action || Constants::SEARCH
48
+ options ||= {}
49
+ html_options ||= {}
50
+ action ||= Constants::SEARCH
51
51
  default = options.delete(:default)
52
52
  raise ArgumentError, formbuilder_error_message(
53
53
  "#{action}_select") unless object.respond_to?(:context)
@@ -30,7 +30,7 @@ module Ransack
30
30
 
31
31
  def type
32
32
  if ransacker
33
- return ransacker.type
33
+ ransacker.type
34
34
  else
35
35
  context.type_for(self)
36
36
  end
@@ -127,7 +127,6 @@ module Ransack
127
127
  alias :m= :combinator=
128
128
  alias :m :combinator
129
129
 
130
-
131
130
  # == build_attribute
132
131
  #
133
132
  # This method was originally called from Nodes::Grouping#new_condition
@@ -263,7 +262,6 @@ module Ransack
263
262
  attr.attr
264
263
  end
265
264
 
266
-
267
265
  def default_type
268
266
  predicate.type || (attributes.first && attributes.first.type)
269
267
  end
@@ -9,7 +9,7 @@ module Ransack
9
9
  class << self
10
10
  def extract(context, str)
11
11
  return unless str
12
- attr, direction = str.split(/\s+/,2)
12
+ attr, direction = str.split(/\s+/, 2)
13
13
  self.new(context).build(name: attr, dir: direction)
14
14
  end
15
15
  end
@@ -50,7 +50,7 @@ module Ransack
50
50
  y, m, d = *[val].flatten
51
51
  m ||= 1
52
52
  d ||= 1
53
- Date.new(y,m,d) rescue nil
53
+ Date.new(y, m, d) rescue nil
54
54
  end
55
55
  end
56
56
 
@@ -1,3 +1,3 @@
1
1
  module Ransack
2
- VERSION = '2.4.1'
2
+ VERSION = '2.4.2'
3
3
  end
@@ -1,4 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
+
2
3
  $:.push File.expand_path("../lib", __FILE__)
3
4
  require "ransack/version"
4
5
 
@@ -6,12 +7,12 @@ Gem::Specification.new do |s|
6
7
  s.name = "ransack"
7
8
  s.version = Ransack::VERSION
8
9
  s.platform = Gem::Platform::RUBY
9
- s.authors = ["Ernie Miller", "Ryan Bigg", "Jon Atack","Sean Carroll"]
10
- s.email = ["ernie@erniemiller.org", "radarlistener@gmail.com", "jonnyatack@gmail.com","sfcarroll@gmail.com"]
10
+ s.authors = ["Ernie Miller", "Ryan Bigg", "Jon Atack", "Sean Carroll"]
11
+ s.email = ["ernie@erniemiller.org", "radarlistener@gmail.com", "jonnyatack@gmail.com", "sfcarroll@gmail.com"]
11
12
  s.homepage = "https://github.com/activerecord-hackery/ransack"
12
13
  s.summary = %q{Object-based searching for Active Record and Mongoid (currently).}
13
14
  s.description = %q{Ransack is the successor to the MetaSearch gem. It improves and expands upon MetaSearch's functionality, but does not have a 100%-compatible API.}
14
- s.required_ruby_version = '>= 2.3'
15
+ s.required_ruby_version = '>= 2.6'
15
16
  s.license = 'MIT'
16
17
 
17
18
  s.add_dependency 'activerecord', '>= 5.2.4'
@@ -2,4 +2,4 @@ Article.blueprint do
2
2
  person
3
3
  title
4
4
  body
5
- end
5
+ end
@@ -2,4 +2,4 @@ Comment.blueprint do
2
2
  article
3
3
  person
4
4
  body
5
- end
5
+ end
@@ -2,4 +2,4 @@ Note.blueprint do
2
2
  note
3
3
  notable_type { "Article" }
4
4
  notable_id
5
- end
5
+ end
@@ -1,3 +1,3 @@
1
1
  Tag.blueprint do
2
2
  name { Sham.tag_name }
3
- end
3
+ end
@@ -14,11 +14,11 @@ Sham.define do
14
14
  title { Faker::Lorem.sentence }
15
15
  body { Faker::Lorem.paragraph }
16
16
  salary { |index| 30000 + (index * 1000) }
17
- tag_name { Faker::Lorem.words(3).join(' ') }
18
- note { Faker::Lorem.words(7).join(' ') }
19
- only_admin { Faker::Lorem.words(3).join(' ') }
20
- only_search { Faker::Lorem.words(3).join(' ') }
21
- only_sort { Faker::Lorem.words(3).join(' ') }
17
+ tag_name { Faker::Lorem.words(number: 3).join(' ') }
18
+ note { Faker::Lorem.words(number: 7).join(' ') }
19
+ only_admin { Faker::Lorem.words(number: 3).join(' ') }
20
+ only_search { Faker::Lorem.words(number: 3).join(' ') }
21
+ only_sort { Faker::Lorem.words(number: 3).join(' ') }
22
22
  notable_id { |id| id }
23
23
  end
24
24
 
@@ -6,4 +6,4 @@ module RansackHelper
6
6
  def quote_column_name(column)
7
7
  ActiveRecord::Base.connection.quote_column_name(column)
8
8
  end
9
- end
9
+ end
@@ -464,9 +464,9 @@ module Ransack
464
464
  Comment.create(article: Article.create(title: 'Avenger'), person: Person.create(salary: 100_000)),
465
465
  Comment.create(article: Article.create(title: 'Avenge'), person: Person.create(salary: 50_000)),
466
466
  ]
467
- expect(Comment.ransack(article_title_cont: 'aven',s: 'person_salary desc').result).to eq(comments)
467
+ expect(Comment.ransack(article_title_cont: 'aven', s: 'person_salary desc').result).to eq(comments)
468
468
  expect(Comment.joins(:person).ransack(s: 'persons_salarydesc', article_title_cont: 'aven').result).to eq(comments)
469
- expect(Comment.joins(:person).ransack(article_title_cont: 'aven',s: 'persons_salary desc').result).to eq(comments)
469
+ expect(Comment.joins(:person).ransack(article_title_cont: 'aven', s: 'persons_salary desc').result).to eq(comments)
470
470
  end
471
471
 
472
472
  it 'allows sort by `only_sort` field' do
@@ -545,7 +545,6 @@ module Ransack
545
545
  )
546
546
  end
547
547
 
548
-
549
548
  it 'should allow passing ransacker arguments to a ransacker' do
550
549
  s = Person.ransack(
551
550
  c: [{
@@ -9,7 +9,6 @@ module Ransack
9
9
  describe Context do
10
10
  subject { Context.new(Person) }
11
11
 
12
-
13
12
  it 'has an Active Record alias tracker method' do
14
13
  expect(subject.alias_tracker)
15
14
  .to be_an ::ActiveRecord::Associations::AliasTracker
@@ -81,7 +80,7 @@ module Ransack
81
80
  end
82
81
 
83
82
  it 'build correlated subquery for multiple conditions (default scope)' do
84
- search = Search.new(Person, { comments_body_not_eq: 'some_title'})
83
+ search = Search.new(Person, { comments_body_not_eq: 'some_title' })
85
84
 
86
85
  # Was
87
86
  # SELECT "people".* FROM "people" WHERE "people"."id" NOT IN (
@@ -186,7 +186,7 @@ module Ransack
186
186
  )
187
187
  }
188
188
  it {
189
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
189
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
190
190
  )
191
191
  }
192
192
  it { should match /sort_link desc/ }
@@ -202,7 +202,7 @@ module Ransack
202
202
  )
203
203
  }
204
204
  it {
205
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
205
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
206
206
  )
207
207
  }
208
208
  end
@@ -216,7 +216,7 @@ module Ransack
216
216
  )
217
217
  }
218
218
  it {
219
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
219
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
220
220
  )
221
221
  }
222
222
  it { should match /sort_link desc/ }
@@ -232,7 +232,7 @@ module Ransack
232
232
  )
233
233
  }
234
234
  it {
235
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
235
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
236
236
  )
237
237
  }
238
238
  end
@@ -258,7 +258,7 @@ module Ransack
258
258
  )
259
259
  }
260
260
  it {
261
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
261
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
262
262
  )
263
263
  }
264
264
  it { should match /sort_link desc/ }
@@ -274,7 +274,7 @@ module Ransack
274
274
  )
275
275
  }
276
276
  it {
277
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
277
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+asc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
278
278
  )
279
279
  }
280
280
  end
@@ -289,7 +289,7 @@ module Ransack
289
289
  )
290
290
  }
291
291
  it {
292
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
292
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
293
293
  )
294
294
  }
295
295
  it { should match /sort_link/ }
@@ -306,7 +306,7 @@ module Ransack
306
306
  )
307
307
  }
308
308
  it {
309
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
309
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
310
310
  )
311
311
  }
312
312
  end
@@ -321,7 +321,7 @@ module Ransack
321
321
  )
322
322
  }
323
323
  it {
324
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
324
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
325
325
  )
326
326
  }
327
327
  it { should match /sort_link/ }
@@ -338,7 +338,7 @@ module Ransack
338
338
  )
339
339
  }
340
340
  it {
341
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
341
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
342
342
  )
343
343
  }
344
344
  end
@@ -353,7 +353,7 @@ module Ransack
353
353
  )
354
354
  }
355
355
  it {
356
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+asc/
356
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+asc/
357
357
  )
358
358
  }
359
359
  it { should match /sort_link/ }
@@ -370,7 +370,7 @@ module Ransack
370
370
  )
371
371
  }
372
372
  it {
373
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+asc/
373
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+asc/
374
374
  )
375
375
  }
376
376
  end
@@ -385,7 +385,7 @@ module Ransack
385
385
  )
386
386
  }
387
387
  it {
388
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
388
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&amp;q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
389
389
  )
390
390
  }
391
391
  it { should match /sort_link/ }
@@ -402,7 +402,7 @@ module Ransack
402
402
  )
403
403
  }
404
404
  it {
405
- should match( /people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
405
+ should match(/people\?q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=name\+desc&q(%5B|\[)s(%5D|\])(%5B|\[)(%5D|\])=email\+desc/
406
406
  )
407
407
  }
408
408
  end
@@ -643,13 +643,13 @@ module Ransack
643
643
  before do
644
644
  Ransack.configure do |c|
645
645
  c.hide_sort_order_indicators = false
646
- c.custom_arrows = { default_arrow: "defaultarrow"}
646
+ c.custom_arrows = { default_arrow: "defaultarrow" }
647
647
  end
648
648
  end
649
649
 
650
650
  after do
651
651
  Ransack.configure do |c|
652
- c.custom_arrows = { default_arrow: nil}
652
+ c.custom_arrows = { default_arrow: nil }
653
653
  end
654
654
  end
655
655
 
@@ -80,7 +80,7 @@ module Ransack
80
80
  'a' => {
81
81
  '0' => {
82
82
  'name' => 'with_arguments',
83
- 'ransacker_args' => [1,2]
83
+ 'ransacker_args' => [1, 2]
84
84
  }
85
85
  },
86
86
  'p' => 'eq',
@@ -90,7 +90,7 @@ module Ransack
90
90
  'a' => {
91
91
  '0' => {
92
92
  'name' => 'with_arguments',
93
- 'ransacker_args' => [3,4]
93
+ 'ransacker_args' => [3, 4]
94
94
  }
95
95
  },
96
96
  'p' => 'eq',
@@ -422,7 +422,7 @@ module Ransack
422
422
  context "defining custom predicates" do
423
423
  describe "with 'not_in' arel predicate" do
424
424
  before do
425
- Ransack.configure {|c| c.add_predicate "not_in_csv", arel_predicate: "not_in", formatter: proc { |v| v.split(",") } }
425
+ Ransack.configure { |c| c.add_predicate "not_in_csv", arel_predicate: "not_in", formatter: proc { |v| v.split(",") } }
426
426
  end
427
427
 
428
428
  it 'generates a value IS NOT NULL query' do
@@ -1,5 +1,5 @@
1
1
  require 'machinist/active_record'
2
- require 'polyamorous/polyamorous.rb'
2
+ require 'polyamorous/polyamorous'
3
3
  require 'sham'
4
4
  require 'faker'
5
5
  require 'ransack'
@@ -17,16 +17,17 @@ I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'support', '*.yml')]
17
17
  Dir[File.expand_path('../{helpers,support,blueprints}/*.rb', __FILE__)]
18
18
  .each { |f| require f }
19
19
 
20
+ Faker::Config.random = Random.new(0)
20
21
  Sham.define do
21
22
  name { Faker::Name.name }
22
23
  title { Faker::Lorem.sentence }
23
24
  body { Faker::Lorem.paragraph }
24
25
  salary { |index| 30000 + (index * 1000) }
25
- tag_name { Faker::Lorem.words(3).join(' ') }
26
- note { Faker::Lorem.words(7).join(' ') }
27
- only_admin { Faker::Lorem.words(3).join(' ') }
28
- only_search { Faker::Lorem.words(3).join(' ') }
29
- only_sort { Faker::Lorem.words(3).join(' ') }
26
+ tag_name { Faker::Lorem.words(number: 3).join(' ') }
27
+ note { Faker::Lorem.words(number: 7).join(' ') }
28
+ only_admin { Faker::Lorem.words(number: 3).join(' ') }
29
+ only_search { Faker::Lorem.words(number: 3).join(' ') }
30
+ only_sort { Faker::Lorem.words(number: 3).join(' ') }
30
31
  notable_id { |id| id }
31
32
  end
32
33
 
@@ -87,7 +87,6 @@ class Person < ActiveRecord::Base
87
87
  )
88
88
  end
89
89
 
90
-
91
90
  ransacker :sql_literal_id do
92
91
  Arel.sql('people.id')
93
92
  end
@@ -110,7 +109,6 @@ class Person < ActiveRecord::Base
110
109
  Arel.sql(query)
111
110
  end
112
111
 
113
-
114
112
  def self.ransackable_attributes(auth_object = nil)
115
113
  if auth_object == :admin
116
114
  super - ['only_sort']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ransack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernie Miller
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2020-12-21 00:00:00.000000000 Z
14
+ date: 2021-01-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activerecord
@@ -68,14 +68,21 @@ extra_rdoc_files: []
68
68
  files:
69
69
  - ".github/FUNDING.yml"
70
70
  - ".github/SECURITY.md"
71
+ - ".github/workflows/cronjob.yml"
72
+ - ".github/workflows/rubocop.yml"
71
73
  - ".github/workflows/test.yml"
72
74
  - ".gitignore"
75
+ - ".rubocop.yml"
73
76
  - CHANGELOG.md
74
77
  - CONTRIBUTING.md
75
78
  - Gemfile
76
79
  - LICENSE
77
80
  - README.md
78
81
  - Rakefile
82
+ - bug_report_templates/test-ransack-scope-and-column-same-name.rb
83
+ - bug_report_templates/test-ransacker-arel-present-predicate.rb
84
+ - docs/img/create_release.png
85
+ - docs/release_process.md
79
86
  - lib/polyamorous/activerecord_5.2_ruby_2/join_association.rb
80
87
  - lib/polyamorous/activerecord_5.2_ruby_2/join_dependency.rb
81
88
  - lib/polyamorous/activerecord_5.2_ruby_2/reflection.rb
@@ -85,6 +92,9 @@ files:
85
92
  - lib/polyamorous/activerecord_6.1_ruby_2/join_association.rb
86
93
  - lib/polyamorous/activerecord_6.1_ruby_2/join_dependency.rb
87
94
  - lib/polyamorous/activerecord_6.1_ruby_2/reflection.rb
95
+ - lib/polyamorous/activerecord_6.2_ruby_2/join_association.rb
96
+ - lib/polyamorous/activerecord_6.2_ruby_2/join_dependency.rb
97
+ - lib/polyamorous/activerecord_6.2_ruby_2/reflection.rb
88
98
  - lib/polyamorous/join.rb
89
99
  - lib/polyamorous/polyamorous.rb
90
100
  - lib/polyamorous/swapping_reflection_class.rb
@@ -188,7 +198,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
188
198
  requirements:
189
199
  - - ">="
190
200
  - !ruby/object:Gem::Version
191
- version: '2.3'
201
+ version: '2.6'
192
202
  required_rubygems_version: !ruby/object:Gem::Requirement
193
203
  requirements:
194
204
  - - ">="