pg_search 2.1.2 → 2.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.codeclimate.yml +1 -0
- data/.editorconfig +10 -0
- data/.github/dependabot.yml +11 -0
- data/.github/workflows/ci.yml +75 -0
- data/.jrubyrc +1 -0
- data/.rubocop.yml +95 -10
- data/.travis.yml +26 -48
- data/CHANGELOG.md +179 -112
- data/CODE_OF_CONDUCT.md +76 -0
- data/CONTRIBUTING.md +5 -3
- data/Gemfile +6 -4
- data/LICENSE +1 -1
- data/README.md +307 -198
- data/Rakefile +7 -3
- 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 +20 -6
- data/lib/pg_search/document.rb +7 -5
- data/lib/pg_search/features/dmetaphone.rb +7 -7
- 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 +18 -14
- 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/add_pg_search_dmetaphone_support_functions.rb.erb +6 -6
- data/lib/pg_search/migration/templates/create_pg_search_documents.rb.erb +3 -3
- data/lib/pg_search/model.rb +57 -0
- data/lib/pg_search/multisearch/rebuilder.rb +14 -6
- data/lib/pg_search/multisearch.rb +23 -6
- 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 +26 -49
- data/lib/pg_search/tasks.rb +5 -1
- data/lib/pg_search/version.rb +3 -1
- data/lib/pg_search.rb +17 -55
- data/pg_search.gemspec +19 -11
- data/spec/.rubocop.yml +2 -2
- data/spec/integration/.rubocop.yml +11 -0
- data/spec/integration/associations_spec.rb +125 -162
- data/spec/integration/deprecation_spec.rb +33 -0
- data/spec/integration/pagination_spec.rb +10 -8
- data/spec/integration/pg_search_spec.rb +359 -306
- data/spec/integration/single_table_inheritance_spec.rb +18 -17
- data/spec/lib/pg_search/configuration/association_spec.rb +17 -13
- data/spec/lib/pg_search/configuration/column_spec.rb +2 -0
- data/spec/lib/pg_search/configuration/foreign_column_spec.rb +6 -4
- data/spec/lib/pg_search/features/dmetaphone_spec.rb +6 -4
- data/spec/lib/pg_search/features/trigram_spec.rb +51 -20
- data/spec/lib/pg_search/features/tsearch_spec.rb +29 -21
- data/spec/lib/pg_search/multisearch/rebuilder_spec.rb +151 -85
- data/spec/lib/pg_search/multisearch_spec.rb +67 -37
- data/spec/lib/pg_search/multisearchable_spec.rb +217 -123
- data/spec/lib/pg_search/normalizer_spec.rb +14 -10
- data/spec/lib/pg_search_spec.rb +102 -89
- data/spec/spec_helper.rb +25 -6
- data/spec/support/database.rb +19 -21
- data/spec/support/with_model.rb +2 -0
- metadata +106 -29
- data/.autotest +0 -5
- data/.rubocop_todo.yml +0 -163
- data/Guardfile +0 -6
data/CHANGELOG.md
CHANGED
@@ -1,280 +1,347 @@
|
|
1
1
|
# pg_search changelog
|
2
2
|
|
3
|
+
## 2.3.6
|
4
|
+
|
5
|
+
* Drop support for Ruby 2.5
|
6
|
+
* Support Ruby 3.1
|
7
|
+
* Support Active Record 7.0
|
8
|
+
* Don't require `:against` if `:tsvector_column` is specified (Travis Hunter)
|
9
|
+
* Optionally disable transaction when rebuilding documents (Travis Hunter)
|
10
|
+
* Preserve columns when chaining ::with_pg_search_highlight (jcsanti)
|
11
|
+
|
12
|
+
## 2.3.5
|
13
|
+
|
14
|
+
* Add table of contents to README (Barry Woolgar)
|
15
|
+
* Add support for Active Record 6.1
|
16
|
+
|
17
|
+
## 2.3.4
|
18
|
+
|
19
|
+
* Fix issue when setting various options directly on the `PgSearch` module while
|
20
|
+
running with a threaded web server, such as Puma. (Anton Rieder)
|
21
|
+
|
22
|
+
## 2.3.3
|
23
|
+
|
24
|
+
* Drop support for Ruby < 2.5.
|
25
|
+
* Use keyword argument for `clean_up` setting in `PgSearch::Multisearch.rebuild`.
|
26
|
+
|
27
|
+
## 2.3.2
|
28
|
+
|
29
|
+
* Autoload `PgSearch::Document` to prevent it from being loaded in projects that are not using multi-search.
|
30
|
+
* Rebuilder should use `update_pg_search_document` if `additional_attributes` is set. (David Ramalho)
|
31
|
+
|
32
|
+
## 2.3.1
|
33
|
+
|
34
|
+
* Drop support for Active Record < 5.2.
|
35
|
+
* Do not load railtie unless Rails::Railtie is defined, to avoid problem when loading alongside Action Mailer. (Adam Schwartz)
|
36
|
+
|
37
|
+
## 2.3.0
|
38
|
+
|
39
|
+
* Extract `PgSearch::Model` module.
|
40
|
+
* Deprecate `include PgSearch`. Use `include PgSearch::Model` instead.
|
41
|
+
|
42
|
+
## 2.2.0
|
43
|
+
|
44
|
+
* Add `word_similarity` option to trigram search. (Severin Räz)
|
45
|
+
|
46
|
+
## 2.1.7
|
47
|
+
|
48
|
+
* Restore link to GitHub repository to original location.
|
49
|
+
|
50
|
+
## 2.1.6
|
51
|
+
|
52
|
+
* Update link to GitHub repository to new location.
|
53
|
+
|
54
|
+
## 2.1.5
|
55
|
+
|
56
|
+
* Drop support for Ruby < 2.4.
|
57
|
+
|
58
|
+
## 2.1.4
|
59
|
+
|
60
|
+
* Drop support for Ruby < 2.3.
|
61
|
+
* Use `update` instead of deprecated `update_attributes`.
|
62
|
+
* Remove explicit Arel dependency to better support Active Record 6 beta.
|
63
|
+
|
64
|
+
## 2.1.3
|
65
|
+
|
66
|
+
* Drop support for Ruby < 2.2
|
67
|
+
* Disallow left/right single quotation marks in tsquery. (Fabian Schwahn) (#382)
|
68
|
+
* Do not attempt to save an already-destroyed `PgSearch::Document`. (Oleg Dashevskii, Vokhmin Aleksei V) (#353)
|
69
|
+
* Quote column name when rebuilding. (Jed Levin) (#379)
|
70
|
+
|
3
71
|
## 2.1.2
|
4
72
|
|
5
|
-
*
|
73
|
+
* Silence warnings in Rails 5.2.0.beta2. (Kevin Deisz)
|
6
74
|
|
7
75
|
## 2.1.1
|
8
76
|
|
9
|
-
*
|
77
|
+
* Support snake_case `ts_headline` options again. (with deprecation warning)
|
10
78
|
|
11
79
|
## 2.1.0
|
12
80
|
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
81
|
+
* Allow `ts_headline` options to be passed to `:highlight`. (Ian Heisters)
|
82
|
+
* Wait to load `PgSearch::Document` until after Active Record has loaded. (Logan Leger)
|
83
|
+
* Add Rails version to generated migrations. (Erik Eide)
|
16
84
|
|
17
85
|
## 2.0.1
|
18
86
|
|
19
|
-
*
|
87
|
+
* Remove require for generator that no longer exists. (Joshua Bartlett)
|
20
88
|
|
21
89
|
## 2.0.0
|
22
90
|
|
23
|
-
*
|
24
|
-
*
|
25
|
-
*
|
26
|
-
*
|
91
|
+
* Drop support for PostgreSQL < 9.2.
|
92
|
+
* Drop support for Active Record < 4.2.
|
93
|
+
* Drop support for Ruby < 2.1.
|
94
|
+
* Improve performance of has_one and belongs_to associations. (Peter Postma)
|
27
95
|
|
28
96
|
## 1.0.6
|
29
97
|
|
30
|
-
*
|
31
|
-
*
|
32
|
-
*
|
98
|
+
* Add support for highlighting the matching portion of a search result. (Jose Galisteo)
|
99
|
+
* Add `:update_if` option to control when PgSearch::Document gets updated. (Adam Becker)
|
100
|
+
* Add `:additional_attributes` option for adding additional attributes to PgSearch::Document
|
33
101
|
|
34
102
|
## 1.0.5
|
35
103
|
|
36
|
-
*
|
37
|
-
*
|
104
|
+
* Clean up rank table aliasing. (Adam Milligan)
|
105
|
+
* Fix issue when using `#with_pg_search_rank` across a join. (Reid Lynch)
|
38
106
|
|
39
107
|
## 1.0.4
|
40
108
|
|
41
|
-
*
|
42
|
-
*
|
109
|
+
* Assert valid options for features. (Janko Marohnić)
|
110
|
+
* Enable chaining of pg_search scopes. (Nicolas Buduroi)
|
43
111
|
|
44
112
|
## 1.0.3
|
45
113
|
|
46
|
-
*
|
114
|
+
* Support STI models using a custom inheritance column. (Nick Doiron)
|
47
115
|
|
48
116
|
## 1.0.2
|
49
117
|
|
50
|
-
*
|
118
|
+
* Don’t use SQL to rebuild search documents when models are multisearchable against dynamic methods and not just columns. Iterate over each record with `find_each` instead.
|
51
119
|
|
52
120
|
## 1.0.1
|
53
121
|
|
54
|
-
*
|
122
|
+
* Call `.unscoped` on relation used to build subquery, to eliminate unnecessary JOINs. (Markus Doits)
|
55
123
|
|
56
124
|
## 1.0.0
|
57
125
|
|
58
|
-
*
|
59
|
-
*
|
60
|
-
*
|
126
|
+
* Support more `ActiveRecord::Relation` methods, such as `#pluck` and `#select` by moving search-related operations to subquery.
|
127
|
+
* Generate index by default in migration for `pg_search_documents` table.
|
128
|
+
* Start officially using [Semantic Versioning 2.0.0](http://semver.org/spec/v2.0.0.html).
|
61
129
|
|
62
130
|
## 0.7.9
|
63
131
|
|
64
|
-
*
|
132
|
+
* Improve support for single table inheritance (STI) models. (Ewan McDougall)
|
65
133
|
|
66
134
|
## 0.7.8
|
67
135
|
|
68
|
-
*
|
136
|
+
* Stop inadvertently including binstubs for guard and rspec.
|
69
137
|
|
70
138
|
## 0.7.7
|
71
139
|
|
72
|
-
*
|
140
|
+
* Fix future compatibility with Active Record 4.2.
|
73
141
|
|
74
142
|
## 0.7.6
|
75
143
|
|
76
|
-
*
|
77
|
-
*
|
144
|
+
* Fix migration generator in Rails 3. (Andrew Marshall and Nora Lin)
|
145
|
+
* Add `:only` option for limiting search fields per feature. (Jonathan Greenberg)
|
78
146
|
|
79
147
|
## 0.7.5
|
80
148
|
|
81
|
-
*
|
149
|
+
* Add option to make feature available only for sorting. (Brent Wheeldon)
|
82
150
|
|
83
151
|
## 0.7.4
|
84
152
|
|
85
|
-
*
|
86
|
-
*
|
153
|
+
* Fix which STI class name is used for searchable_type for PgSearch::Document. (Ewan McDougall)
|
154
|
+
* Add support for non-standard primary keys. (Matt Beedle)
|
87
155
|
|
88
156
|
## 0.7.3
|
89
157
|
|
90
|
-
*
|
158
|
+
* Allow simultaneously searching using `:associated_against` and `:tsvector_column` (Adam Becker)
|
91
159
|
|
92
160
|
## 0.7.2
|
93
161
|
|
94
|
-
*
|
162
|
+
* Add :threshold option for configuring how permissive trigram searches are.
|
95
163
|
|
96
164
|
## 0.7.1
|
97
165
|
|
98
|
-
*
|
99
|
-
|
166
|
+
* Fix issue with {:using => :trigram, :ignoring => :accents} that generated
|
167
|
+
bad SQL. (Steven Harman)
|
100
168
|
|
101
169
|
## 0.7.0
|
102
170
|
|
103
|
-
*
|
171
|
+
* Start requiring Ruby 1.9.2 or later.
|
104
172
|
|
105
173
|
## 0.6.4
|
106
174
|
|
107
|
-
*
|
175
|
+
* Fix issue with using more than two features in the same scope.
|
108
176
|
|
109
177
|
## 0.6.3
|
110
178
|
|
111
|
-
*
|
179
|
+
* Fix issues and deprecations for Active Record 4.0.0.rc1.
|
112
180
|
|
113
181
|
## 0.6.2
|
114
182
|
|
115
|
-
*
|
116
|
-
|
183
|
+
* Add workaround for issue with how ActiveRecord relations handle Arel OR
|
184
|
+
nodes.
|
117
185
|
|
118
186
|
## 0.6.1
|
119
187
|
|
120
|
-
*
|
121
|
-
|
188
|
+
* Fix issue with Arel::InfixOperation that prevented #count from working,
|
189
|
+
breaking pagination.
|
122
190
|
|
123
191
|
## 0.6.0
|
124
192
|
|
125
|
-
*
|
126
|
-
*
|
127
|
-
*
|
128
|
-
*
|
129
|
-
*
|
130
|
-
*
|
193
|
+
* Drop support for Active Record 3.0.
|
194
|
+
* Address warnings in Ruby 2.0.
|
195
|
+
* Remove all usages of sanitize_sql_array for future Rails 4 compatibility.
|
196
|
+
* Start using Arel internally to build SQL strings (not yet complete).
|
197
|
+
* Disable eager loading, fixes issue #14.
|
198
|
+
* Support named schemas in pg_search:multisearch:rebuild. (Victor Olteanu)
|
131
199
|
|
132
200
|
|
133
201
|
## 0.5.7
|
134
202
|
|
135
|
-
*
|
136
|
-
|
203
|
+
* Fix issue with eager loading now that the Scope class has been removed.
|
204
|
+
(Piotr Murach)
|
137
205
|
|
138
206
|
|
139
207
|
## 0.5.6
|
140
208
|
|
141
|
-
*
|
142
|
-
|
143
|
-
*
|
209
|
+
* PgSearch#multisearchable accepts :if and :unless for conditional inclusion
|
210
|
+
in search documents table. (Francois Harbec)
|
211
|
+
* Stop using array_to_string() in SQL since it is not indexable.
|
144
212
|
|
145
213
|
|
146
214
|
## 0.5.5
|
147
215
|
|
148
|
-
*
|
149
|
-
*
|
216
|
+
* Fix bug with single table inheritance.
|
217
|
+
* Allow option for specifying an alternate function for unaccent().
|
150
218
|
|
151
219
|
|
152
220
|
## 0.5.4
|
153
221
|
|
154
|
-
*
|
155
|
-
|
156
|
-
*
|
222
|
+
* Fix bug in associated_against join clause when search scope is chained
|
223
|
+
after other scopes.
|
224
|
+
* Fix autoloading of PgSearch::VERSION constant.
|
157
225
|
|
158
226
|
|
159
227
|
## 0.5.3
|
160
228
|
|
161
|
-
*
|
162
|
-
|
229
|
+
* Prevent multiple attempts to create pg_search_document within a single
|
230
|
+
transaction. (JT Archie & Trace Wax)
|
163
231
|
|
164
232
|
|
165
233
|
## 0.5.2
|
166
234
|
|
167
|
-
*
|
235
|
+
* Don't save twice if pg_search_document is missing on update.
|
168
236
|
|
169
237
|
|
170
238
|
## 0.5.1
|
171
239
|
|
172
|
-
*
|
240
|
+
* Add ability to override multisearch rebuild SQL.
|
173
241
|
|
174
242
|
|
175
243
|
## 0.5
|
176
244
|
|
177
|
-
*
|
178
|
-
*
|
179
|
-
|
180
|
-
*
|
245
|
+
* Convert migration rake tasks into generators.
|
246
|
+
* Use rake task arguments for multisearch rebuild instead of environment
|
247
|
+
variable.
|
248
|
+
* Always cast columns to text.
|
181
249
|
|
182
250
|
|
183
251
|
## 0.4.2
|
184
252
|
|
185
|
-
*
|
186
|
-
|
187
|
-
*
|
188
|
-
*
|
189
|
-
*
|
190
|
-
*
|
253
|
+
* Fill in timestamps correctly when rebuilding multisearch documents.
|
254
|
+
(Barton McGuire)
|
255
|
+
* Fix various issues with rebuilding multisearch documents. (Eugen Neagoe)
|
256
|
+
* Fix syntax error in pg_search_dmetaphone() migration. (Casey Foster)
|
257
|
+
* Rename PgSearch#rank to PgSearch#pg_search_rank and always return a Float.
|
258
|
+
* Fix issue with :associated_against and non-text columns.
|
191
259
|
|
192
260
|
|
193
261
|
## 0.4.1
|
194
262
|
|
195
|
-
*
|
263
|
+
* Fix Active Record 3.2 deprecation warnings. (Steven Harman)
|
196
264
|
|
197
|
-
*
|
198
|
-
|
265
|
+
* Fix issue with undefined logger when PgSearch::Document.search is already
|
266
|
+
defined.
|
199
267
|
|
200
268
|
|
201
269
|
## 0.4
|
202
270
|
|
203
|
-
*
|
271
|
+
* Add ability to search again tsvector columns. (Kris Hicks)
|
204
272
|
|
205
273
|
|
206
274
|
## 0.3.4
|
207
275
|
|
208
|
-
*
|
209
|
-
*
|
276
|
+
* Fix issue with {:using => {:tsearch => {:prefix => true}}} and hyphens.
|
277
|
+
* Get tests running against PostgreSQL 9.1 by using CREATE EXTENSION
|
210
278
|
|
211
279
|
|
212
280
|
## 0.3.3
|
213
281
|
|
214
|
-
*
|
215
|
-
|
216
|
-
*
|
217
|
-
|
218
|
-
*
|
219
|
-
|
282
|
+
* Backport array_agg() aggregate function to PostgreSQL 8.3 and earlier.
|
283
|
+
This fixes :associated_against searches.
|
284
|
+
* Backport unnest() function to PostgreSQL 8.3 and earlier. This fixes
|
285
|
+
{:using => :dmetaphone} searches.
|
286
|
+
* Disable {:using => {:tsearch => {:prefix => true}}} in PostgreSQL 8.3 and
|
287
|
+
earlier.
|
220
288
|
|
221
289
|
|
222
290
|
## 0.3.2
|
223
291
|
|
224
|
-
*
|
225
|
-
*
|
292
|
+
* Fix :prefix search in PostgreSQL 8.x
|
293
|
+
* Disable {:ignoring => :accents} in PostgreSQL 8.x
|
226
294
|
|
227
295
|
|
228
296
|
## 0.3.1
|
229
297
|
|
230
|
-
*
|
298
|
+
* Fix syntax error in generated dmetaphone migration. (Max De Marzi)
|
231
299
|
|
232
300
|
|
233
301
|
## 0.3
|
234
302
|
|
235
|
-
*
|
236
|
-
*
|
237
|
-
*
|
238
|
-
*
|
239
|
-
|
240
|
-
*
|
241
|
-
|
303
|
+
* Drop Active Record 2.0 support.
|
304
|
+
* Add PgSearch.multisearch for cross-model searching.
|
305
|
+
* Fix PostgreSQL warnings about truncated identifiers
|
306
|
+
* Support specifying a method of rank normalisation when using tsearch.
|
307
|
+
(Arthur Gunn)
|
308
|
+
* Add :any_word option to :tsearch which uses OR between query terms instead
|
309
|
+
of AND. (Fernando Espinosa)
|
242
310
|
|
243
311
|
## 0.2.2
|
244
312
|
|
245
|
-
*
|
246
|
-
|
313
|
+
* Fix a compatibility issue between Ruby 1.8.7 and 1.9.3 when using Rails 2
|
314
|
+
(James Badger)
|
247
315
|
|
248
316
|
## 0.2.1
|
249
317
|
|
250
|
-
*
|
318
|
+
* Backport support for searching against tsvector columns (Kris Hicks)
|
251
319
|
|
252
320
|
## 0.2
|
253
321
|
|
254
|
-
*
|
255
|
-
|
256
|
-
|
257
|
-
*
|
258
|
-
*
|
259
|
-
|
322
|
+
* Set dictionary to :simple by default for :tsearch. Before it was unset,
|
323
|
+
which would fall back to PostgreSQL's default dictionary, usually
|
324
|
+
"english".
|
325
|
+
* Fix a bug with search strings containing a colon ":"
|
326
|
+
* Improve performance of :associated_against by only doing one INNER JOIN
|
327
|
+
per association
|
260
328
|
|
261
329
|
## 0.1.1
|
262
330
|
|
263
|
-
*
|
264
|
-
|
331
|
+
* Fix a bug with dmetaphone searches containing " w " (which dmetaphone maps
|
332
|
+
to an empty string)
|
265
333
|
|
266
334
|
## 0.1
|
267
335
|
|
268
|
-
*
|
269
|
-
*
|
270
|
-
*
|
271
|
-
|
336
|
+
* Change API to {:ignoring => :accents} from {:normalizing => :diacritics}
|
337
|
+
* Improve documentation
|
338
|
+
* Fix bug where :associated_against would not work without an :against
|
339
|
+
present
|
272
340
|
|
273
341
|
## 0.0.2
|
274
342
|
|
275
|
-
*
|
343
|
+
* Fix gem ownership.
|
276
344
|
|
277
|
-
#
|
278
345
|
## 0.0.1
|
279
346
|
|
280
|
-
*
|
347
|
+
* Initial release.
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at pg_search@nertzy.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
data/CONTRIBUTING.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
First off, if you experience a bug, we welcome you to report it. Please provide a minimal test case showing the code that you ran, its output, and what you expected the output to be instead. If you are able to fix the bug and make a pull request, we are much more likely to get it resolved quickly, but don't feel bad to just report an issue if you don't know how to fix it.
|
4
4
|
|
5
|
-
|
5
|
+
View the [README](./README.md) to see which versions of Ruby, Active Record, and PostgreSQL are supported by pg_search. It can be hard to test against all of the various versions, but please do your best to avoid coding practices that only work in newer versions.
|
6
6
|
|
7
7
|
If you have a substantial feature to add, you might want to discuss it first on the [mailing list](https://groups.google.com/forum/#!forum/casecommons-dev). We might have thought hard about it already, and can sometimes help with tips and tricks.
|
8
8
|
|
@@ -10,8 +10,10 @@ When in doubt, go ahead and make a pull request. If something needs tweaking or
|
|
10
10
|
|
11
11
|
Don't be discouraged if the maintainers ask you to change your code. We are always appreciative when people work hard to modify our code, but we also have a lot of opinions about coding style and object design.
|
12
12
|
|
13
|
-
|
13
|
+
Our automated tests start by updating all gems to their latest version. This is by design, because we want to be proactive about compatibility with other libraries. You can do the same by running `bundle update` at any time. To test against a specific version of Active Record, you can set the `ACTIVE_RECORD_VERSION` environment variable.
|
14
14
|
|
15
|
-
$ ACTIVE_RECORD_VERSION=
|
15
|
+
$ ACTIVE_RECORD_VERSION=5.0 bundle update
|
16
|
+
|
17
|
+
Run the tests by running `bundle exec rake`, or `bin/rake` if you use Bundler binstubs.
|
16
18
|
|
17
19
|
Last, but not least, have fun! pg_search is a labor of love.
|
data/Gemfile
CHANGED
@@ -1,13 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
gemspec
|
4
6
|
|
5
|
-
gem 'pg', '>= 0.21.0', :
|
6
|
-
gem "activerecord-jdbcpostgresql-adapter", ">= 1.3.1", :
|
7
|
+
gem 'pg', '>= 0.21.0', platform: :ruby
|
8
|
+
gem "activerecord-jdbcpostgresql-adapter", ">= 1.3.1", platform: :jruby
|
7
9
|
|
8
10
|
if ENV['ACTIVE_RECORD_BRANCH']
|
9
|
-
gem 'activerecord', :
|
10
|
-
gem 'arel', :
|
11
|
+
gem 'activerecord', git: 'https://github.com/rails/rails.git', branch: ENV['ACTIVE_RECORD_BRANCH']
|
12
|
+
gem 'arel', git: 'https://github.com/rails/arel.git' if ENV['ACTIVE_RECORD_BRANCH'] == 'master'
|
11
13
|
end
|
12
14
|
|
13
15
|
gem 'activerecord', ENV['ACTIVE_RECORD_VERSION'] if ENV['ACTIVE_RECORD_VERSION']
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2010-
|
1
|
+
Copyright (c) 2010-2021 Casebook, PBC <http://www.casebook.net>
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
4
|
of this software and associated documentation files (the "Software"), to deal
|