pg_search 2.1.7 → 2.3.3
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/.codeclimate.yml +1 -0
- data/.editorconfig +10 -0
- data/.github/dependabot.yml +11 -0
- data/.rubocop.yml +89 -7
- data/.travis.yml +11 -19
- data/CHANGELOG.md +38 -14
- data/Gemfile +1 -1
- data/LICENSE +1 -1
- data/README.md +74 -42
- data/lib/pg_search.rb +15 -58
- data/lib/pg_search/document.rb +2 -2
- data/lib/pg_search/features/dmetaphone.rb +4 -6
- data/lib/pg_search/features/trigram.rb +29 -5
- data/lib/pg_search/features/tsearch.rb +13 -12
- data/lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb +6 -6
- data/lib/pg_search/migration/templates/create_pg_search_documents.rb.erb +2 -2
- data/lib/pg_search/model.rb +59 -0
- data/lib/pg_search/multisearch.rb +10 -1
- data/lib/pg_search/multisearch/rebuilder.rb +7 -3
- data/lib/pg_search/multisearchable.rb +4 -4
- data/lib/pg_search/scope_options.rb +2 -10
- data/lib/pg_search/tasks.rb +2 -1
- data/lib/pg_search/version.rb +1 -1
- data/pg_search.gemspec +10 -5
- data/spec/.rubocop.yml +2 -2
- data/spec/integration/.rubocop.yml +11 -0
- data/spec/integration/associations_spec.rb +36 -75
- data/spec/integration/deprecation_spec.rb +33 -0
- data/spec/integration/pagination_spec.rb +1 -1
- data/spec/integration/pg_search_spec.rb +199 -188
- data/spec/integration/single_table_inheritance_spec.rb +2 -2
- data/spec/lib/pg_search/configuration/association_spec.rb +10 -8
- data/spec/lib/pg_search/configuration/foreign_column_spec.rb +3 -3
- data/spec/lib/pg_search/features/dmetaphone_spec.rb +2 -2
- data/spec/lib/pg_search/features/trigram_spec.rb +48 -19
- data/spec/lib/pg_search/features/tsearch_spec.rb +16 -10
- data/spec/lib/pg_search/multisearch/rebuilder_spec.rb +124 -76
- data/spec/lib/pg_search/multisearch_spec.rb +49 -30
- data/spec/lib/pg_search/multisearchable_spec.rb +155 -101
- data/spec/lib/pg_search/normalizer_spec.rb +12 -10
- data/spec/lib/pg_search_spec.rb +62 -46
- data/spec/spec_helper.rb +13 -4
- data/spec/support/database.rb +1 -1
- metadata +90 -13
@@ -2,15 +2,16 @@
|
|
2
2
|
|
3
3
|
require "spec_helper"
|
4
4
|
|
5
|
+
# rubocop:disable RSpec/NestedGroups
|
5
6
|
describe PgSearch::Normalizer do
|
6
7
|
describe "#add_normalization" do
|
7
8
|
context "when config[:ignore] includes :accents" do
|
8
9
|
context "when passed an Arel node" do
|
9
10
|
it "wraps the expression in unaccent()" do
|
10
|
-
config =
|
11
|
+
config = instance_double("PgSearch::Configuration", "config", ignore: [:accents])
|
11
12
|
node = Arel::Nodes::NamedFunction.new("foo", [Arel::Nodes.build_quoted("bar")])
|
12
13
|
|
13
|
-
normalizer =
|
14
|
+
normalizer = described_class.new(config)
|
14
15
|
expect(normalizer.add_normalization(node)).to eq("unaccent(foo('bar'))")
|
15
16
|
end
|
16
17
|
|
@@ -19,9 +20,9 @@ describe PgSearch::Normalizer do
|
|
19
20
|
allow(PgSearch).to receive(:unaccent_function).and_return("my_unaccent")
|
20
21
|
node = Arel::Nodes::NamedFunction.new("foo", [Arel::Nodes.build_quoted("bar")])
|
21
22
|
|
22
|
-
config =
|
23
|
+
config = instance_double("PgSearch::Configuration", "config", ignore: [:accents])
|
23
24
|
|
24
|
-
normalizer =
|
25
|
+
normalizer = described_class.new(config)
|
25
26
|
expect(normalizer.add_normalization(node)).to eq("my_unaccent(foo('bar'))")
|
26
27
|
end
|
27
28
|
end
|
@@ -29,9 +30,9 @@ describe PgSearch::Normalizer do
|
|
29
30
|
|
30
31
|
context "when passed a String" do
|
31
32
|
it "wraps the expression in unaccent()" do
|
32
|
-
config =
|
33
|
+
config = instance_double("PgSearch::Configuration", "config", ignore: [:accents])
|
33
34
|
|
34
|
-
normalizer =
|
35
|
+
normalizer = described_class.new(config)
|
35
36
|
expect(normalizer.add_normalization("foo")).to eq("unaccent(foo)")
|
36
37
|
end
|
37
38
|
|
@@ -39,9 +40,9 @@ describe PgSearch::Normalizer do
|
|
39
40
|
it "wraps the expression in that function" do
|
40
41
|
allow(PgSearch).to receive(:unaccent_function).and_return("my_unaccent")
|
41
42
|
|
42
|
-
config =
|
43
|
+
config = instance_double("PgSearch::Configuration", "config", ignore: [:accents])
|
43
44
|
|
44
|
-
normalizer =
|
45
|
+
normalizer = described_class.new(config)
|
45
46
|
expect(normalizer.add_normalization("foo")).to eq("my_unaccent(foo)")
|
46
47
|
end
|
47
48
|
end
|
@@ -50,11 +51,12 @@ describe PgSearch::Normalizer do
|
|
50
51
|
|
51
52
|
context "when config[:ignore] does not include :accents" do
|
52
53
|
it "passes the expression through" do
|
53
|
-
config =
|
54
|
+
config = instance_double("PgSearch::Configuration", "config", ignore: [])
|
54
55
|
|
55
|
-
normalizer =
|
56
|
+
normalizer = described_class.new(config)
|
56
57
|
expect(normalizer.add_normalization("foo")).to eq("foo")
|
57
58
|
end
|
58
59
|
end
|
59
60
|
end
|
60
61
|
end
|
62
|
+
# rubocop:enable RSpec/NestedGroups
|
data/spec/lib/pg_search_spec.rb
CHANGED
@@ -15,52 +15,56 @@ class << PgSearch::Document
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
+
# rubocop:disable RSpec/NestedGroups
|
18
19
|
describe PgSearch do
|
19
20
|
describe ".multisearch" do
|
20
|
-
with_table "pg_search_documents",
|
21
|
+
with_table "pg_search_documents", &DOCUMENTS_SCHEMA
|
21
22
|
|
22
23
|
describe "delegation to PgSearch::Document.search" do
|
23
|
-
subject {
|
24
|
+
subject { described_class.multisearch(query) }
|
25
|
+
|
26
|
+
let(:query) { instance_double("String", "query") }
|
27
|
+
let(:relation) { instance_double("ActiveRecord::Relation", "relation") }
|
24
28
|
|
25
|
-
let(:query) { double(:query) }
|
26
|
-
let(:relation) { double(:relation) }
|
27
29
|
before do
|
28
|
-
|
30
|
+
allow(PgSearch::Document).to receive(:search).with(query).and_return(relation)
|
29
31
|
end
|
30
32
|
|
31
33
|
it { is_expected.to eq(relation) }
|
32
34
|
end
|
33
35
|
|
34
36
|
context "with PgSearch.multisearch_options set to a Hash" do
|
35
|
-
before { allow(PgSearch).to receive(:multisearch_options).and_return(using: :dmetaphone) }
|
36
37
|
subject do
|
37
38
|
PgSearch::Document.clear_searchable_cache
|
38
|
-
|
39
|
+
described_class.multisearch(query).map(&:searchable)
|
39
40
|
end
|
40
41
|
|
42
|
+
before { allow(described_class).to receive(:multisearch_options).and_return(using: :dmetaphone) }
|
43
|
+
|
41
44
|
with_model :MultisearchableModel do
|
42
45
|
table do |t|
|
43
46
|
t.string :title
|
44
47
|
end
|
45
48
|
model do
|
46
|
-
include PgSearch
|
49
|
+
include PgSearch::Model
|
47
50
|
multisearchable against: :title
|
48
51
|
end
|
49
52
|
end
|
50
53
|
|
51
54
|
let!(:soundalike_record) { MultisearchableModel.create!(title: 'foning') }
|
52
55
|
let(:query) { "Phoning" }
|
56
|
+
|
53
57
|
it { is_expected.to include(soundalike_record) }
|
54
58
|
end
|
55
59
|
|
56
60
|
context "with PgSearch.multisearch_options set to a Proc" do
|
57
61
|
subject do
|
58
62
|
PgSearch::Document.clear_searchable_cache
|
59
|
-
|
63
|
+
described_class.multisearch(query, soundalike).map(&:searchable)
|
60
64
|
end
|
61
65
|
|
62
66
|
before do
|
63
|
-
allow(
|
67
|
+
allow(described_class).to receive(:multisearch_options) do
|
64
68
|
lambda do |query, soundalike|
|
65
69
|
if soundalike
|
66
70
|
{ using: :dmetaphone, query: query }
|
@@ -76,7 +80,7 @@ describe PgSearch do
|
|
76
80
|
t.string :title
|
77
81
|
end
|
78
82
|
model do
|
79
|
-
include PgSearch
|
83
|
+
include PgSearch::Model
|
80
84
|
multisearchable against: :title
|
81
85
|
end
|
82
86
|
end
|
@@ -86,16 +90,18 @@ describe PgSearch do
|
|
86
90
|
|
87
91
|
context "with soundalike true" do
|
88
92
|
let(:soundalike) { true }
|
93
|
+
|
89
94
|
it { is_expected.to include(soundalike_record) }
|
90
95
|
end
|
91
96
|
|
92
97
|
context "with soundalike false" do
|
93
98
|
let(:soundalike) { false }
|
99
|
+
|
94
100
|
it { is_expected.not_to include(soundalike_record) }
|
95
101
|
end
|
96
102
|
end
|
97
103
|
|
98
|
-
context "on an STI subclass" do
|
104
|
+
context "when on an STI subclass" do
|
99
105
|
context "with standard type column" do
|
100
106
|
with_model :SuperclassModel do
|
101
107
|
table do |t|
|
@@ -106,7 +112,7 @@ describe PgSearch do
|
|
106
112
|
|
107
113
|
before do
|
108
114
|
searchable_subclass_model = Class.new(SuperclassModel) do
|
109
|
-
include PgSearch
|
115
|
+
include PgSearch::Model
|
110
116
|
multisearchable against: :content
|
111
117
|
end
|
112
118
|
stub_const("SearchableSubclassModel", searchable_subclass_model)
|
@@ -128,7 +134,7 @@ describe PgSearch do
|
|
128
134
|
|
129
135
|
expect(PgSearch::Document.count).to be 2
|
130
136
|
|
131
|
-
results =
|
137
|
+
results = described_class.multisearch("foo bar")
|
132
138
|
|
133
139
|
expect(results).to eq [included.pg_search_document]
|
134
140
|
end
|
@@ -141,11 +147,12 @@ describe PgSearch do
|
|
141
147
|
model = SearchableSubclassModel.find(model.id)
|
142
148
|
model.content = "foo"
|
143
149
|
model.save!
|
144
|
-
results =
|
150
|
+
results = described_class.multisearch("foo")
|
145
151
|
expect(results.size).to eq(SearchableSubclassModel.count)
|
146
152
|
end
|
147
153
|
|
148
|
-
|
154
|
+
# rubocop:disable RSpec/MultipleExpectations
|
155
|
+
specify "reindexing works" do
|
149
156
|
NonSearchableSubclassModel.create!(content: "foo bar")
|
150
157
|
NonSearchableSubclassModel.create!(content: "baz")
|
151
158
|
expected = SearchableSubclassModel.create!(content: "baz")
|
@@ -166,6 +173,7 @@ describe PgSearch do
|
|
166
173
|
expect(PgSearch::Document.first.searchable.class).to be SearchableSubclassModel
|
167
174
|
expect(PgSearch::Document.first.searchable).to eq expected
|
168
175
|
end
|
176
|
+
# rubocop:enable RSpec/MultipleExpectations
|
169
177
|
|
170
178
|
it "reindexing searchable STI doesn't clobber other related STI models" do
|
171
179
|
SearchableSubclassModel.create!(content: "baz")
|
@@ -196,7 +204,7 @@ describe PgSearch do
|
|
196
204
|
|
197
205
|
before do
|
198
206
|
searchable_subclass_model = Class.new(SuperclassModel) do
|
199
|
-
include PgSearch
|
207
|
+
include PgSearch::Model
|
200
208
|
multisearchable against: :content
|
201
209
|
end
|
202
210
|
stub_const("SearchableSubclassModel", searchable_subclass_model)
|
@@ -218,7 +226,7 @@ describe PgSearch do
|
|
218
226
|
|
219
227
|
expect(PgSearch::Document.count).to be 2
|
220
228
|
|
221
|
-
results =
|
229
|
+
results = described_class.multisearch("foo bar")
|
222
230
|
|
223
231
|
expect(results).to eq [included.pg_search_document]
|
224
232
|
end
|
@@ -227,57 +235,65 @@ describe PgSearch do
|
|
227
235
|
end
|
228
236
|
|
229
237
|
describe ".disable_multisearch" do
|
230
|
-
it "
|
231
|
-
|
232
|
-
|
233
|
-
|
238
|
+
it "disables multisearch temporarily" do
|
239
|
+
multisearch_enabled_before = described_class.multisearch_enabled?
|
240
|
+
multisearch_enabled_inside = nil
|
241
|
+
described_class.disable_multisearch do
|
242
|
+
multisearch_enabled_inside = described_class.multisearch_enabled?
|
234
243
|
end
|
235
|
-
|
244
|
+
multisearch_enabled_after = described_class.multisearch_enabled?
|
236
245
|
|
237
|
-
expect(
|
238
|
-
expect(
|
239
|
-
expect(
|
246
|
+
expect(multisearch_enabled_before).to be(true)
|
247
|
+
expect(multisearch_enabled_inside).to be(false)
|
248
|
+
expect(multisearch_enabled_after).to be(true)
|
240
249
|
end
|
241
250
|
|
242
|
-
it "
|
243
|
-
|
251
|
+
it "reenables multisearch after an error" do
|
252
|
+
multisearch_enabled_before = described_class.multisearch_enabled?
|
253
|
+
multisearch_enabled_inside = nil
|
244
254
|
begin
|
245
|
-
|
246
|
-
|
255
|
+
described_class.disable_multisearch do
|
256
|
+
multisearch_enabled_inside = described_class.multisearch_enabled?
|
247
257
|
raise
|
248
258
|
end
|
249
259
|
rescue StandardError
|
250
260
|
end
|
261
|
+
multisearch_enabled_after = described_class.multisearch_enabled?
|
251
262
|
|
252
|
-
|
253
|
-
|
254
|
-
expect(
|
255
|
-
expect(@multisearch_enabled_inside).to be(false)
|
256
|
-
expect(@multisearch_enabled_after).to be(true)
|
263
|
+
expect(multisearch_enabled_before).to be(true)
|
264
|
+
expect(multisearch_enabled_inside).to be(false)
|
265
|
+
expect(multisearch_enabled_after).to be(true)
|
257
266
|
end
|
258
267
|
|
259
|
-
|
268
|
+
# rubocop:disable RSpec/ExampleLength
|
269
|
+
it "does not disable multisearch on other threads" do
|
260
270
|
values = Queue.new
|
261
271
|
sync = Queue.new
|
272
|
+
|
273
|
+
# rubocop:disable ThreadSafety/NewThread
|
262
274
|
Thread.new do
|
263
|
-
values.push
|
275
|
+
values.push described_class.multisearch_enabled?
|
264
276
|
sync.pop # wait
|
265
|
-
values.push
|
277
|
+
values.push described_class.multisearch_enabled?
|
266
278
|
sync.pop # wait
|
267
|
-
values.push
|
279
|
+
values.push described_class.multisearch_enabled?
|
268
280
|
end
|
281
|
+
# rubocop:enable ThreadSafety/NewThread
|
269
282
|
|
270
|
-
|
271
|
-
|
283
|
+
multisearch_enabled_before = values.pop
|
284
|
+
multisearch_enabled_inside = nil
|
285
|
+
described_class.disable_multisearch do
|
272
286
|
sync.push :go
|
273
|
-
|
287
|
+
multisearch_enabled_inside = values.pop
|
274
288
|
end
|
275
289
|
sync.push :go
|
276
|
-
|
290
|
+
multisearch_enabled_after = values.pop
|
277
291
|
|
278
|
-
expect(
|
279
|
-
expect(
|
280
|
-
expect(
|
292
|
+
expect(multisearch_enabled_before).to be(true)
|
293
|
+
expect(multisearch_enabled_inside).to be(true)
|
294
|
+
expect(multisearch_enabled_after).to be(true)
|
281
295
|
end
|
296
|
+
# rubocop:enable RSpec/ExampleLength
|
282
297
|
end
|
283
298
|
end
|
299
|
+
# rubocop:enable RSpec/NestedGroups
|
data/spec/spec_helper.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'warning'
|
4
|
+
# Ignore Ruby 2.7 warnings from Active Record
|
5
|
+
Warning.ignore :keyword_separation
|
6
|
+
|
3
7
|
require 'simplecov'
|
4
8
|
SimpleCov.start
|
5
9
|
|
@@ -7,12 +11,14 @@ require "bundler/setup"
|
|
7
11
|
require "pg_search"
|
8
12
|
|
9
13
|
RSpec.configure do |config|
|
10
|
-
config.expect_with :rspec do |
|
11
|
-
|
14
|
+
config.expect_with :rspec do |expects|
|
15
|
+
expects.syntax = :expect
|
12
16
|
end
|
13
17
|
|
14
|
-
config.mock_with :rspec do |
|
15
|
-
|
18
|
+
config.mock_with :rspec do |mocks|
|
19
|
+
mocks.syntax = :expect
|
20
|
+
mocks.verify_doubled_constant_names = true
|
21
|
+
mocks.verify_partial_doubles = true
|
16
22
|
end
|
17
23
|
|
18
24
|
config.example_status_persistence_file_path = 'tmp/examples.txt'
|
@@ -25,4 +31,7 @@ DOCUMENTS_SCHEMA = lambda do |t|
|
|
25
31
|
t.belongs_to :searchable, polymorphic: true, index: true
|
26
32
|
t.text :content
|
27
33
|
t.timestamps null: false
|
34
|
+
|
35
|
+
# Used to test additional_attributes setup
|
36
|
+
t.text :additional_attribute_column
|
28
37
|
end
|
data/spec/support/database.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Grant Hutchins
|
8
8
|
- Case Commons, LLC
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-09-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '5.2'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '5.2'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: activesupport
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '5.2'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '5.2'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: pry
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,14 +87,14 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0.
|
90
|
+
version: 0.90.0
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0.
|
97
|
+
version: 0.90.0
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: rubocop-performance
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,6 +109,62 @@ dependencies:
|
|
109
109
|
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
|
+
- !ruby/object:Gem::Dependency
|
113
|
+
name: rubocop-rails
|
114
|
+
requirement: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
type: :development
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: rubocop-rake
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
type: :development
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: '0'
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: rubocop-rspec
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - ">="
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '0'
|
147
|
+
type: :development
|
148
|
+
prerelease: false
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '0'
|
154
|
+
- !ruby/object:Gem::Dependency
|
155
|
+
name: rubocop-thread_safety
|
156
|
+
requirement: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: 0.4.1
|
161
|
+
type: :development
|
162
|
+
prerelease: false
|
163
|
+
version_requirements: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: 0.4.1
|
112
168
|
- !ruby/object:Gem::Dependency
|
113
169
|
name: simplecov
|
114
170
|
requirement: !ruby/object:Gem::Requirement
|
@@ -123,6 +179,20 @@ dependencies:
|
|
123
179
|
- - ">="
|
124
180
|
- !ruby/object:Gem::Version
|
125
181
|
version: '0'
|
182
|
+
- !ruby/object:Gem::Dependency
|
183
|
+
name: warning
|
184
|
+
requirement: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
type: :development
|
190
|
+
prerelease: false
|
191
|
+
version_requirements: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - ">="
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
126
196
|
- !ruby/object:Gem::Dependency
|
127
197
|
name: with_model
|
128
198
|
requirement: !ruby/object:Gem::Requirement
|
@@ -149,6 +219,8 @@ files:
|
|
149
219
|
- ".autotest"
|
150
220
|
- ".bundle/config"
|
151
221
|
- ".codeclimate.yml"
|
222
|
+
- ".editorconfig"
|
223
|
+
- ".github/dependabot.yml"
|
152
224
|
- ".gitignore"
|
153
225
|
- ".rspec"
|
154
226
|
- ".rubocop.yml"
|
@@ -175,6 +247,7 @@ files:
|
|
175
247
|
- lib/pg_search/migration/multisearch_generator.rb
|
176
248
|
- lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb
|
177
249
|
- lib/pg_search/migration/templates/create_pg_search_documents.rb.erb
|
250
|
+
- lib/pg_search/model.rb
|
178
251
|
- lib/pg_search/multisearch.rb
|
179
252
|
- lib/pg_search/multisearch/rebuilder.rb
|
180
253
|
- lib/pg_search/multisearchable.rb
|
@@ -185,7 +258,9 @@ files:
|
|
185
258
|
- lib/pg_search/version.rb
|
186
259
|
- pg_search.gemspec
|
187
260
|
- spec/.rubocop.yml
|
261
|
+
- spec/integration/.rubocop.yml
|
188
262
|
- spec/integration/associations_spec.rb
|
263
|
+
- spec/integration/deprecation_spec.rb
|
189
264
|
- spec/integration/pagination_spec.rb
|
190
265
|
- spec/integration/pg_search_spec.rb
|
191
266
|
- spec/integration/single_table_inheritance_spec.rb
|
@@ -209,7 +284,7 @@ homepage: https://github.com/Casecommons/pg_search
|
|
209
284
|
licenses:
|
210
285
|
- MIT
|
211
286
|
metadata: {}
|
212
|
-
post_install_message:
|
287
|
+
post_install_message:
|
213
288
|
rdoc_options: []
|
214
289
|
require_paths:
|
215
290
|
- lib
|
@@ -217,20 +292,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
217
292
|
requirements:
|
218
293
|
- - ">="
|
219
294
|
- !ruby/object:Gem::Version
|
220
|
-
version: '2.
|
295
|
+
version: '2.5'
|
221
296
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
222
297
|
requirements:
|
223
298
|
- - ">="
|
224
299
|
- !ruby/object:Gem::Version
|
225
300
|
version: '0'
|
226
301
|
requirements: []
|
227
|
-
rubygems_version: 3.
|
228
|
-
signing_key:
|
302
|
+
rubygems_version: 3.1.2
|
303
|
+
signing_key:
|
229
304
|
specification_version: 4
|
230
305
|
summary: PgSearch builds Active Record named scopes that take advantage of PostgreSQL's
|
231
306
|
full text search
|
232
307
|
test_files:
|
308
|
+
- spec/integration/.rubocop.yml
|
233
309
|
- spec/integration/associations_spec.rb
|
310
|
+
- spec/integration/deprecation_spec.rb
|
234
311
|
- spec/integration/pagination_spec.rb
|
235
312
|
- spec/integration/pg_search_spec.rb
|
236
313
|
- spec/integration/single_table_inheritance_spec.rb
|