pg_search 2.3.5 → 2.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +80 -0
  3. data/.standard.yml +6 -0
  4. data/CHANGELOG.md +20 -0
  5. data/Gemfile +19 -6
  6. data/LICENSE +1 -1
  7. data/README.md +61 -39
  8. data/Rakefile +9 -6
  9. data/lib/pg_search/configuration/column.rb +6 -4
  10. data/lib/pg_search/configuration/foreign_column.rb +1 -1
  11. data/lib/pg_search/configuration.rb +13 -3
  12. data/lib/pg_search/document.rb +8 -8
  13. data/lib/pg_search/features/dmetaphone.rb +1 -1
  14. data/lib/pg_search/features/feature.rb +1 -1
  15. data/lib/pg_search/features/trigram.rb +4 -4
  16. data/lib/pg_search/features/tsearch.rb +15 -14
  17. data/lib/pg_search/migration/dmetaphone_generator.rb +2 -2
  18. data/lib/pg_search/migration/generator.rb +5 -5
  19. data/lib/pg_search/migration/multisearch_generator.rb +2 -2
  20. data/lib/pg_search/model.rb +6 -6
  21. data/lib/pg_search/multisearch.rb +16 -6
  22. data/lib/pg_search/multisearchable.rb +7 -7
  23. data/lib/pg_search/normalizer.rb +5 -5
  24. data/lib/pg_search/scope_options.rb +28 -10
  25. data/lib/pg_search/tasks.rb +2 -2
  26. data/lib/pg_search/version.rb +1 -1
  27. data/lib/pg_search.rb +5 -5
  28. data/pg_search.gemspec +17 -29
  29. data/spec/.rubocop.yml +20 -7
  30. data/spec/integration/.rubocop.yml +2 -2
  31. data/spec/integration/associations_spec.rb +106 -106
  32. data/spec/integration/deprecation_spec.rb +7 -8
  33. data/spec/integration/pg_search_spec.rb +339 -292
  34. data/spec/integration/single_table_inheritance_spec.rb +5 -5
  35. data/spec/lib/pg_search/configuration/association_spec.rb +15 -15
  36. data/spec/lib/pg_search/configuration/column_spec.rb +13 -1
  37. data/spec/lib/pg_search/configuration/foreign_column_spec.rb +4 -4
  38. data/spec/lib/pg_search/features/dmetaphone_spec.rb +4 -4
  39. data/spec/lib/pg_search/features/trigram_spec.rb +28 -28
  40. data/spec/lib/pg_search/features/tsearch_spec.rb +57 -39
  41. data/spec/lib/pg_search/multisearch/rebuilder_spec.rb +17 -17
  42. data/spec/lib/pg_search/multisearch_spec.rb +15 -6
  43. data/spec/lib/pg_search/multisearchable_spec.rb +26 -26
  44. data/spec/lib/pg_search/normalizer_spec.rb +7 -7
  45. data/spec/lib/pg_search_spec.rb +20 -20
  46. data/spec/spec_helper.rb +15 -9
  47. data/spec/support/database.rb +9 -7
  48. metadata +13 -188
  49. data/.autotest +0 -5
  50. data/.codeclimate.yml +0 -17
  51. data/.rubocop.yml +0 -134
  52. data/.travis.yml +0 -42
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.5
4
+ version: 2.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Hutchins
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-11-16 00:00:00.000000000 Z
12
+ date: 2024-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -17,182 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '5.2'
20
+ version: '6.1'
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: '5.2'
27
+ version: '6.1'
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: '5.2'
34
+ version: '6.1'
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: '5.2'
42
- - !ruby/object:Gem::Dependency
43
- name: pry
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - ">="
47
- - !ruby/object:Gem::Version
48
- version: '0'
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: '0'
56
- - !ruby/object:Gem::Dependency
57
- name: rake
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ">="
61
- - !ruby/object:Gem::Version
62
- version: '0'
63
- type: :development
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- - !ruby/object:Gem::Dependency
71
- name: rspec
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- type: :development
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: '0'
84
- - !ruby/object:Gem::Dependency
85
- name: rubocop
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
- type: :development
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - ">="
96
- - !ruby/object:Gem::Version
97
- version: '0'
98
- - !ruby/object:Gem::Dependency
99
- name: rubocop-performance
100
- requirement: !ruby/object:Gem::Requirement
101
- requirements:
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: '0'
105
- type: :development
106
- prerelease: false
107
- version_requirements: !ruby/object:Gem::Requirement
108
- requirements:
109
- - - ">="
110
- - !ruby/object:Gem::Version
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: simplecov
156
- requirement: !ruby/object:Gem::Requirement
157
- requirements:
158
- - - ">="
159
- - !ruby/object:Gem::Version
160
- version: '0'
161
- type: :development
162
- prerelease: false
163
- version_requirements: !ruby/object:Gem::Requirement
164
- requirements:
165
- - - ">="
166
- - !ruby/object:Gem::Version
167
- version: '0'
168
- - !ruby/object:Gem::Dependency
169
- name: warning
170
- requirement: !ruby/object:Gem::Requirement
171
- requirements:
172
- - - ">="
173
- - !ruby/object:Gem::Version
174
- version: '0'
175
- type: :development
176
- prerelease: false
177
- version_requirements: !ruby/object:Gem::Requirement
178
- requirements:
179
- - - ">="
180
- - !ruby/object:Gem::Version
181
- version: '0'
182
- - !ruby/object:Gem::Dependency
183
- name: with_model
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'
41
+ version: '6.1'
196
42
  description: PgSearch builds Active Record named scopes that take advantage of PostgreSQL's
197
43
  full text search
198
44
  email:
@@ -202,16 +48,14 @@ executables: []
202
48
  extensions: []
203
49
  extra_rdoc_files: []
204
50
  files:
205
- - ".autotest"
206
51
  - ".bundle/config"
207
- - ".codeclimate.yml"
208
52
  - ".editorconfig"
209
53
  - ".github/dependabot.yml"
54
+ - ".github/workflows/ci.yml"
210
55
  - ".gitignore"
211
56
  - ".jrubyrc"
212
57
  - ".rspec"
213
- - ".rubocop.yml"
214
- - ".travis.yml"
58
+ - ".standard.yml"
215
59
  - CHANGELOG.md
216
60
  - CODE_OF_CONDUCT.md
217
61
  - CONTRIBUTING.md
@@ -271,7 +115,8 @@ files:
271
115
  homepage: https://github.com/Casecommons/pg_search
272
116
  licenses:
273
117
  - MIT
274
- metadata: {}
118
+ metadata:
119
+ rubygems_mfa_required: 'true'
275
120
  post_install_message:
276
121
  rdoc_options: []
277
122
  require_paths:
@@ -280,36 +125,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
280
125
  requirements:
281
126
  - - ">="
282
127
  - !ruby/object:Gem::Version
283
- version: '2.5'
128
+ version: '3.0'
284
129
  required_rubygems_version: !ruby/object:Gem::Requirement
285
130
  requirements:
286
131
  - - ">="
287
132
  - !ruby/object:Gem::Version
288
133
  version: '0'
289
134
  requirements: []
290
- rubygems_version: 3.1.4
135
+ rubygems_version: 3.5.11
291
136
  signing_key:
292
137
  specification_version: 4
293
138
  summary: PgSearch builds Active Record named scopes that take advantage of PostgreSQL's
294
139
  full text search
295
- test_files:
296
- - spec/integration/.rubocop.yml
297
- - spec/integration/associations_spec.rb
298
- - spec/integration/deprecation_spec.rb
299
- - spec/integration/pagination_spec.rb
300
- - spec/integration/pg_search_spec.rb
301
- - spec/integration/single_table_inheritance_spec.rb
302
- - spec/lib/pg_search/configuration/association_spec.rb
303
- - spec/lib/pg_search/configuration/column_spec.rb
304
- - spec/lib/pg_search/configuration/foreign_column_spec.rb
305
- - spec/lib/pg_search/features/dmetaphone_spec.rb
306
- - spec/lib/pg_search/features/trigram_spec.rb
307
- - spec/lib/pg_search/features/tsearch_spec.rb
308
- - spec/lib/pg_search/multisearch/rebuilder_spec.rb
309
- - spec/lib/pg_search/multisearch_spec.rb
310
- - spec/lib/pg_search/multisearchable_spec.rb
311
- - spec/lib/pg_search/normalizer_spec.rb
312
- - spec/lib/pg_search_spec.rb
313
- - spec/spec_helper.rb
314
- - spec/support/database.rb
315
- - spec/support/with_model.rb
140
+ test_files: []
data/.autotest DELETED
@@ -1,5 +0,0 @@
1
- Autotest.add_hook :initialize do |at|
2
- at.add_mapping(%r%^lib/.*\.rb$%, true) { |filename, _|
3
- at.files_matching %r%^spec/.*_spec.rb$%
4
- }
5
- end
data/.codeclimate.yml DELETED
@@ -1,17 +0,0 @@
1
- ---
2
- engines:
3
- duplication:
4
- enabled: true
5
- config:
6
- languages:
7
- - ruby
8
- fixme:
9
- enabled: true
10
- rubocop:
11
- enabled: true
12
- channel: rubocop-0-78
13
- ratings:
14
- paths:
15
- - "**.rb"
16
- exclude_paths:
17
- - "spec/"
data/.rubocop.yml DELETED
@@ -1,134 +0,0 @@
1
- require:
2
- - rubocop-performance
3
- - rubocop-rails
4
- - rubocop-rake
5
- - rubocop-rspec
6
-
7
- AllCops:
8
- TargetRubyVersion: 2.5
9
- NewCops: enable
10
- Exclude:
11
- - bin/**/*
12
- - vendor/**/*
13
-
14
- Style/StringLiterals:
15
- Enabled: false
16
-
17
- Layout/LineLength:
18
- Max: 120
19
-
20
- Metrics/MethodLength:
21
- Max: 15
22
-
23
- Metrics/BlockLength:
24
- Exclude:
25
- - spec/**/*
26
-
27
- Layout/ParameterAlignment:
28
- EnforcedStyle: with_fixed_indentation
29
-
30
- Style/NumericPredicate:
31
- Enabled: false
32
-
33
- Style/PercentLiteralDelimiters:
34
- PreferredDelimiters:
35
- '%w': '[]'
36
- '%W': '[]'
37
-
38
- Style/GuardClause:
39
- Enabled: false
40
-
41
- Naming/VariableNumber:
42
- EnforcedStyle: snake_case
43
-
44
- Bundler/OrderedGems:
45
- Enabled: false
46
-
47
- Bundler/DuplicatedGem:
48
- Enabled: false
49
-
50
- Style/EmptyMethod:
51
- EnforcedStyle: expanded
52
-
53
- Layout/FirstArrayElementIndentation:
54
- EnforcedStyle: consistent
55
-
56
- Style/Documentation:
57
- Enabled: false
58
-
59
- Style/WordArray:
60
- EnforcedStyle: percent
61
- MinSize: 3
62
-
63
- Style/HashEachMethods:
64
- Enabled: true
65
-
66
- Style/HashTransformKeys:
67
- Enabled: true
68
-
69
- Style/HashTransformValues:
70
- Enabled: true
71
-
72
- Rails/ApplicationRecord:
73
- Enabled: false
74
-
75
- Rails/TimeZone:
76
- Enabled: false
77
-
78
- RSpec/ContextWording:
79
- Prefixes:
80
- - using
81
- - via
82
- - when
83
- - with
84
- - without
85
-
86
- Lint/RaiseException:
87
- Enabled: true
88
-
89
- Lint/StructNewOverride:
90
- Enabled: true
91
-
92
- Layout/SpaceAroundMethodCallOperator:
93
- Enabled: true
94
-
95
- Style/ExponentialNotation:
96
- Enabled: true
97
-
98
- RSpec/DescribedClass:
99
- Enabled: true
100
-
101
- RSpec/ExpectInHook:
102
- Enabled: false
103
-
104
- RSpec/FilePath:
105
- CustomTransform:
106
- TSearch: "tsearch"
107
- DMetaphone: "dmetaphone"
108
-
109
- Layout/EmptyLinesAroundAttributeAccessor:
110
- Enabled: true
111
-
112
- Lint/DeprecatedOpenSSLConstant:
113
- Enabled: true
114
-
115
- Style/SlicingWithRange:
116
- Enabled: true
117
-
118
- Lint/MixedRegexpCaptureTypes:
119
- Enabled: true
120
-
121
- Style/RedundantFetchBlock:
122
- Enabled: true
123
-
124
- Style/RedundantRegexpCharacterClass:
125
- Enabled: true
126
-
127
- Style/RedundantRegexpEscape:
128
- Enabled: true
129
-
130
- RSpec/MultipleExpectations:
131
- Max: 5
132
-
133
- RSpec/ExampleLength:
134
- Max: 15
data/.travis.yml DELETED
@@ -1,42 +0,0 @@
1
- language: ruby
2
- bundler_args: --binstubs
3
- cache: bundler
4
-
5
- rvm:
6
- - 2.7.2
7
- - 2.6.6
8
- - 2.5.8
9
- - jruby-9.2.13.0
10
-
11
- services:
12
- - postgresql
13
-
14
- env:
15
- global:
16
- - CC_TEST_REPORTER_ID=0a0e3e45118bc447e677d52c21d056a5471c4921d54f96ed7b2550d9fc5043ea
17
- matrix:
18
- - ACTIVE_RECORD_BRANCH="master"
19
- - ACTIVE_RECORD_BRANCH="6-1-stable"
20
- - ACTIVE_RECORD_BRANCH="6-0-stable"
21
- - ACTIVE_RECORD_VERSION="~> 6.1.0.rc1"
22
- - ACTIVE_RECORD_VERSION="~> 6.0.0"
23
- - ACTIVE_RECORD_VERSION="~> 5.2.0"
24
-
25
- matrix:
26
- allow_failures:
27
- - env: ACTIVE_RECORD_BRANCH="master"
28
- - env: ACTIVE_RECORD_BRANCH="6-0-stable"
29
- - env: ACTIVE_RECORD_BRANCH="6-1-stable"
30
- - env: ACTIVE_RECORD_VERSION="~> 6.1.0.rc1"
31
-
32
- before_script:
33
- - psql --version
34
- - psql -c 'create database pg_search_test;' -U postgres >/dev/null
35
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
36
- - chmod +x ./cc-test-reporter
37
- - ./cc-test-reporter before-build
38
-
39
- script: bin/rake
40
-
41
- after_script:
42
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT