ransack 4.4.0 → 4.4.1
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/README.md +2 -2
- data/lib/ransack/nodes/condition.rb +1 -1
- data/lib/ransack/nodes/value.rb +0 -8
- data/lib/ransack/version.rb +1 -1
- data/lib/ransack.rb +1 -5
- data/spec/console.rb +3 -15
- data/spec/factories/articles.rb +7 -0
- data/spec/factories/comments.rb +7 -0
- data/spec/factories/notes.rb +13 -0
- data/spec/factories/people.rb +10 -0
- data/spec/factories/tags.rb +5 -0
- data/spec/ransack/adapters/active_record/base_spec.rb +38 -0
- data/spec/ransack/invalid_search_error_spec.rb +27 -0
- data/spec/ransack/ransacker_spec.rb +69 -0
- data/spec/ransack/search_spec.rb +41 -34
- data/spec/spec_helper.rb +6 -19
- data/spec/support/schema.rb +9 -12
- metadata +21 -17
- data/spec/blueprints/articles.rb +0 -5
- data/spec/blueprints/comments.rb +0 -5
- data/spec/blueprints/notes.rb +0 -5
- data/spec/blueprints/people.rb +0 -8
- data/spec/blueprints/tags.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9174f26f96f894e12f75427d0bc4fee92d3cda026ed899f2356b42973d1fb3bf
|
4
|
+
data.tar.gz: aa87e6f2d75557369ca2cf1e7821aaf833490c2793380535d9e5514823ebd117
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdb319a97b23b03a24ac010136212ac53460f03b208e5dff1efae8ff32833256dff1222abbce533e704320740a5bd1cd1d56e14d35d7264a733d0bc1aa75e918
|
7
|
+
data.tar.gz: 12dd3eae7f2cd9bf78d30ab4ae76e5a3ffc80f33ddb3737856cabf3cfb395adf8b9af83eb5feb4e131c8ffd5294e7bf81870da42f7cdbc734288f086902aab96
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ There are advanced searching solutions around, like ElasticSearch or Algolia. **
|
|
13
13
|
|
14
14
|
Ready to move beyond the basics? Use **advanced features** like i18n and extensive configuration options.
|
15
15
|
|
16
|
-
Ransack is supported for Rails 8.0, 7.2
|
16
|
+
Ransack is supported for Rails 8.0, 7.2 on Ruby 3.1 and later.
|
17
17
|
|
18
18
|
## Installation
|
19
19
|
|
@@ -41,7 +41,7 @@ This [gist](https://gist.github.com/raghubetina/d5fc3df67ddbadcac271) has a quic
|
|
41
41
|
|
42
42
|
* Before filing an issue, please read the [Contributing Guide](CONTRIBUTING.md).
|
43
43
|
* File an issue if a bug is caused by Ransack, is new (has not already been reported), and _can be reproduced from the information you provide_.
|
44
|
-
* Please consider
|
44
|
+
* Please consider creating a pull request with a failing test that demonstrates the problem.
|
45
45
|
* Contributions are welcome. :smiley:
|
46
46
|
* Please do not use the issue tracker for personal support requests. Stack Overflow or [GitHub Discussions](https://github.com/activerecord-hackery/ransack/discussions) is a better place for that where a wider community can help you!
|
47
47
|
|
data/lib/ransack/nodes/value.rb
CHANGED
data/lib/ransack/version.rb
CHANGED
data/lib/ransack.rb
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
require 'active_support/dependencies/autoload'
|
2
2
|
require 'active_support/deprecation'
|
3
|
-
require 'active_support/
|
4
|
-
|
5
|
-
if ::ActiveSupport.version >= ::Gem::Version.new("7.1")
|
6
|
-
require 'active_support/deprecator'
|
7
|
-
end
|
3
|
+
require 'active_support/deprecator'
|
8
4
|
|
9
5
|
require 'active_support/core_ext'
|
10
6
|
require 'ransack/configuration'
|
data/spec/console.rb
CHANGED
@@ -1,25 +1,13 @@
|
|
1
1
|
Bundler.setup
|
2
|
-
require '
|
3
|
-
require 'sham'
|
2
|
+
require 'factory_bot'
|
4
3
|
require 'faker'
|
5
4
|
require 'ransack'
|
6
5
|
|
7
|
-
Dir[File.expand_path('../../spec/{helpers,support,
|
6
|
+
Dir[File.expand_path('../../spec/{helpers,support,factories}/*.rb', __FILE__)]
|
8
7
|
.each do |f|
|
9
8
|
require f
|
10
9
|
end
|
11
10
|
|
12
|
-
|
13
|
-
name { Faker::Name.name }
|
14
|
-
title { Faker::Lorem.sentence }
|
15
|
-
body { Faker::Lorem.paragraph }
|
16
|
-
salary { |index| 30000 + (index * 1000) }
|
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
|
-
notable_id { |id| id }
|
23
|
-
end
|
11
|
+
Faker::Config.random = Random.new(0)
|
24
12
|
|
25
13
|
Schema.create
|
@@ -0,0 +1,10 @@
|
|
1
|
+
FactoryBot.define do
|
2
|
+
factory :person do
|
3
|
+
name { Faker::Name.name }
|
4
|
+
email { "test@example.com" }
|
5
|
+
sequence(:salary) { |n| 30000 + (n * 1000) }
|
6
|
+
only_sort { Faker::Lorem.words(number: 3).join(' ') }
|
7
|
+
only_search { Faker::Lorem.words(number: 3).join(' ') }
|
8
|
+
only_admin { Faker::Lorem.words(number: 3).join(' ') }
|
9
|
+
end
|
10
|
+
end
|
@@ -729,6 +729,44 @@ module Ransack
|
|
729
729
|
end
|
730
730
|
end
|
731
731
|
|
732
|
+
context 'ransacker with different types' do
|
733
|
+
it 'handles string type ransacker correctly' do
|
734
|
+
s = Person.ransack(name_case_insensitive_eq: 'test')
|
735
|
+
expect(s.result.to_sql).to match(/LOWER\(.*\) = 'test'/)
|
736
|
+
end
|
737
|
+
|
738
|
+
it 'handles integer type ransacker correctly' do
|
739
|
+
s = Person.ransack(sql_literal_id_eq: 1)
|
740
|
+
expect(s.result.to_sql).to match(/people\.id = 1/)
|
741
|
+
end
|
742
|
+
end
|
743
|
+
|
744
|
+
context 'ransacker with formatter returning nil' do
|
745
|
+
it 'handles formatter returning nil gracefully' do
|
746
|
+
# This tests the edge case where a formatter might return nil
|
747
|
+
s = Person.ransack(article_tags_eq: 999999) # Non-existent tag ID
|
748
|
+
expect { s.result.to_sql }.not_to raise_error
|
749
|
+
end
|
750
|
+
end
|
751
|
+
|
752
|
+
context 'ransacker with array formatters' do
|
753
|
+
it 'handles array_people_ids formatter correctly' do
|
754
|
+
person1 = Person.create!(name: 'Test1')
|
755
|
+
person2 = Person.create!(name: 'Test2')
|
756
|
+
|
757
|
+
s = Person.ransack(array_people_ids_eq: 'test')
|
758
|
+
expect { s.result }.not_to raise_error
|
759
|
+
end
|
760
|
+
|
761
|
+
it 'handles array_where_people_ids formatter correctly' do
|
762
|
+
person1 = Person.create!(name: 'Test1')
|
763
|
+
person2 = Person.create!(name: 'Test2')
|
764
|
+
|
765
|
+
s = Person.ransack(array_where_people_ids_eq: [person1.id, person2.id])
|
766
|
+
expect { s.result }.not_to raise_error
|
767
|
+
end
|
768
|
+
end
|
769
|
+
|
732
770
|
context 'regular sorting' do
|
733
771
|
it 'allows sort by desc' do
|
734
772
|
search = Person.ransack(sorts: ['name desc'])
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Ransack
|
4
|
+
describe InvalidSearchError do
|
5
|
+
it 'inherits from ArgumentError' do
|
6
|
+
expect(InvalidSearchError.superclass).to eq(ArgumentError)
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'can be instantiated with a message' do
|
10
|
+
error = InvalidSearchError.new('Test error message')
|
11
|
+
expect(error.message).to eq('Test error message')
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'can be instantiated without a message' do
|
15
|
+
error = InvalidSearchError.new
|
16
|
+
expect(error.message).to eq('Ransack::InvalidSearchError')
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'can be raised and caught' do
|
20
|
+
expect { raise InvalidSearchError.new('Test') }.to raise_error(InvalidSearchError, 'Test')
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'can be raised and caught as ArgumentError' do
|
24
|
+
expect { raise InvalidSearchError.new('Test') }.to raise_error(ArgumentError, 'Test')
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Ransack
|
4
|
+
describe Ransacker do
|
5
|
+
let(:klass) { Person }
|
6
|
+
let(:name) { :test_ransacker }
|
7
|
+
let(:opts) { {} }
|
8
|
+
|
9
|
+
describe '#initialize' do
|
10
|
+
context 'with minimal options' do
|
11
|
+
subject { Ransacker.new(klass, name, opts) }
|
12
|
+
|
13
|
+
it 'sets the name' do
|
14
|
+
expect(subject.name).to eq(name)
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'sets default type to string' do
|
18
|
+
expect(subject.type).to eq(:string)
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'sets default args to [:parent]' do
|
22
|
+
expect(subject.args).to eq([:parent])
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
context 'with custom options' do
|
27
|
+
let(:opts) { { type: :integer, args: [:parent, :custom_arg], formatter: proc { |v| v.to_i } } }
|
28
|
+
|
29
|
+
subject { Ransacker.new(klass, name, opts) }
|
30
|
+
|
31
|
+
it 'sets the custom type' do
|
32
|
+
expect(subject.type).to eq(:integer)
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'sets the custom args' do
|
36
|
+
expect(subject.args).to eq([:parent, :custom_arg])
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'sets the formatter' do
|
40
|
+
expect(subject.formatter).to eq(opts[:formatter])
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
context 'with callable option' do
|
45
|
+
let(:callable) { proc { |parent| parent.table[:id] } }
|
46
|
+
let(:opts) { { callable: callable } }
|
47
|
+
|
48
|
+
subject { Ransacker.new(klass, name, opts) }
|
49
|
+
|
50
|
+
it 'initializes successfully' do
|
51
|
+
expect(subject).to be_a(Ransacker)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe 'basic functionality' do
|
57
|
+
subject { Ransacker.new(klass, name, opts) }
|
58
|
+
|
59
|
+
it 'responds to required methods' do
|
60
|
+
expect(subject).to respond_to(:name)
|
61
|
+
expect(subject).to respond_to(:type)
|
62
|
+
expect(subject).to respond_to(:args)
|
63
|
+
expect(subject).to respond_to(:formatter)
|
64
|
+
expect(subject).to respond_to(:attr_from)
|
65
|
+
expect(subject).to respond_to(:call)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
data/spec/ransack/search_spec.rb
CHANGED
@@ -313,6 +313,46 @@ module Ransack
|
|
313
313
|
expect { Search.new(Person, params) }.not_to change { params }
|
314
314
|
end
|
315
315
|
|
316
|
+
context 'with empty search parameters' do
|
317
|
+
it 'handles completely empty parameters' do
|
318
|
+
search = Search.new(Person, {})
|
319
|
+
expect(search.result.to_sql).not_to match(/WHERE/)
|
320
|
+
end
|
321
|
+
|
322
|
+
it 'handles nil parameters' do
|
323
|
+
search = Search.new(Person, nil)
|
324
|
+
expect(search.result.to_sql).not_to match(/WHERE/)
|
325
|
+
end
|
326
|
+
end
|
327
|
+
|
328
|
+
context 'with whitespace-only values' do
|
329
|
+
before do
|
330
|
+
Ransack.configure { |c| c.strip_whitespace = true }
|
331
|
+
end
|
332
|
+
|
333
|
+
it 'removes whitespace-only values' do
|
334
|
+
expect_any_instance_of(Search).to receive(:build).with({})
|
335
|
+
Search.new(Person, name_eq: ' ')
|
336
|
+
end
|
337
|
+
|
338
|
+
it 'keeps values with content after whitespace stripping' do
|
339
|
+
expect_any_instance_of(Search).to receive(:build).with({ 'name_eq' => 'test' })
|
340
|
+
Search.new(Person, name_eq: ' test ')
|
341
|
+
end
|
342
|
+
end
|
343
|
+
|
344
|
+
context 'with special characters in values' do
|
345
|
+
it 'handles values with special regex characters' do
|
346
|
+
search = Search.new(Person, name_cont: 'test[(){}^$|?*+.\\')
|
347
|
+
expect { search.result }.not_to raise_error
|
348
|
+
end
|
349
|
+
|
350
|
+
it 'handles values with SQL injection attempts' do
|
351
|
+
search = Search.new(Person, name_cont: "'; DROP TABLE people; --")
|
352
|
+
expect { search.result }.not_to raise_error
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
316
356
|
context "ransackable_scope" do
|
317
357
|
around(:each) do |example|
|
318
358
|
Person.define_singleton_method(:name_eq) do |name|
|
@@ -410,9 +450,6 @@ module Ransack
|
|
410
450
|
let(:people_name_field) {
|
411
451
|
"#{quote_table_name("people")}.#{quote_column_name("name")}"
|
412
452
|
}
|
413
|
-
let(:people_temperament_field) {
|
414
|
-
"#{quote_table_name("people")}.#{quote_column_name("temperament")}"
|
415
|
-
}
|
416
453
|
let(:children_people_name_field) {
|
417
454
|
"#{quote_table_name("children_people")}.#{quote_column_name("name")}"
|
418
455
|
}
|
@@ -427,36 +464,6 @@ module Ransack
|
|
427
464
|
children_people_name_field} = 'Ernie'/
|
428
465
|
end
|
429
466
|
|
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
|
-
|
460
467
|
it 'use appropriate table alias' do
|
461
468
|
s = Search.new(Person, {
|
462
469
|
name_eq: "person_name_query",
|
@@ -556,7 +563,7 @@ module Ransack
|
|
556
563
|
|
557
564
|
all_or_load, uniq_or_distinct = :load, :distinct
|
558
565
|
expect(s.result.send(all_or_load).size)
|
559
|
-
.to eq(
|
566
|
+
.to eq(8998)
|
560
567
|
expect(s.result(distinct: true).size)
|
561
568
|
.to eq(10)
|
562
569
|
expect(s.result.send(all_or_load).send(uniq_or_distinct))
|
data/spec/spec_helper.rb
CHANGED
@@ -1,37 +1,27 @@
|
|
1
1
|
require 'ransack'
|
2
|
-
require '
|
2
|
+
require 'factory_bot'
|
3
3
|
require 'faker'
|
4
4
|
require 'action_controller'
|
5
5
|
require 'ransack/helpers'
|
6
6
|
require 'pry'
|
7
7
|
require 'simplecov'
|
8
8
|
require 'byebug'
|
9
|
-
require '
|
9
|
+
require 'rspec'
|
10
10
|
|
11
11
|
SimpleCov.start
|
12
12
|
I18n.enforce_available_locales = false
|
13
13
|
Time.zone = 'Eastern Time (US & Canada)'
|
14
14
|
I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'support', '*.yml')]
|
15
15
|
|
16
|
-
Dir[File.expand_path('../{helpers,support,
|
16
|
+
Dir[File.expand_path('../{helpers,support,factories}/*.rb', __FILE__)]
|
17
17
|
.each { |f| require f }
|
18
18
|
|
19
19
|
Faker::Config.random = Random.new(0)
|
20
|
-
Sham.define do
|
21
|
-
name { Faker::Name.name }
|
22
|
-
title { Faker::Lorem.sentence }
|
23
|
-
body { Faker::Lorem.paragraph }
|
24
|
-
salary { |index| 30000 + (index * 1000) }
|
25
|
-
tag_name { Faker::Lorem.words(number: 3).join(' ') }
|
26
|
-
note { Faker::Lorem.words(number: 7).join(' ') }
|
27
|
-
only_admin { Faker::Lorem.words(number: 3).join(' ') }
|
28
|
-
only_search { Faker::Lorem.words(number: 3).join(' ') }
|
29
|
-
only_sort { Faker::Lorem.words(number: 3).join(' ') }
|
30
|
-
notable_id { |id| id }
|
31
|
-
end
|
32
20
|
|
33
21
|
RSpec.configure do |config|
|
34
22
|
config.alias_it_should_behave_like_to :it_has_behavior, 'has behavior'
|
23
|
+
|
24
|
+
config.include FactoryBot::Syntax::Methods
|
35
25
|
|
36
26
|
config.before(:suite) do
|
37
27
|
message = "Running Ransack specs with #{
|
@@ -41,12 +31,9 @@ RSpec.configure do |config|
|
|
41
31
|
line = '=' * message.length
|
42
32
|
puts line, message, line
|
43
33
|
Schema.create
|
44
|
-
SubDB::Schema.create
|
34
|
+
SubDB::Schema.create if defined?(SubDB)
|
45
35
|
end
|
46
36
|
|
47
|
-
config.before(:all) { Sham.reset(:before_all) }
|
48
|
-
config.before(:each) { Sham.reset(:before_each) }
|
49
|
-
|
50
37
|
config.include RansackHelper
|
51
38
|
config.include PolyamorousHelper
|
52
39
|
end
|
data/spec/support/schema.rb
CHANGED
@@ -81,8 +81,6 @@ class Person < ApplicationRecord
|
|
81
81
|
scope :sort_by_reverse_name_asc, lambda { order(Arel.sql("REVERSE(name) ASC")) }
|
82
82
|
scope :sort_by_reverse_name_desc, lambda { order("REVERSE(name) DESC") }
|
83
83
|
|
84
|
-
enum :temperament, { sanguine: 1, choleric: 2, melancholic: 3, phlegmatic: 4 }
|
85
|
-
|
86
84
|
alias_attribute :full_name, :name
|
87
85
|
|
88
86
|
ransack_alias :term, :name_or_email
|
@@ -118,7 +116,7 @@ class Person < ApplicationRecord
|
|
118
116
|
)
|
119
117
|
end
|
120
118
|
|
121
|
-
ransacker :sql_literal_id do
|
119
|
+
ransacker :sql_literal_id, type: :integer do
|
122
120
|
Arel.sql('people.id')
|
123
121
|
end
|
124
122
|
|
@@ -302,7 +300,6 @@ module Schema
|
|
302
300
|
t.string :new_start
|
303
301
|
t.string :stop_end
|
304
302
|
t.integer :salary
|
305
|
-
t.integer :temperament
|
306
303
|
t.date :life_start
|
307
304
|
t.boolean :awesome, default: false
|
308
305
|
t.boolean :terms_and_conditions, default: false
|
@@ -373,23 +370,23 @@ module Schema
|
|
373
370
|
end
|
374
371
|
|
375
372
|
10.times do
|
376
|
-
person =
|
377
|
-
|
373
|
+
person = FactoryBot.create(:person)
|
374
|
+
FactoryBot.create(:note, :for_person, notable: person)
|
378
375
|
3.times do
|
379
|
-
article =
|
376
|
+
article = FactoryBot.create(:article, person: person)
|
380
377
|
3.times do
|
381
|
-
article.tags = [
|
378
|
+
article.tags = [FactoryBot.create(:tag), FactoryBot.create(:tag), FactoryBot.create(:tag)]
|
382
379
|
end
|
383
|
-
|
380
|
+
FactoryBot.create(:note, :for_article, notable: article)
|
384
381
|
10.times do
|
385
|
-
|
382
|
+
FactoryBot.create(:comment, article: article, person: person)
|
386
383
|
end
|
387
384
|
end
|
388
385
|
end
|
389
386
|
|
390
|
-
|
387
|
+
FactoryBot.create(:comment,
|
391
388
|
body: 'First post!',
|
392
|
-
article:
|
389
|
+
article: FactoryBot.create(:article, title: 'Hello, world!')
|
393
390
|
)
|
394
391
|
end
|
395
392
|
end
|
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.4.
|
4
|
+
version: 4.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ernie Miller
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
- David Rodríguez
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2025-09-
|
14
|
+
date: 2025-09-29 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: activerecord
|
@@ -19,28 +19,28 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '7.
|
22
|
+
version: '7.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '7.
|
29
|
+
version: '7.2'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: activesupport
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - ">="
|
35
35
|
- !ruby/object:Gem::Version
|
36
|
-
version: '7.
|
36
|
+
version: '7.2'
|
37
37
|
type: :runtime
|
38
38
|
prerelease: false
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '7.
|
43
|
+
version: '7.2'
|
44
44
|
- !ruby/object:Gem::Dependency
|
45
45
|
name: i18n
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,12 +130,12 @@ files:
|
|
130
130
|
- lib/ransack/translate.rb
|
131
131
|
- lib/ransack/version.rb
|
132
132
|
- lib/ransack/visitor.rb
|
133
|
-
- spec/blueprints/articles.rb
|
134
|
-
- spec/blueprints/comments.rb
|
135
|
-
- spec/blueprints/notes.rb
|
136
|
-
- spec/blueprints/people.rb
|
137
|
-
- spec/blueprints/tags.rb
|
138
133
|
- spec/console.rb
|
134
|
+
- spec/factories/articles.rb
|
135
|
+
- spec/factories/comments.rb
|
136
|
+
- spec/factories/notes.rb
|
137
|
+
- spec/factories/people.rb
|
138
|
+
- spec/factories/tags.rb
|
139
139
|
- spec/helpers/polyamorous_helper.rb
|
140
140
|
- spec/helpers/ransack_helper.rb
|
141
141
|
- spec/polyamorous/activerecord_compatibility_spec.rb
|
@@ -147,10 +147,12 @@ files:
|
|
147
147
|
- spec/ransack/configuration_spec.rb
|
148
148
|
- spec/ransack/helpers/form_builder_spec.rb
|
149
149
|
- spec/ransack/helpers/form_helper_spec.rb
|
150
|
+
- spec/ransack/invalid_search_error_spec.rb
|
150
151
|
- spec/ransack/nodes/condition_spec.rb
|
151
152
|
- spec/ransack/nodes/grouping_spec.rb
|
152
153
|
- spec/ransack/nodes/value_spec.rb
|
153
154
|
- spec/ransack/predicate_spec.rb
|
155
|
+
- spec/ransack/ransacker_spec.rb
|
154
156
|
- spec/ransack/search_spec.rb
|
155
157
|
- spec/ransack/translate_spec.rb
|
156
158
|
- spec/spec_helper.rb
|
@@ -168,7 +170,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
170
|
requirements:
|
169
171
|
- - ">="
|
170
172
|
- !ruby/object:Gem::Version
|
171
|
-
version: '3.
|
173
|
+
version: '3.1'
|
172
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
175
|
requirements:
|
174
176
|
- - ">="
|
@@ -179,12 +181,12 @@ rubygems_version: 3.6.2
|
|
179
181
|
specification_version: 4
|
180
182
|
summary: Object-based searching for Active Record.
|
181
183
|
test_files:
|
182
|
-
- spec/blueprints/articles.rb
|
183
|
-
- spec/blueprints/comments.rb
|
184
|
-
- spec/blueprints/notes.rb
|
185
|
-
- spec/blueprints/people.rb
|
186
|
-
- spec/blueprints/tags.rb
|
187
184
|
- spec/console.rb
|
185
|
+
- spec/factories/articles.rb
|
186
|
+
- spec/factories/comments.rb
|
187
|
+
- spec/factories/notes.rb
|
188
|
+
- spec/factories/people.rb
|
189
|
+
- spec/factories/tags.rb
|
188
190
|
- spec/helpers/polyamorous_helper.rb
|
189
191
|
- spec/helpers/ransack_helper.rb
|
190
192
|
- spec/polyamorous/activerecord_compatibility_spec.rb
|
@@ -196,10 +198,12 @@ test_files:
|
|
196
198
|
- spec/ransack/configuration_spec.rb
|
197
199
|
- spec/ransack/helpers/form_builder_spec.rb
|
198
200
|
- spec/ransack/helpers/form_helper_spec.rb
|
201
|
+
- spec/ransack/invalid_search_error_spec.rb
|
199
202
|
- spec/ransack/nodes/condition_spec.rb
|
200
203
|
- spec/ransack/nodes/grouping_spec.rb
|
201
204
|
- spec/ransack/nodes/value_spec.rb
|
202
205
|
- spec/ransack/predicate_spec.rb
|
206
|
+
- spec/ransack/ransacker_spec.rb
|
203
207
|
- spec/ransack/search_spec.rb
|
204
208
|
- spec/ransack/translate_spec.rb
|
205
209
|
- spec/spec_helper.rb
|
data/spec/blueprints/articles.rb
DELETED
data/spec/blueprints/comments.rb
DELETED
data/spec/blueprints/notes.rb
DELETED
data/spec/blueprints/people.rb
DELETED
data/spec/blueprints/tags.rb
DELETED