pg_search 2.1.2 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +11 -7
- data/.travis.yml +33 -42
- data/CHANGELOG.md +140 -112
- data/CONTRIBUTING.md +5 -3
- data/Gemfile +6 -4
- data/LICENSE +1 -1
- data/README.md +221 -159
- data/Rakefile +3 -5
- data/lib/pg_search/configuration/association.rb +2 -0
- data/lib/pg_search/configuration/column.rb +2 -0
- data/lib/pg_search/configuration/foreign_column.rb +2 -0
- data/lib/pg_search/configuration.rb +8 -4
- data/lib/pg_search/document.rb +5 -3
- data/lib/pg_search/features/dmetaphone.rb +3 -1
- data/lib/pg_search/features/feature.rb +4 -2
- data/lib/pg_search/features/trigram.rb +31 -5
- data/lib/pg_search/features/tsearch.rb +4 -1
- data/lib/pg_search/features.rb +2 -0
- data/lib/pg_search/migration/dmetaphone_generator.rb +3 -1
- data/lib/pg_search/migration/generator.rb +4 -2
- data/lib/pg_search/migration/multisearch_generator.rb +2 -1
- data/lib/pg_search/migration/templates/create_pg_search_documents.rb.erb +1 -1
- data/lib/pg_search/multisearch/rebuilder.rb +7 -3
- data/lib/pg_search/multisearch.rb +4 -4
- data/lib/pg_search/multisearchable.rb +10 -6
- data/lib/pg_search/normalizer.rb +2 -0
- data/lib/pg_search/railtie.rb +2 -0
- data/lib/pg_search/scope_options.rb +21 -41
- data/lib/pg_search/tasks.rb +3 -0
- data/lib/pg_search/version.rb +3 -1
- data/lib/pg_search.rb +10 -5
- data/pg_search.gemspec +8 -7
- data/spec/integration/associations_spec.rb +103 -101
- data/spec/integration/pagination_spec.rb +9 -7
- data/spec/integration/pg_search_spec.rb +266 -255
- data/spec/integration/single_table_inheritance_spec.rb +16 -15
- data/spec/lib/pg_search/configuration/association_spec.rb +7 -5
- data/spec/lib/pg_search/configuration/column_spec.rb +2 -0
- data/spec/lib/pg_search/configuration/foreign_column_spec.rb +5 -3
- data/spec/lib/pg_search/features/dmetaphone_spec.rb +6 -4
- data/spec/lib/pg_search/features/trigram_spec.rb +39 -12
- data/spec/lib/pg_search/features/tsearch_spec.rb +23 -21
- data/spec/lib/pg_search/multisearch/rebuilder_spec.rb +32 -11
- data/spec/lib/pg_search/multisearch_spec.rb +9 -7
- data/spec/lib/pg_search/multisearchable_spec.rb +68 -27
- data/spec/lib/pg_search/normalizer_spec.rb +7 -5
- data/spec/lib/pg_search_spec.rb +33 -31
- data/spec/spec_helper.rb +3 -1
- data/spec/support/database.rb +16 -20
- data/spec/support/with_model.rb +2 -0
- metadata +13 -30
- data/.rubocop_todo.yml +0 -163
- data/Guardfile +0 -6
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.
|
4
|
+
version: 2.2.0
|
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:
|
12
|
+
date: 2019-05-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -40,21 +40,7 @@ dependencies:
|
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '4.2'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - ">="
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: '6'
|
49
|
-
type: :runtime
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - ">="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: '6'
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: codeclimate-test-reporter
|
43
|
+
name: pry
|
58
44
|
requirement: !ruby/object:Gem::Requirement
|
59
45
|
requirements:
|
60
46
|
- - ">="
|
@@ -68,7 +54,7 @@ dependencies:
|
|
68
54
|
- !ruby/object:Gem::Version
|
69
55
|
version: '0'
|
70
56
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
57
|
+
name: rake
|
72
58
|
requirement: !ruby/object:Gem::Requirement
|
73
59
|
requirements:
|
74
60
|
- - ">="
|
@@ -82,35 +68,35 @@ dependencies:
|
|
82
68
|
- !ruby/object:Gem::Version
|
83
69
|
version: '0'
|
84
70
|
- !ruby/object:Gem::Dependency
|
85
|
-
name:
|
71
|
+
name: rspec
|
86
72
|
requirement: !ruby/object:Gem::Requirement
|
87
73
|
requirements:
|
88
74
|
- - ">="
|
89
75
|
- !ruby/object:Gem::Version
|
90
|
-
version: '
|
76
|
+
version: '3.3'
|
91
77
|
type: :development
|
92
78
|
prerelease: false
|
93
79
|
version_requirements: !ruby/object:Gem::Requirement
|
94
80
|
requirements:
|
95
81
|
- - ">="
|
96
82
|
- !ruby/object:Gem::Version
|
97
|
-
version: '
|
83
|
+
version: '3.3'
|
98
84
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
85
|
+
name: rubocop
|
100
86
|
requirement: !ruby/object:Gem::Requirement
|
101
87
|
requirements:
|
102
88
|
- - ">="
|
103
89
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
90
|
+
version: 0.68.1
|
105
91
|
type: :development
|
106
92
|
prerelease: false
|
107
93
|
version_requirements: !ruby/object:Gem::Requirement
|
108
94
|
requirements:
|
109
95
|
- - ">="
|
110
96
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
97
|
+
version: 0.68.1
|
112
98
|
- !ruby/object:Gem::Dependency
|
113
|
-
name: rubocop
|
99
|
+
name: rubocop-performance
|
114
100
|
requirement: !ruby/object:Gem::Requirement
|
115
101
|
requirements:
|
116
102
|
- - ">="
|
@@ -166,12 +152,10 @@ files:
|
|
166
152
|
- ".gitignore"
|
167
153
|
- ".rspec"
|
168
154
|
- ".rubocop.yml"
|
169
|
-
- ".rubocop_todo.yml"
|
170
155
|
- ".travis.yml"
|
171
156
|
- CHANGELOG.md
|
172
157
|
- CONTRIBUTING.md
|
173
158
|
- Gemfile
|
174
|
-
- Guardfile
|
175
159
|
- LICENSE
|
176
160
|
- README.md
|
177
161
|
- Rakefile
|
@@ -233,15 +217,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
233
217
|
requirements:
|
234
218
|
- - ">="
|
235
219
|
- !ruby/object:Gem::Version
|
236
|
-
version: '2.
|
220
|
+
version: '2.4'
|
237
221
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
238
222
|
requirements:
|
239
223
|
- - ">="
|
240
224
|
- !ruby/object:Gem::Version
|
241
225
|
version: '0'
|
242
226
|
requirements: []
|
243
|
-
|
244
|
-
rubygems_version: 2.6.13
|
227
|
+
rubygems_version: 3.0.3
|
245
228
|
signing_key:
|
246
229
|
specification_version: 4
|
247
230
|
summary: PgSearch builds Active Record named scopes that take advantage of PostgreSQL's
|
data/.rubocop_todo.yml
DELETED
@@ -1,163 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2017-07-21 13:18:24 -0500 using RuboCop version 0.49.1.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 26
|
10
|
-
# Cop supports --auto-correct.
|
11
|
-
# Configuration parameters: SupportedStyles, IndentationWidth.
|
12
|
-
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
|
13
|
-
Layout/IndentArray:
|
14
|
-
EnforcedStyle: consistent
|
15
|
-
|
16
|
-
# Offense count: 3
|
17
|
-
# Cop supports --auto-correct.
|
18
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
|
19
|
-
# SupportedStyles: aligned, indented, indented_relative_to_receiver
|
20
|
-
Layout/MultilineMethodCallIndentation:
|
21
|
-
Exclude:
|
22
|
-
- 'spec/integration/pg_search_spec.rb'
|
23
|
-
|
24
|
-
# Offense count: 1
|
25
|
-
# Cop supports --auto-correct.
|
26
|
-
Layout/SpaceAfterComma:
|
27
|
-
Exclude:
|
28
|
-
- 'lib/pg_search/configuration.rb'
|
29
|
-
|
30
|
-
# Offense count: 1
|
31
|
-
# Cop supports --auto-correct.
|
32
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
33
|
-
# SupportedStyles: space, no_space
|
34
|
-
Layout/SpaceAroundEqualsInParameterDefault:
|
35
|
-
Exclude:
|
36
|
-
- 'lib/pg_search/multisearch.rb'
|
37
|
-
|
38
|
-
# Offense count: 3
|
39
|
-
# Cop supports --auto-correct.
|
40
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
41
|
-
# SupportedStyles: space, no_space
|
42
|
-
Layout/SpaceBeforeBlockBraces:
|
43
|
-
Exclude:
|
44
|
-
- 'lib/pg_search/features/tsearch.rb'
|
45
|
-
- 'spec/integration/pg_search_spec.rb'
|
46
|
-
|
47
|
-
# Offense count: 4
|
48
|
-
# Cop supports --auto-correct.
|
49
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces, SpaceBeforeBlockParameters.
|
50
|
-
# SupportedStyles: space, no_space
|
51
|
-
# SupportedStylesForEmptyBraces: space, no_space
|
52
|
-
Layout/SpaceInsideBlockBraces:
|
53
|
-
Exclude:
|
54
|
-
- 'lib/pg_search/features/tsearch.rb'
|
55
|
-
- 'spec/integration/pg_search_spec.rb'
|
56
|
-
- 'spec/lib/pg_search_spec.rb'
|
57
|
-
|
58
|
-
# Offense count: 86
|
59
|
-
# Cop supports --auto-correct.
|
60
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SupportedStylesForEmptyBraces.
|
61
|
-
# SupportedStyles: space, no_space, compact
|
62
|
-
# SupportedStylesForEmptyBraces: space, no_space
|
63
|
-
Layout/SpaceInsideHashLiteralBraces:
|
64
|
-
Exclude:
|
65
|
-
- 'lib/pg_search.rb'
|
66
|
-
- 'lib/pg_search/configuration.rb'
|
67
|
-
- 'lib/pg_search/document.rb'
|
68
|
-
- 'spec/integration/associations_spec.rb'
|
69
|
-
- 'spec/integration/pg_search_spec.rb'
|
70
|
-
- 'spec/lib/pg_search/configuration/association_spec.rb'
|
71
|
-
- 'spec/lib/pg_search/configuration/foreign_column_spec.rb'
|
72
|
-
- 'spec/lib/pg_search/features/tsearch_spec.rb'
|
73
|
-
- 'spec/lib/pg_search/multisearchable_spec.rb'
|
74
|
-
- 'spec/lib/pg_search_spec.rb'
|
75
|
-
|
76
|
-
# Offense count: 4
|
77
|
-
# Cop supports --auto-correct.
|
78
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
79
|
-
# SupportedStyles: final_newline, final_blank_line
|
80
|
-
Layout/TrailingBlankLines:
|
81
|
-
Exclude:
|
82
|
-
- 'Guardfile'
|
83
|
-
- 'lib/pg_search/migration/multisearch_generator.rb'
|
84
|
-
- 'lib/pg_search/multisearch.rb'
|
85
|
-
- 'spec/integration/single_table_inheritance_spec.rb'
|
86
|
-
|
87
|
-
# Offense count: 1
|
88
|
-
# Cop supports --auto-correct.
|
89
|
-
Performance/Casecmp:
|
90
|
-
Exclude:
|
91
|
-
- 'spec/support/database.rb'
|
92
|
-
|
93
|
-
# Offense count: 27
|
94
|
-
Style/Documentation:
|
95
|
-
Enabled: false
|
96
|
-
|
97
|
-
# Offense count: 1
|
98
|
-
Style/IfInsideElse:
|
99
|
-
Exclude:
|
100
|
-
- 'lib/pg_search/multisearchable.rb'
|
101
|
-
|
102
|
-
# Offense count: 2
|
103
|
-
# Cop supports --auto-correct.
|
104
|
-
Style/MutableConstant:
|
105
|
-
Exclude:
|
106
|
-
- 'lib/pg_search/configuration.rb'
|
107
|
-
- 'lib/pg_search/scope_options.rb'
|
108
|
-
|
109
|
-
# Offense count: 1
|
110
|
-
# Cop supports --auto-correct.
|
111
|
-
Style/PerlBackrefs:
|
112
|
-
Exclude:
|
113
|
-
- 'lib/pg_search/scope_options.rb'
|
114
|
-
|
115
|
-
# Offense count: 5
|
116
|
-
# Cop supports --auto-correct.
|
117
|
-
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
118
|
-
# SupportedStyles: compact, exploded
|
119
|
-
Style/RaiseArgs:
|
120
|
-
Exclude:
|
121
|
-
- 'lib/pg_search.rb'
|
122
|
-
- 'lib/pg_search/multisearch/rebuilder.rb'
|
123
|
-
- 'lib/pg_search/scope_options.rb'
|
124
|
-
|
125
|
-
# Offense count: 1
|
126
|
-
# Cop supports --auto-correct.
|
127
|
-
# Configuration parameters: AllowMultipleReturnValues.
|
128
|
-
Style/RedundantReturn:
|
129
|
-
Exclude:
|
130
|
-
- 'lib/pg_search/scope_options.rb'
|
131
|
-
|
132
|
-
# Offense count: 2
|
133
|
-
# Cop supports --auto-correct.
|
134
|
-
# Configuration parameters: IgnoredMethods.
|
135
|
-
# IgnoredMethods: respond_to, define_method
|
136
|
-
Style/SymbolProc:
|
137
|
-
Exclude:
|
138
|
-
- 'lib/pg_search/features/feature.rb'
|
139
|
-
- 'lib/pg_search/multisearch/rebuilder.rb'
|
140
|
-
|
141
|
-
# Offense count: 10
|
142
|
-
# Cop supports --auto-correct.
|
143
|
-
# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
|
144
|
-
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
|
145
|
-
Style/TrailingCommaInLiteral:
|
146
|
-
Exclude:
|
147
|
-
- 'spec/integration/pg_search_spec.rb'
|
148
|
-
- 'spec/lib/pg_search/features/dmetaphone_spec.rb'
|
149
|
-
- 'spec/lib/pg_search/features/tsearch_spec.rb'
|
150
|
-
|
151
|
-
# Offense count: 2
|
152
|
-
# Cop supports --auto-correct.
|
153
|
-
Style/UnneededPercentQ:
|
154
|
-
Exclude:
|
155
|
-
- 'pg_search.gemspec'
|
156
|
-
|
157
|
-
# Offense count: 3
|
158
|
-
# Cop supports --auto-correct.
|
159
|
-
# Configuration parameters: SupportedStyles, WordRegex.
|
160
|
-
# SupportedStyles: percent, brackets
|
161
|
-
Style/WordArray:
|
162
|
-
EnforcedStyle: percent
|
163
|
-
MinSize: 3
|