ransack 4.1.1 → 4.4.0

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.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -3
  3. data/lib/polyamorous/activerecord/join_association_7_2.rb +55 -0
  4. data/lib/polyamorous/polyamorous.rb +5 -1
  5. data/lib/ransack/adapters/active_record/context.rb +32 -5
  6. data/lib/ransack/constants.rb +1 -1
  7. data/lib/ransack/context.rb +7 -4
  8. data/lib/ransack/helpers/form_builder.rb +6 -7
  9. data/lib/ransack/helpers/form_helper.rb +86 -20
  10. data/lib/ransack/invalid_search_error.rb +3 -0
  11. data/lib/ransack/locale/ja.yml +51 -51
  12. data/lib/ransack/locale/ko.yml +70 -0
  13. data/lib/ransack/locale/uk.yml +72 -0
  14. data/lib/ransack/nodes/condition.rb +39 -7
  15. data/lib/ransack/nodes/grouping.rb +1 -1
  16. data/lib/ransack/nodes/sort.rb +1 -1
  17. data/lib/ransack/nodes/value.rb +9 -1
  18. data/lib/ransack/search.rb +4 -3
  19. data/lib/ransack/version.rb +1 -1
  20. data/lib/ransack.rb +9 -0
  21. data/spec/polyamorous/join_association_spec.rb +0 -1
  22. data/spec/polyamorous/join_dependency_spec.rb +0 -1
  23. data/spec/ransack/adapters/active_record/base_spec.rb +106 -3
  24. data/spec/ransack/adapters/active_record/context_spec.rb +72 -0
  25. data/spec/ransack/helpers/form_builder_spec.rb +0 -2
  26. data/spec/ransack/helpers/form_helper_spec.rb +219 -5
  27. data/spec/ransack/nodes/condition_spec.rb +230 -0
  28. data/spec/ransack/nodes/grouping_spec.rb +2 -2
  29. data/spec/ransack/nodes/value_spec.rb +12 -1
  30. data/spec/ransack/predicate_spec.rb +16 -9
  31. data/spec/ransack/search_spec.rb +121 -1
  32. data/spec/ransack/translate_spec.rb +0 -1
  33. data/spec/spec_helper.rb +2 -3
  34. data/spec/support/schema.rb +42 -0
  35. metadata +17 -86
  36. data/.github/FUNDING.yml +0 -3
  37. data/.github/SECURITY.md +0 -12
  38. data/.github/workflows/codeql.yml +0 -72
  39. data/.github/workflows/cronjob.yml +0 -99
  40. data/.github/workflows/deploy.yml +0 -35
  41. data/.github/workflows/rubocop.yml +0 -20
  42. data/.github/workflows/test-deploy.yml +0 -29
  43. data/.github/workflows/test.yml +0 -131
  44. data/.gitignore +0 -7
  45. data/.nojekyll +0 -0
  46. data/.rubocop.yml +0 -50
  47. data/CHANGELOG.md +0 -1176
  48. data/CONTRIBUTING.md +0 -171
  49. data/Gemfile +0 -53
  50. data/Rakefile +0 -24
  51. data/bug_report_templates/test-ransack-scope-and-column-same-name.rb +0 -78
  52. data/bug_report_templates/test-ransacker-arel-present-predicate.rb +0 -75
  53. data/docs/.gitignore +0 -19
  54. data/docs/.nojekyll +0 -0
  55. data/docs/babel.config.js +0 -3
  56. data/docs/blog/2022-03-27-ransack-3.0.0.md +0 -20
  57. data/docs/docs/getting-started/_category_.json +0 -4
  58. data/docs/docs/getting-started/advanced-mode.md +0 -46
  59. data/docs/docs/getting-started/configuration.md +0 -47
  60. data/docs/docs/getting-started/search-matches.md +0 -67
  61. data/docs/docs/getting-started/simple-mode.md +0 -288
  62. data/docs/docs/getting-started/sorting.md +0 -71
  63. data/docs/docs/getting-started/using-predicates.md +0 -282
  64. data/docs/docs/going-further/_category_.json +0 -4
  65. data/docs/docs/going-further/acts-as-taggable-on.md +0 -114
  66. data/docs/docs/going-further/associations.md +0 -70
  67. data/docs/docs/going-further/custom-predicates.md +0 -52
  68. data/docs/docs/going-further/documentation.md +0 -43
  69. data/docs/docs/going-further/exporting-to-csv.md +0 -49
  70. data/docs/docs/going-further/external-guides.md +0 -57
  71. data/docs/docs/going-further/form-customisation.md +0 -63
  72. data/docs/docs/going-further/i18n.md +0 -53
  73. data/docs/docs/going-further/img/create_release.png +0 -0
  74. data/docs/docs/going-further/merging-searches.md +0 -41
  75. data/docs/docs/going-further/other-notes.md +0 -428
  76. data/docs/docs/going-further/polymorphic-search.md +0 -46
  77. data/docs/docs/going-further/ransackers.md +0 -331
  78. data/docs/docs/going-further/release_process.md +0 -36
  79. data/docs/docs/going-further/saving-queries.md +0 -82
  80. data/docs/docs/going-further/searching-postgres.md +0 -57
  81. data/docs/docs/going-further/wiki-contributors.md +0 -82
  82. data/docs/docs/intro.md +0 -99
  83. data/docs/docusaurus.config.js +0 -120
  84. data/docs/package.json +0 -42
  85. data/docs/sidebars.js +0 -31
  86. data/docs/src/components/HomepageFeatures/index.js +0 -64
  87. data/docs/src/components/HomepageFeatures/styles.module.css +0 -11
  88. data/docs/src/css/custom.css +0 -39
  89. data/docs/src/pages/index.module.css +0 -23
  90. data/docs/src/pages/markdown-page.md +0 -7
  91. data/docs/static/.nojekyll +0 -0
  92. data/docs/static/img/docusaurus.png +0 -0
  93. data/docs/static/img/favicon.ico +0 -0
  94. data/docs/static/img/logo.svg +0 -1
  95. data/docs/static/img/tutorial/docsVersionDropdown.png +0 -0
  96. data/docs/static/img/tutorial/localeDropdown.png +0 -0
  97. data/docs/static/img/undraw_docusaurus_mountain.svg +0 -171
  98. data/docs/static/img/undraw_docusaurus_react.svg +0 -170
  99. data/docs/static/img/undraw_docusaurus_tree.svg +0 -40
  100. data/docs/static/logo/ransack-h.png +0 -0
  101. data/docs/static/logo/ransack-h.svg +0 -34
  102. data/docs/static/logo/ransack-v.png +0 -0
  103. data/docs/static/logo/ransack-v.svg +0 -34
  104. data/docs/static/logo/ransack.png +0 -0
  105. data/docs/static/logo/ransack.svg +0 -21
  106. data/docs/yarn.lock +0 -8879
  107. data/ransack.gemspec +0 -26
@@ -178,7 +178,6 @@ module Ransack
178
178
  # AND "articles"."title" = 'Test' AND "articles"."published" = 't' AND ('default_scope' = 'default_scope')
179
179
  # ) ORDER BY "people"."id" DESC
180
180
 
181
- pending("spec should pass, but I do not know how/where to fix lib code")
182
181
  s = Search.new(Person, published_articles_title_not_eq: 'Test')
183
182
  expect(s.result.to_sql).to include 'default_scope'
184
183
  expect(s.result.to_sql).to include 'published'
@@ -270,6 +269,7 @@ module Ransack
270
269
  end
271
270
 
272
271
  specify { expect { subject }.to raise_error ArgumentError }
272
+ specify { expect { subject }.to raise_error InvalidSearchError }
273
273
  end
274
274
 
275
275
  context 'when ignore_unknown_conditions configuration option is true' do
@@ -300,6 +300,7 @@ module Ransack
300
300
 
301
301
  context 'when ignore_unknown_conditions search parameter is false' do
302
302
  specify { expect { with_ignore_unknown_conditions_false }.to raise_error ArgumentError }
303
+ specify { expect { with_ignore_unknown_conditions_false }.to raise_error InvalidSearchError }
303
304
  end
304
305
 
305
306
  context 'when ignore_unknown_conditions search parameter is true' do
@@ -335,18 +336,90 @@ module Ransack
335
336
  end
336
337
  end
337
338
 
339
+ context "ransackable_scope with array arguments" do
340
+ around(:each) do |example|
341
+ Person.define_singleton_method(:domestic) do |countries|
342
+ self.where(name: countries)
343
+ end
344
+
345
+ Person.define_singleton_method(:flexible_scope) do |*args|
346
+ self.where(id: args)
347
+ end
348
+
349
+ Person.define_singleton_method(:two_param_scope) do |param1, param2|
350
+ self.where(name: param1, id: param2)
351
+ end
352
+
353
+ begin
354
+ example.run
355
+ ensure
356
+ Person.singleton_class.undef_method :domestic
357
+ Person.singleton_class.undef_method :flexible_scope
358
+ Person.singleton_class.undef_method :two_param_scope
359
+ end
360
+ end
361
+
362
+ it "handles scopes that take arrays as single arguments (arity 1)" do
363
+ allow(Person).to receive(:ransackable_scopes)
364
+ .and_return(Person.ransackable_scopes + [:domestic])
365
+
366
+ # This should not raise ArgumentError
367
+ expect {
368
+ s = Search.new(Person, domestic: ['US', 'JP'])
369
+ s.result # This triggers the actual scope call
370
+ }.not_to raise_error
371
+
372
+ s = Search.new(Person, domestic: ['US', 'JP'])
373
+ expect(s.instance_variable_get(:@scope_args)["domestic"]).to eq("US")
374
+ end
375
+
376
+ it "handles scopes with flexible arity (negative arity)" do
377
+ allow(Person).to receive(:ransackable_scopes)
378
+ .and_return(Person.ransackable_scopes + [:flexible_scope])
379
+
380
+ expect {
381
+ s = Search.new(Person, flexible_scope: ['US', 'JP'])
382
+ s.result
383
+ }.not_to raise_error
384
+ end
385
+
386
+ it "handles scopes with arity > 1" do
387
+ allow(Person).to receive(:ransackable_scopes)
388
+ .and_return(Person.ransackable_scopes + [:two_param_scope])
389
+
390
+ expect {
391
+ s = Search.new(Person, two_param_scope: ['param1', 'param2'])
392
+ s.result
393
+ }.not_to raise_error
394
+ end
395
+
396
+ it "still supports the workaround with nested arrays" do
397
+ allow(Person).to receive(:ransackable_scopes)
398
+ .and_return(Person.ransackable_scopes + [:domestic])
399
+
400
+ # The workaround from the issue should still work
401
+ expect {
402
+ s = Search.new(Person, domestic: [['US', 'JP']])
403
+ s.result
404
+ }.not_to raise_error
405
+ end
406
+ end
338
407
  end
339
408
 
340
409
  describe '#result' do
341
410
  let(:people_name_field) {
342
411
  "#{quote_table_name("people")}.#{quote_column_name("name")}"
343
412
  }
413
+ let(:people_temperament_field) {
414
+ "#{quote_table_name("people")}.#{quote_column_name("temperament")}"
415
+ }
344
416
  let(:children_people_name_field) {
345
417
  "#{quote_table_name("children_people")}.#{quote_column_name("name")}"
346
418
  }
347
419
  let(:notable_type_field) {
348
420
  "#{quote_table_name("notes")}.#{quote_column_name("notable_type")}"
349
421
  }
422
+
350
423
  it 'evaluates conditions contextually' do
351
424
  s = Search.new(Person, children_name_eq: 'Ernie')
352
425
  expect(s.result).to be_an ActiveRecord::Relation
@@ -354,6 +427,36 @@ module Ransack
354
427
  children_people_name_field} = 'Ernie'/
355
428
  end
356
429
 
430
+ context 'when evaluating enums' do
431
+ before do
432
+ Person.take.update_attribute(:temperament, 'choleric')
433
+ end
434
+
435
+ it 'evaluates enum key correctly' do
436
+ s = Search.new(Person, temperament_eq: 'choleric')
437
+
438
+ expect(s.result.to_sql).not_to match /#{
439
+ people_temperament_field} = 0/
440
+
441
+ expect(s.result.to_sql).to match /#{
442
+ people_temperament_field} = #{Person.temperaments[:choleric]}/
443
+
444
+ expect(s.result).not_to be_empty
445
+ end
446
+
447
+ it 'evaluates enum value correctly' do
448
+ s = Search.new(Person, temperament_eq: Person.temperaments[:choleric])
449
+
450
+ expect(s.result.to_sql).not_to match /#{
451
+ people_temperament_field} = 0/
452
+
453
+ expect(s.result.to_sql).to match /#{
454
+ people_temperament_field} = #{Person.temperaments[:choleric]}/
455
+
456
+ expect(s.result).not_to be_empty
457
+ end
458
+ end
459
+
357
460
  it 'use appropriate table alias' do
358
461
  s = Search.new(Person, {
359
462
  name_eq: "person_name_query",
@@ -477,6 +580,11 @@ module Ransack
477
580
  @s = Search.new(Person)
478
581
  end
479
582
 
583
+ it 'doesn\'t creates sorts' do
584
+ @s.sorts = ''
585
+ expect(@s.sorts.size).to eq(0)
586
+ end
587
+
480
588
  it 'creates sorts based on a single attribute/direction' do
481
589
  @s.sorts = 'id desc'
482
590
  expect(@s.sorts.size).to eq(1)
@@ -614,6 +722,18 @@ module Ransack
614
722
  expect(@s.result.first.id).to eq 1
615
723
  end
616
724
 
725
+ it 'raises ArgumentError when an invalid argument is sent' do
726
+ expect do
727
+ @s.sorts = 1234
728
+ end.to raise_error(ArgumentError, "Invalid argument (Integer) supplied to sorts=")
729
+ end
730
+
731
+ it 'raises InvalidSearchError when an invalid argument is sent' do
732
+ expect do
733
+ @s.sorts = 1234
734
+ end.to raise_error(Ransack::InvalidSearchError, "Invalid argument (Integer) supplied to sorts=")
735
+ end
736
+
617
737
  it "PG's sort option", if: ::ActiveRecord::Base.connection.adapter_name == "PostgreSQL" do
618
738
  default = Ransack.options.clone
619
739
 
@@ -2,7 +2,6 @@ require 'spec_helper'
2
2
 
3
3
  module Ransack
4
4
  describe Translate do
5
-
6
5
  describe '.attribute' do
7
6
  it 'translate namespaced attribute like AR does' do
8
7
  ar_translation = ::Namespace::Article.human_attribute_name(:title)
data/spec/spec_helper.rb CHANGED
@@ -1,13 +1,12 @@
1
- require 'machinist/active_record'
2
- require 'polyamorous/polyamorous'
1
+ require 'ransack'
3
2
  require 'sham'
4
3
  require 'faker'
5
- require 'ransack'
6
4
  require 'action_controller'
7
5
  require 'ransack/helpers'
8
6
  require 'pry'
9
7
  require 'simplecov'
10
8
  require 'byebug'
9
+ require 'machinist/active_record'
11
10
 
12
11
  SimpleCov.start
13
12
  I18n.enforce_available_locales = false
@@ -1,4 +1,5 @@
1
1
  require 'active_record'
2
+ require 'activerecord-postgis-adapter'
2
3
 
3
4
  case ENV['DB'].try(:downcase)
4
5
  when 'mysql', 'mysql2'
@@ -20,6 +21,17 @@ when 'pg', 'postgres', 'postgresql'
20
21
  host: ENV.fetch("DATABASE_HOST") { "localhost" },
21
22
  min_messages: 'warning'
22
23
  )
24
+ when 'postgis'
25
+ # To test with PostGIS: `DB=postgis bundle exec rake spec`
26
+ ActiveRecord::Base.establish_connection(
27
+ adapter: 'postgis',
28
+ postgis_extension: 'postgis',
29
+ database: 'ransack',
30
+ username: ENV.fetch("DATABASE_USERNAME") { "postgres" },
31
+ password: ENV.fetch("DATABASE_PASSWORD") { "" },
32
+ host: ENV.fetch("DATABASE_HOST") { "localhost" },
33
+ min_messages: 'warning'
34
+ )
23
35
  else
24
36
  # Otherwise, assume SQLite3: `bundle exec rake spec`
25
37
  ActiveRecord::Base.establish_connection(
@@ -69,6 +81,8 @@ class Person < ApplicationRecord
69
81
  scope :sort_by_reverse_name_asc, lambda { order(Arel.sql("REVERSE(name) ASC")) }
70
82
  scope :sort_by_reverse_name_desc, lambda { order("REVERSE(name) DESC") }
71
83
 
84
+ enum :temperament, { sanguine: 1, choleric: 2, melancholic: 3, phlegmatic: 4 }
85
+
72
86
  alias_attribute :full_name, :name
73
87
 
74
88
  ransack_alias :term, :name_or_email
@@ -126,6 +140,17 @@ class Person < ApplicationRecord
126
140
  Arel.sql(query)
127
141
  end
128
142
 
143
+ ransacker :article_tags, formatter: proc { |id|
144
+ if Tag.exists?(id)
145
+ joins(articles: :tags)
146
+ .where(tags: { id: id })
147
+ .distinct
148
+ .select(:id).arel
149
+ end
150
+ } do |parent|
151
+ parent.table[:id]
152
+ end
153
+
129
154
  def self.ransackable_attributes(auth_object = nil)
130
155
  if auth_object == :admin
131
156
  authorizable_ransackable_attributes - ['only_sort']
@@ -151,6 +176,7 @@ class Article < ApplicationRecord
151
176
  has_many :comments
152
177
  has_and_belongs_to_many :tags
153
178
  has_many :notes, as: :notable
179
+ has_many :recent_notes, as: :notable
154
180
 
155
181
  alias_attribute :content, :body
156
182
 
@@ -220,18 +246,28 @@ end
220
246
  class Comment < ApplicationRecord
221
247
  belongs_to :article
222
248
  belongs_to :person
249
+ has_and_belongs_to_many :tags
223
250
 
224
251
  default_scope { where(disabled: false) }
225
252
  end
226
253
 
227
254
  class Tag < ApplicationRecord
228
255
  has_and_belongs_to_many :articles
256
+ has_and_belongs_to_many :comments
229
257
  end
230
258
 
231
259
  class Note < ApplicationRecord
232
260
  belongs_to :notable, polymorphic: true
233
261
  end
234
262
 
263
+ class RecentNote < ApplicationRecord
264
+ DEFAULT_NOTABLE_ID = 1
265
+ self.table_name = "notes"
266
+ default_scope { where(notable_id: DEFAULT_NOTABLE_ID) }
267
+
268
+ belongs_to :notable, polymorphic: true
269
+ end
270
+
235
271
  class Account < ApplicationRecord
236
272
  belongs_to :agent_account, class_name: "Account"
237
273
  belongs_to :trade_account, class_name: "Account"
@@ -266,6 +302,7 @@ module Schema
266
302
  t.string :new_start
267
303
  t.string :stop_end
268
304
  t.integer :salary
305
+ t.integer :temperament
269
306
  t.date :life_start
270
307
  t.boolean :awesome, default: false
271
308
  t.boolean :terms_and_conditions, default: false
@@ -298,6 +335,11 @@ module Schema
298
335
  t.integer :tag_id
299
336
  end
300
337
 
338
+ create_table :comments_tags, force: true, id: false do |t|
339
+ t.integer :comment_id
340
+ t.integer :tag_id
341
+ end
342
+
301
343
  create_table :notes, force: true do |t|
302
344
  t.integer :notable_id
303
345
  t.string :notable_type
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: 4.1.1
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernie Miller
@@ -9,10 +9,9 @@ authors:
9
9
  - Jon Atack
10
10
  - Sean Carroll
11
11
  - David Rodríguez
12
- autorequire:
13
12
  bindir: bin
14
13
  cert_chain: []
15
- date: 2023-10-29 00:00:00.000000000 Z
14
+ date: 2025-09-25 00:00:00.000000000 Z
16
15
  dependencies:
17
16
  - !ruby/object:Gem::Dependency
18
17
  name: activerecord
@@ -20,28 +19,28 @@ dependencies:
20
19
  requirements:
21
20
  - - ">="
22
21
  - !ruby/object:Gem::Version
23
- version: 6.1.5
22
+ version: '7.1'
24
23
  type: :runtime
25
24
  prerelease: false
26
25
  version_requirements: !ruby/object:Gem::Requirement
27
26
  requirements:
28
27
  - - ">="
29
28
  - !ruby/object:Gem::Version
30
- version: 6.1.5
29
+ version: '7.1'
31
30
  - !ruby/object:Gem::Dependency
32
31
  name: activesupport
33
32
  requirement: !ruby/object:Gem::Requirement
34
33
  requirements:
35
34
  - - ">="
36
35
  - !ruby/object:Gem::Version
37
- version: 6.1.5
36
+ version: '7.1'
38
37
  type: :runtime
39
38
  prerelease: false
40
39
  version_requirements: !ruby/object:Gem::Requirement
41
40
  requirements:
42
41
  - - ">="
43
42
  - !ruby/object:Gem::Version
44
- version: 6.1.5
43
+ version: '7.1'
45
44
  - !ruby/object:Gem::Dependency
46
45
  name: i18n
47
46
  requirement: !ruby/object:Gem::Requirement
@@ -56,91 +55,22 @@ dependencies:
56
55
  - - ">="
57
56
  - !ruby/object:Gem::Version
58
57
  version: '0'
59
- description: Ransack is the successor to the MetaSearch gem. It improves and expands
60
- upon MetaSearch's functionality, but does not have a 100%-compatible API.
58
+ description: Powerful object-based searching and filtering for Active Record with
59
+ advanced features like complex boolean queries, association searching, custom predicates
60
+ and i18n support.
61
61
  email:
62
62
  - ernie@erniemiller.org
63
63
  - radarlistener@gmail.com
64
64
  - jonnyatack@gmail.com
65
- - sfcarroll@gmail.com
65
+ - magma.craters2h@icloud.com
66
66
  executables: []
67
67
  extensions: []
68
68
  extra_rdoc_files: []
69
69
  files:
70
- - ".github/FUNDING.yml"
71
- - ".github/SECURITY.md"
72
- - ".github/workflows/codeql.yml"
73
- - ".github/workflows/cronjob.yml"
74
- - ".github/workflows/deploy.yml"
75
- - ".github/workflows/rubocop.yml"
76
- - ".github/workflows/test-deploy.yml"
77
- - ".github/workflows/test.yml"
78
- - ".gitignore"
79
- - ".nojekyll"
80
- - ".rubocop.yml"
81
- - CHANGELOG.md
82
- - CONTRIBUTING.md
83
- - Gemfile
84
70
  - LICENSE
85
71
  - README.md
86
- - Rakefile
87
- - bug_report_templates/test-ransack-scope-and-column-same-name.rb
88
- - bug_report_templates/test-ransacker-arel-present-predicate.rb
89
- - docs/.gitignore
90
- - docs/.nojekyll
91
- - docs/babel.config.js
92
- - docs/blog/2022-03-27-ransack-3.0.0.md
93
- - docs/docs/getting-started/_category_.json
94
- - docs/docs/getting-started/advanced-mode.md
95
- - docs/docs/getting-started/configuration.md
96
- - docs/docs/getting-started/search-matches.md
97
- - docs/docs/getting-started/simple-mode.md
98
- - docs/docs/getting-started/sorting.md
99
- - docs/docs/getting-started/using-predicates.md
100
- - docs/docs/going-further/_category_.json
101
- - docs/docs/going-further/acts-as-taggable-on.md
102
- - docs/docs/going-further/associations.md
103
- - docs/docs/going-further/custom-predicates.md
104
- - docs/docs/going-further/documentation.md
105
- - docs/docs/going-further/exporting-to-csv.md
106
- - docs/docs/going-further/external-guides.md
107
- - docs/docs/going-further/form-customisation.md
108
- - docs/docs/going-further/i18n.md
109
- - docs/docs/going-further/img/create_release.png
110
- - docs/docs/going-further/merging-searches.md
111
- - docs/docs/going-further/other-notes.md
112
- - docs/docs/going-further/polymorphic-search.md
113
- - docs/docs/going-further/ransackers.md
114
- - docs/docs/going-further/release_process.md
115
- - docs/docs/going-further/saving-queries.md
116
- - docs/docs/going-further/searching-postgres.md
117
- - docs/docs/going-further/wiki-contributors.md
118
- - docs/docs/intro.md
119
- - docs/docusaurus.config.js
120
- - docs/package.json
121
- - docs/sidebars.js
122
- - docs/src/components/HomepageFeatures/index.js
123
- - docs/src/components/HomepageFeatures/styles.module.css
124
- - docs/src/css/custom.css
125
- - docs/src/pages/index.module.css
126
- - docs/src/pages/markdown-page.md
127
- - docs/static/.nojekyll
128
- - docs/static/img/docusaurus.png
129
- - docs/static/img/favicon.ico
130
- - docs/static/img/logo.svg
131
- - docs/static/img/tutorial/docsVersionDropdown.png
132
- - docs/static/img/tutorial/localeDropdown.png
133
- - docs/static/img/undraw_docusaurus_mountain.svg
134
- - docs/static/img/undraw_docusaurus_react.svg
135
- - docs/static/img/undraw_docusaurus_tree.svg
136
- - docs/static/logo/ransack-h.png
137
- - docs/static/logo/ransack-h.svg
138
- - docs/static/logo/ransack-v.png
139
- - docs/static/logo/ransack-v.svg
140
- - docs/static/logo/ransack.png
141
- - docs/static/logo/ransack.svg
142
- - docs/yarn.lock
143
72
  - lib/polyamorous/activerecord/join_association.rb
73
+ - lib/polyamorous/activerecord/join_association_7_2.rb
144
74
  - lib/polyamorous/activerecord/join_dependency.rb
145
75
  - lib/polyamorous/activerecord/reflection.rb
146
76
  - lib/polyamorous/join.rb
@@ -157,6 +87,7 @@ files:
157
87
  - lib/ransack/helpers.rb
158
88
  - lib/ransack/helpers/form_builder.rb
159
89
  - lib/ransack/helpers/form_helper.rb
90
+ - lib/ransack/invalid_search_error.rb
160
91
  - lib/ransack/locale/ar.yml
161
92
  - lib/ransack/locale/az.yml
162
93
  - lib/ransack/locale/bg.yml
@@ -174,6 +105,7 @@ files:
174
105
  - lib/ransack/locale/id.yml
175
106
  - lib/ransack/locale/it.yml
176
107
  - lib/ransack/locale/ja.yml
108
+ - lib/ransack/locale/ko.yml
177
109
  - lib/ransack/locale/nl.yml
178
110
  - lib/ransack/locale/pt-BR.yml
179
111
  - lib/ransack/locale/ro.yml
@@ -181,6 +113,7 @@ files:
181
113
  - lib/ransack/locale/sk.yml
182
114
  - lib/ransack/locale/sv.yml
183
115
  - lib/ransack/locale/tr.yml
116
+ - lib/ransack/locale/uk.yml
184
117
  - lib/ransack/locale/zh-CN.yml
185
118
  - lib/ransack/locale/zh-TW.yml
186
119
  - lib/ransack/naming.rb
@@ -197,7 +130,6 @@ files:
197
130
  - lib/ransack/translate.rb
198
131
  - lib/ransack/version.rb
199
132
  - lib/ransack/visitor.rb
200
- - ransack.gemspec
201
133
  - spec/blueprints/articles.rb
202
134
  - spec/blueprints/comments.rb
203
135
  - spec/blueprints/notes.rb
@@ -227,8 +159,8 @@ files:
227
159
  homepage: https://github.com/activerecord-hackery/ransack
228
160
  licenses:
229
161
  - MIT
230
- metadata: {}
231
- post_install_message:
162
+ metadata:
163
+ changelog_uri: https://github.com/activerecord-hackery/ransack/blob/main/CHANGELOG.md
232
164
  rdoc_options: []
233
165
  require_paths:
234
166
  - lib
@@ -243,8 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
175
  - !ruby/object:Gem::Version
244
176
  version: '0'
245
177
  requirements: []
246
- rubygems_version: 3.4.10
247
- signing_key:
178
+ rubygems_version: 3.6.2
248
179
  specification_version: 4
249
180
  summary: Object-based searching for Active Record.
250
181
  test_files:
data/.github/FUNDING.yml DELETED
@@ -1,3 +0,0 @@
1
- ---
2
-
3
- tidelift: rubygems/ransack
data/.github/SECURITY.md DELETED
@@ -1,12 +0,0 @@
1
- # Security Policy
2
-
3
- ## Supported Versions
4
-
5
- At the moment, only the latest major.minor release stream is supported with
6
- security updates.
7
-
8
- ## Reporting a Vulnerability
9
-
10
- Please use the Tidelift security contact to [report a security
11
- vulnerability](https://tidelift.com/security). Tidelift will coordinate the fix
12
- and disclosure.
@@ -1,72 +0,0 @@
1
- # For most projects, this workflow file will not need changing; you simply need
2
- # to commit it to your repository.
3
- #
4
- # You may wish to alter this file to override the set of languages analyzed,
5
- # or to provide custom queries or build logic.
6
- #
7
- # ******** NOTE ********
8
- # We have attempted to detect the languages in your repository. Please check
9
- # the `language` matrix defined below to confirm you have the correct set of
10
- # supported CodeQL languages.
11
- #
12
- name: "CodeQL"
13
-
14
- on:
15
- push:
16
- branches: [ main ]
17
- pull_request:
18
- # The branches below must be a subset of the branches above
19
- branches: [ main ]
20
- schedule:
21
- - cron: '43 11 * * 3'
22
-
23
- jobs:
24
- analyze:
25
- name: Analyze
26
- runs-on: ubuntu-latest
27
- permissions:
28
- actions: read
29
- contents: read
30
- security-events: write
31
-
32
- strategy:
33
- fail-fast: false
34
- matrix:
35
- language: [ 'ruby' ]
36
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
- # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
38
-
39
- steps:
40
- - name: Checkout repository
41
- uses: actions/checkout@v3
42
-
43
- # Initializes the CodeQL tools for scanning.
44
- - name: Initialize CodeQL
45
- uses: github/codeql-action/init@v2
46
- with:
47
- languages: ${{ matrix.language }}
48
- # If you wish to specify custom queries, you can do so here or in a config file.
49
- # By default, queries listed here will override any specified in a config file.
50
- # Prefix the list here with "+" to use these queries and those in the config file.
51
-
52
- # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
53
- # queries: security-extended,security-and-quality
54
-
55
-
56
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
57
- # If this step fails, then you should remove it and run the build manually (see below)
58
- - name: Autobuild
59
- uses: github/codeql-action/autobuild@v2
60
-
61
- # ℹ️ Command-line programs to run using the OS shell.
62
- # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
63
-
64
- # If the Autobuild fails above, remove it and uncomment the following three lines.
65
- # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
66
-
67
- # - run: |
68
- # echo "Run, Build Application using script"
69
- # ./location_of_script_within_repo/buildscript.sh
70
-
71
- - name: Perform CodeQL Analysis
72
- uses: github/codeql-action/analyze@v2