search_rails 2.0.5 → 3.0.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7fe53eaff88b945c74a501b4726d8772debbcce7c0ff3abdd7f7e0553c44b975
4
- data.tar.gz: cff07095e613f1e263a9478b3c082d1eb5fad71d2bdb46b37287e64c83005457
3
+ metadata.gz: 975574cccba4554124a93f491bc64035e18f675f9431b3b151071cc437f6474c
4
+ data.tar.gz: 555a0da1753da34f84f472a7e664d785a90b587ef027c8033a382d1a5debdc77
5
5
  SHA512:
6
- metadata.gz: 33d34cc0480f0ac6b7ab5f325fdf7d4e444e1e1d556872ea9decfd612aa32b37a5572c7f7a87b9c607dfdeafdaa4b80366c303132ed50a8612e38da7ed79fe97
7
- data.tar.gz: cffb884892f04267625ff96d134810d452a4cafa860337ae939326fcbec3cbef6641cfa6718eefb314a5530c08d60b21b83245ba6514a0b6b811852bb71ec8f3
6
+ metadata.gz: b391a9f5b25785323b1c7c26a38645e86864478735447b9f4164a2925f1280ebf9bd05ea68785c2c6bb68a7d8db1b8cf6c8c11135c315c1d618949005faed496
7
+ data.tar.gz: 9bafe4539ee30113b25f833bb1e8a048141e210e2faa3cb27524b87142281629242f527ad575011c0c2aa5c4774abd9e05cbf4d27b196ea10f034636c97da3be
data/.node-version CHANGED
@@ -1 +1 @@
1
- 24.4.1
1
+ 26.3.1
data/.npm-version CHANGED
@@ -1 +1 @@
1
- 11.4.2
1
+ 11.17.0
data/.rubocop.yml CHANGED
@@ -5,15 +5,21 @@ AllCops:
5
5
  - "**/vendor/**/*"
6
6
  - "**/db/schema.rb"
7
7
  NewCops: enable
8
- TargetRubyVersion: 3.0
8
+ TargetRubyVersion: 4.0
9
9
  Layout/ClosingHeredocIndentation:
10
10
  Enabled: false
11
+ Layout/ElseAlignment:
12
+ Enabled: false
13
+ Layout/EndAlignment:
14
+ Enabled: false
11
15
  Layout/FirstArgumentIndentation:
12
16
  Enabled: false
13
17
  Layout/HashAlignment:
14
18
  Enabled: false
15
19
  Layout/HeredocIndentation:
16
20
  Enabled: false
21
+ Layout/IndentationWidth:
22
+ Enabled: false
17
23
  Layout/LineEndStringConcatenationIndentation:
18
24
  Enabled: false
19
25
  Layout/LineLength:
@@ -22,14 +28,20 @@ Layout/MultilineMethodCallIndentation:
22
28
  Enabled: false
23
29
  Layout/MultilineOperationIndentation:
24
30
  Enabled: false
31
+ Layout/SpaceAroundKeyword:
32
+ Enabled: false
25
33
  Layout/SpaceInsideHashLiteralBraces:
26
34
  Enabled: false
35
+ Lint/ConstantDefinitionInBlock:
36
+ Enabled: false
27
37
  Lint/EmptyClass:
28
38
  Enabled: false
29
39
  Lint/MissingSuper:
30
40
  Enabled: false
31
41
  Lint/PercentStringArray:
32
42
  Enabled: false
43
+ Lint/SafeNavigationChain:
44
+ Enabled: false
33
45
  Lint/ShadowingOuterLocalVariable:
34
46
  Enabled: false
35
47
  Lint/SuppressedException:
@@ -44,6 +56,8 @@ Metrics/BlockLength:
44
56
  Enabled: false
45
57
  Metrics/ClassLength:
46
58
  Enabled: false
59
+ Metrics/CollectionLiteralLength:
60
+ Enabled: false
47
61
  Metrics/CyclomaticComplexity:
48
62
  Enabled: false
49
63
  Metrics/MethodLength:
@@ -58,6 +72,8 @@ Naming/FileName:
58
72
  Enabled: false
59
73
  Naming/MethodParameterName:
60
74
  Enabled: false
75
+ Naming/PredicateMethod:
76
+ Enabled: false
61
77
  Naming/VariableNumber:
62
78
  Enabled: false
63
79
  Performance/Sum:
@@ -80,6 +96,8 @@ RSpec/NoExpectationExample:
80
96
  Enabled: false
81
97
  RSpec/PendingWithoutReason:
82
98
  Enabled: false
99
+ Rails/BulkChangeTable:
100
+ Enabled: false
83
101
  Rails/Delegate:
84
102
  Enabled: false
85
103
  Rails/DynamicFindBy:
@@ -94,6 +112,8 @@ Rails/Presence:
94
112
  Enabled: false
95
113
  Rails/Present:
96
114
  Enabled: false
115
+ Rails/SkipsModelValidations:
116
+ Enabled: false
97
117
  Rails/ThreeStateBooleanColumn:
98
118
  Enabled: false
99
119
  Rails/TimeZone:
@@ -110,6 +130,8 @@ Style/EmptyMethod:
110
130
  Enabled: false
111
131
  Style/IfUnlessModifier:
112
132
  Enabled: false
133
+ Style/Lambda:
134
+ Enabled: false
113
135
  Style/MultilineBlockChain:
114
136
  Enabled: false
115
137
  Style/NestedTernaryOperator:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.5
1
+ 4.0.5
data/.tool-versions CHANGED
@@ -1,3 +1,2 @@
1
- ruby 3.4.5
2
- yarn 1.22.22
3
- nodejs 24.4.1
1
+ ruby 4.0.5
2
+ nodejs 26.3.1
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source "https://rubygems.org"
4
4
 
5
5
  gemspec
6
6
 
7
- ruby "3.4.5"
7
+ ruby "4.0.5"
8
8
 
9
9
  gem "bundler-audit"
10
10
  gem "dorian"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- search_rails (2.0.5)
4
+ search_rails (3.0.0)
5
5
  chronic
6
6
  query-ruby
7
7
  rails
@@ -10,29 +10,31 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (8.0.2)
14
- actionpack (= 8.0.2)
15
- activesupport (= 8.0.2)
13
+ action_text-trix (2.1.19)
14
+ railties
15
+ actioncable (8.1.3)
16
+ actionpack (= 8.1.3)
17
+ activesupport (= 8.1.3)
16
18
  nio4r (~> 2.0)
17
19
  websocket-driver (>= 0.6.1)
18
20
  zeitwerk (~> 2.6)
19
- actionmailbox (8.0.2)
20
- actionpack (= 8.0.2)
21
- activejob (= 8.0.2)
22
- activerecord (= 8.0.2)
23
- activestorage (= 8.0.2)
24
- activesupport (= 8.0.2)
21
+ actionmailbox (8.1.3)
22
+ actionpack (= 8.1.3)
23
+ activejob (= 8.1.3)
24
+ activerecord (= 8.1.3)
25
+ activestorage (= 8.1.3)
26
+ activesupport (= 8.1.3)
25
27
  mail (>= 2.8.0)
26
- actionmailer (8.0.2)
27
- actionpack (= 8.0.2)
28
- actionview (= 8.0.2)
29
- activejob (= 8.0.2)
30
- activesupport (= 8.0.2)
28
+ actionmailer (8.1.3)
29
+ actionpack (= 8.1.3)
30
+ actionview (= 8.1.3)
31
+ activejob (= 8.1.3)
32
+ activesupport (= 8.1.3)
31
33
  mail (>= 2.8.0)
32
34
  rails-dom-testing (~> 2.2)
33
- actionpack (8.0.2)
34
- actionview (= 8.0.2)
35
- activesupport (= 8.0.2)
35
+ actionpack (8.1.3)
36
+ actionview (= 8.1.3)
37
+ activesupport (= 8.1.3)
36
38
  nokogiri (>= 1.8.5)
37
39
  rack (>= 2.2.4)
38
40
  rack-session (>= 1.0.1)
@@ -40,69 +42,69 @@ GEM
40
42
  rails-dom-testing (~> 2.2)
41
43
  rails-html-sanitizer (~> 1.6)
42
44
  useragent (~> 0.16)
43
- actiontext (8.0.2)
44
- actionpack (= 8.0.2)
45
- activerecord (= 8.0.2)
46
- activestorage (= 8.0.2)
47
- activesupport (= 8.0.2)
45
+ actiontext (8.1.3)
46
+ action_text-trix (~> 2.1.15)
47
+ actionpack (= 8.1.3)
48
+ activerecord (= 8.1.3)
49
+ activestorage (= 8.1.3)
50
+ activesupport (= 8.1.3)
48
51
  globalid (>= 0.6.0)
49
52
  nokogiri (>= 1.8.5)
50
- actionview (8.0.2)
51
- activesupport (= 8.0.2)
53
+ actionview (8.1.3)
54
+ activesupport (= 8.1.3)
52
55
  builder (~> 3.1)
53
56
  erubi (~> 1.11)
54
57
  rails-dom-testing (~> 2.2)
55
58
  rails-html-sanitizer (~> 1.6)
56
- activejob (8.0.2)
57
- activesupport (= 8.0.2)
59
+ activejob (8.1.3)
60
+ activesupport (= 8.1.3)
58
61
  globalid (>= 0.3.6)
59
- activemodel (8.0.2)
60
- activesupport (= 8.0.2)
61
- activerecord (8.0.2)
62
- activemodel (= 8.0.2)
63
- activesupport (= 8.0.2)
62
+ activemodel (8.1.3)
63
+ activesupport (= 8.1.3)
64
+ activerecord (8.1.3)
65
+ activemodel (= 8.1.3)
66
+ activesupport (= 8.1.3)
64
67
  timeout (>= 0.4.0)
65
- activestorage (8.0.2)
66
- actionpack (= 8.0.2)
67
- activejob (= 8.0.2)
68
- activerecord (= 8.0.2)
69
- activesupport (= 8.0.2)
68
+ activestorage (8.1.3)
69
+ actionpack (= 8.1.3)
70
+ activejob (= 8.1.3)
71
+ activerecord (= 8.1.3)
72
+ activesupport (= 8.1.3)
70
73
  marcel (~> 1.0)
71
- activesupport (8.0.2)
74
+ activesupport (8.1.3)
72
75
  base64
73
- benchmark (>= 0.3)
74
76
  bigdecimal
75
77
  concurrent-ruby (~> 1.0, >= 1.3.1)
76
78
  connection_pool (>= 2.2.5)
77
79
  drb
78
80
  i18n (>= 1.6, < 2)
81
+ json
79
82
  logger (>= 1.4.2)
80
83
  minitest (>= 5.1)
81
84
  securerandom (>= 0.3)
82
85
  tzinfo (~> 2.0, >= 2.0.5)
83
86
  uri (>= 0.13.1)
84
- addressable (2.8.7)
85
- public_suffix (>= 2.0.2, < 7.0)
87
+ addressable (2.9.0)
88
+ public_suffix (>= 2.0.2, < 8.0)
86
89
  ast (2.4.3)
87
- base64 (0.2.0)
88
- benchmark (0.4.0)
89
- bigdecimal (3.1.9)
90
+ base64 (0.3.0)
91
+ bigdecimal (4.1.2)
90
92
  builder (3.3.0)
91
- bundler-audit (0.9.2)
92
- bundler (>= 1.2.0, < 3)
93
+ bundler-audit (0.9.3)
94
+ bundler (>= 1.2.0)
93
95
  thor (~> 1.0)
94
96
  chronic (0.10.2)
95
97
  cmdparse (3.0.7)
96
- concurrent-ruby (1.3.5)
97
- connection_pool (2.5.1)
98
- crack (1.0.0)
98
+ concurrent-ruby (1.3.7)
99
+ connection_pool (3.0.2)
100
+ crack (1.0.1)
99
101
  bigdecimal
100
102
  rexml
101
103
  crass (1.0.6)
102
- csv (3.3.4)
103
- date (3.4.1)
104
- diff-lcs (1.6.1)
105
- dorian (2.6.4)
104
+ csv (3.3.5)
105
+ date (3.5.1)
106
+ diff-lcs (1.6.2)
107
+ dorian (2.6.8)
106
108
  csv
107
109
  dorian-arguments
108
110
  dorian-eval
@@ -120,66 +122,69 @@ GEM
120
122
  terminal-table
121
123
  w_syntax_tree-erb
122
124
  yaml
123
- dorian-arguments (1.2.2)
124
- bigdecimal
125
- dorian-eval (1.5.0)
126
- yaml
127
- dorian-progress (1.1.2)
128
- ruby-progressbar
129
- dorian-to_struct (2.0.2)
130
- drb (2.2.1)
125
+ dorian-arguments (1.2.3)
126
+ bigdecimal (>= 3.1, < 5)
127
+ dorian-eval (1.5.1)
128
+ yaml (>= 0.3, < 1)
129
+ dorian-progress (1.1.3)
130
+ ruby-progressbar (>= 1.13, < 2)
131
+ dorian-to_struct (2.0.3)
132
+ drb (2.2.3)
133
+ erb (6.0.4)
131
134
  erubi (1.13.1)
132
135
  geom2d (0.4.1)
133
- git (3.0.0)
136
+ git (4.3.2)
134
137
  activesupport (>= 5.0)
135
138
  addressable (~> 2.8)
136
- process_executer (~> 1.3)
139
+ process_executer (~> 4.0)
137
140
  rchardet (~> 1.9)
138
- globalid (1.2.1)
141
+ globalid (1.4.0)
139
142
  activesupport (>= 6.1)
140
- haml (6.3.0)
143
+ haml (7.2.0)
141
144
  temple (>= 0.8.2)
142
145
  thor
143
146
  tilt
144
- hashdiff (1.1.2)
145
- hexapdf (1.2.0)
147
+ hashdiff (1.2.1)
148
+ hexapdf (1.9.1)
146
149
  cmdparse (~> 3.0, >= 3.0.3)
147
150
  geom2d (~> 0.4, >= 0.4.1)
148
151
  openssl (>= 2.2.1)
149
152
  strscan (>= 3.1.2)
150
- i18n (1.14.7)
153
+ i18n (1.15.2)
151
154
  concurrent-ruby (~> 1.0)
152
- io-console (0.8.0)
153
- irb (1.15.2)
155
+ io-console (0.8.2)
156
+ irb (1.18.0)
154
157
  pp (>= 0.6.0)
158
+ prism (>= 1.3.0)
155
159
  rdoc (>= 4.0.0)
156
160
  reline (>= 0.4.2)
157
- json (2.10.2)
161
+ json (2.20.0)
158
162
  language-ruby (1.2.0)
159
163
  dorian-arguments
160
164
  zeitwerk
161
- language_server-protocol (3.17.0.4)
162
- libv8-node (23.6.1.0)
163
- libv8-node (23.6.1.0-arm64-darwin)
164
- libv8-node (23.6.1.0-x86_64-linux)
165
+ language_server-protocol (3.17.0.5)
166
+ libv8-node (24.12.0.1-arm64-darwin)
167
+ libv8-node (24.12.0.1-x86_64-linux)
165
168
  lint_roller (1.1.0)
166
169
  logger (1.7.0)
167
- loofah (2.24.0)
170
+ loofah (2.25.1)
168
171
  crass (~> 1.0.2)
169
172
  nokogiri (>= 1.12.0)
170
- mail (2.8.1)
173
+ mail (2.9.0)
174
+ logger
171
175
  mini_mime (>= 0.1.1)
172
176
  net-imap
173
177
  net-pop
174
178
  net-smtp
175
- marcel (1.0.4)
179
+ marcel (1.2.1)
176
180
  mini_mime (1.1.5)
177
- mini_racer (0.18.1)
178
- libv8-node (~> 23.6.1.0)
179
- minitest (5.25.5)
180
- mustermann (3.0.3)
181
- ruby2_keywords (~> 0.0.1)
182
- net-imap (0.5.8)
181
+ mini_racer (0.21.4)
182
+ libv8-node (~> 24.12.0.1)
183
+ minitest (6.0.6)
184
+ drb (~> 2.0)
185
+ prism (~> 1.5)
186
+ mustermann (3.1.1)
187
+ net-imap (0.6.4.1)
183
188
  date
184
189
  net-protocol
185
190
  net-pop (0.1.2)
@@ -188,28 +193,29 @@ GEM
188
193
  timeout
189
194
  net-smtp (0.5.1)
190
195
  net-protocol
191
- nio4r (2.7.4)
192
- nokogiri (1.18.8-arm64-darwin)
196
+ nio4r (2.7.5)
197
+ nokogiri (1.19.4-arm64-darwin)
193
198
  racc (~> 1.4)
194
- nokogiri (1.18.8-x86_64-linux-gnu)
199
+ nokogiri (1.19.4-x86_64-linux-gnu)
195
200
  racc (~> 1.4)
196
- openssl (3.3.0)
197
- ostruct (0.6.1)
198
- parallel (1.27.0)
199
- parser (3.3.8.0)
201
+ openssl (4.0.2)
202
+ ostruct (0.6.3)
203
+ parallel (2.1.0)
204
+ parser (3.3.11.1)
200
205
  ast (~> 2.4.1)
201
206
  racc
202
- pp (0.6.2)
207
+ pp (0.6.4)
203
208
  prettyprint
204
209
  prettier_print (1.2.1)
205
210
  prettyprint (0.2.0)
206
- prism (1.4.0)
207
- process_executer (1.3.0)
208
- psych (5.2.3)
211
+ prism (1.9.0)
212
+ process_executer (4.0.4)
213
+ track_open_instances (~> 0.1)
214
+ psych (5.4.0)
209
215
  date
210
216
  stringio
211
- public_suffix (6.0.1)
212
- query-ruby (1.1.0)
217
+ public_suffix (7.0.5)
218
+ query-ruby (1.1.2)
213
219
  activesupport
214
220
  bigdecimal
215
221
  dorian-arguments
@@ -217,123 +223,128 @@ GEM
217
223
  language-ruby
218
224
  zeitwerk
219
225
  racc (1.8.1)
220
- rack (3.1.13)
221
- rack-protection (4.1.1)
226
+ rack (3.2.6)
227
+ rack-protection (4.2.1)
222
228
  base64 (>= 0.1.0)
223
229
  logger (>= 1.6.0)
224
230
  rack (>= 3.0.0, < 4)
225
- rack-session (2.1.0)
231
+ rack-session (2.1.2)
226
232
  base64 (>= 0.1.0)
227
233
  rack (>= 3.0.0)
228
234
  rack-test (2.2.0)
229
235
  rack (>= 1.3)
230
- rackup (2.2.1)
236
+ rackup (2.3.1)
231
237
  rack (>= 3)
232
- rails (8.0.2)
233
- actioncable (= 8.0.2)
234
- actionmailbox (= 8.0.2)
235
- actionmailer (= 8.0.2)
236
- actionpack (= 8.0.2)
237
- actiontext (= 8.0.2)
238
- actionview (= 8.0.2)
239
- activejob (= 8.0.2)
240
- activemodel (= 8.0.2)
241
- activerecord (= 8.0.2)
242
- activestorage (= 8.0.2)
243
- activesupport (= 8.0.2)
238
+ rails (8.1.3)
239
+ actioncable (= 8.1.3)
240
+ actionmailbox (= 8.1.3)
241
+ actionmailer (= 8.1.3)
242
+ actionpack (= 8.1.3)
243
+ actiontext (= 8.1.3)
244
+ actionview (= 8.1.3)
245
+ activejob (= 8.1.3)
246
+ activemodel (= 8.1.3)
247
+ activerecord (= 8.1.3)
248
+ activestorage (= 8.1.3)
249
+ activesupport (= 8.1.3)
244
250
  bundler (>= 1.15.0)
245
- railties (= 8.0.2)
246
- rails-dom-testing (2.2.0)
251
+ railties (= 8.1.3)
252
+ rails-dom-testing (2.3.0)
247
253
  activesupport (>= 5.0.0)
248
254
  minitest
249
255
  nokogiri (>= 1.6)
250
- rails-html-sanitizer (1.6.2)
251
- loofah (~> 2.21)
256
+ rails-html-sanitizer (1.7.0)
257
+ loofah (~> 2.25)
252
258
  nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
253
- railties (8.0.2)
254
- actionpack (= 8.0.2)
255
- activesupport (= 8.0.2)
259
+ railties (8.1.3)
260
+ actionpack (= 8.1.3)
261
+ activesupport (= 8.1.3)
256
262
  irb (~> 1.13)
257
263
  rackup (>= 1.0.0)
258
264
  rake (>= 12.2)
259
265
  thor (~> 1.0, >= 1.2.2)
266
+ tsort (>= 0.2)
260
267
  zeitwerk (~> 2.6)
261
268
  rainbow (3.1.1)
262
- rake (13.2.1)
263
- rchardet (1.9.0)
264
- rdoc (6.13.1)
269
+ rake (13.4.2)
270
+ rchardet (1.10.2)
271
+ rdoc (7.2.0)
272
+ erb
265
273
  psych (>= 4.0.0)
266
- regexp_parser (2.10.0)
267
- reline (0.6.1)
274
+ tsort
275
+ regexp_parser (2.12.0)
276
+ reline (0.6.3)
268
277
  io-console (~> 0.5)
269
- rexml (3.4.1)
270
- rspec (3.13.0)
278
+ rexml (3.4.4)
279
+ rspec (3.13.2)
271
280
  rspec-core (~> 3.13.0)
272
281
  rspec-expectations (~> 3.13.0)
273
282
  rspec-mocks (~> 3.13.0)
274
- rspec-core (3.13.3)
283
+ rspec-core (3.13.6)
275
284
  rspec-support (~> 3.13.0)
276
- rspec-expectations (3.13.3)
285
+ rspec-expectations (3.13.5)
277
286
  diff-lcs (>= 1.2.0, < 2.0)
278
287
  rspec-support (~> 3.13.0)
279
- rspec-mocks (3.13.2)
288
+ rspec-mocks (3.13.8)
280
289
  diff-lcs (>= 1.2.0, < 2.0)
281
290
  rspec-support (~> 3.13.0)
282
- rspec-support (3.13.2)
283
- rubocop (1.75.2)
291
+ rspec-support (3.13.7)
292
+ rubocop (1.88.0)
284
293
  json (~> 2.3)
285
294
  language_server-protocol (~> 3.17.0.2)
286
295
  lint_roller (~> 1.1.0)
287
- parallel (~> 1.10)
296
+ parallel (>= 1.10)
288
297
  parser (>= 3.3.0.2)
289
298
  rainbow (>= 2.2.2, < 4.0)
290
299
  regexp_parser (>= 2.9.3, < 3.0)
291
- rubocop-ast (>= 1.44.0, < 2.0)
300
+ rubocop-ast (>= 1.49.0, < 2.0)
292
301
  ruby-progressbar (~> 1.7)
293
302
  unicode-display_width (>= 2.4.0, < 4.0)
294
- rubocop-ast (1.44.1)
303
+ rubocop-ast (1.49.1)
295
304
  parser (>= 3.3.7.2)
296
- prism (~> 1.4)
297
- rubocop-capybara (2.22.1)
305
+ prism (~> 1.7)
306
+ rubocop-capybara (3.0.0)
298
307
  lint_roller (~> 1.1)
299
- rubocop (~> 1.72, >= 1.72.1)
300
- rubocop-factory_bot (2.27.1)
308
+ rubocop (~> 1.81)
309
+ rubocop-factory_bot (2.28.0)
301
310
  lint_roller (~> 1.1)
302
311
  rubocop (~> 1.72, >= 1.72.1)
303
- rubocop-performance (1.25.0)
312
+ rubocop-performance (1.26.1)
304
313
  lint_roller (~> 1.1)
305
314
  rubocop (>= 1.75.0, < 2.0)
306
- rubocop-ast (>= 1.38.0, < 2.0)
307
- rubocop-rails (2.31.0)
315
+ rubocop-ast (>= 1.47.1, < 2.0)
316
+ rubocop-rails (2.35.5)
308
317
  activesupport (>= 4.2.0)
309
318
  lint_roller (~> 1.1)
310
319
  rack (>= 1.1)
311
320
  rubocop (>= 1.75.0, < 2.0)
312
- rubocop-ast (>= 1.38.0, < 2.0)
321
+ rubocop-ast (>= 1.44.0, < 2.0)
313
322
  rubocop-rake (0.7.1)
314
323
  lint_roller (~> 1.1)
315
324
  rubocop (>= 1.72.1)
316
- rubocop-rspec (3.6.0)
325
+ rubocop-rspec (3.10.2)
317
326
  lint_roller (~> 1.1)
318
- rubocop (~> 1.72, >= 1.72.1)
319
- rubocop-rspec_rails (2.31.0)
327
+ regexp_parser (>= 2.0)
328
+ rubocop (~> 1.86, >= 1.86.2)
329
+ rubocop-rspec_rails (2.32.0)
320
330
  lint_roller (~> 1.1)
321
331
  rubocop (~> 1.72, >= 1.72.1)
322
332
  rubocop-rspec (~> 3.5)
323
- ruby-prof (1.7.1)
333
+ ruby-prof (2.0.5)
334
+ base64
335
+ ostruct
324
336
  ruby-progressbar (1.13.0)
325
- ruby2_keywords (0.0.5)
326
337
  securerandom (0.4.1)
327
- sinatra (4.1.1)
338
+ sinatra (4.2.1)
328
339
  logger (>= 1.6.0)
329
340
  mustermann (~> 3.0)
330
341
  rack (>= 3.0.0, < 4)
331
- rack-protection (= 4.1.1)
342
+ rack-protection (= 4.2.1)
332
343
  rack-session (>= 2.0.0, < 3)
333
344
  tilt (~> 2.0)
334
- stringio (3.1.7)
335
- strscan (3.1.3)
336
- syntax_tree (6.2.0)
345
+ stringio (3.2.0)
346
+ strscan (3.1.8)
347
+ syntax_tree (6.3.0)
337
348
  prettier_print (>= 1.2.0)
338
349
  syntax_tree-haml (4.0.3)
339
350
  haml (>= 5.2)
@@ -342,36 +353,39 @@ GEM
342
353
  syntax_tree-xml (0.1.0)
343
354
  prettier_print
344
355
  syntax_tree (>= 2.0.1)
345
- temple (0.10.3)
356
+ temple (0.10.4)
346
357
  terminal-table (4.0.0)
347
358
  unicode-display_width (>= 1.1.1, < 4)
348
- thor (1.3.2)
349
- tilt (2.6.0)
350
- timeout (0.4.3)
359
+ thor (1.5.0)
360
+ tilt (2.7.0)
361
+ timeout (0.6.1)
362
+ track_open_instances (0.1.15)
363
+ tsort (0.2.0)
351
364
  tzinfo (2.0.6)
352
365
  concurrent-ruby (~> 1.0)
353
- unicode-display_width (3.1.4)
354
- unicode-emoji (~> 4.0, >= 4.0.4)
355
- unicode-emoji (4.0.4)
356
- uri (1.0.3)
366
+ unicode-display_width (3.2.0)
367
+ unicode-emoji (~> 4.1)
368
+ unicode-emoji (4.2.0)
369
+ uri (1.1.1)
357
370
  useragent (0.16.11)
358
371
  w_syntax_tree-erb (0.12.0)
359
372
  prettier_print (~> 1.2, >= 1.2.0)
360
373
  syntax_tree (~> 6.1, >= 6.1.1)
361
- webmock (3.25.1)
374
+ webmock (3.26.2)
362
375
  addressable (>= 2.8.0)
363
376
  crack (>= 0.3.2)
364
377
  hashdiff (>= 0.4.0, < 2.0.0)
365
- websocket-driver (0.7.7)
378
+ websocket-driver (0.8.2)
366
379
  base64
367
380
  websocket-extensions (>= 0.1.0)
368
381
  websocket-extensions (0.1.5)
369
382
  yaml (0.4.0)
370
- zeitwerk (2.7.2)
383
+ zeitwerk (2.8.2)
371
384
 
372
385
  PLATFORMS
373
386
  arm64-darwin-23
374
387
  arm64-darwin-24
388
+ arm64-darwin-25
375
389
  x86_64-linux
376
390
 
377
391
  DEPENDENCIES
@@ -392,7 +406,7 @@ DEPENDENCIES
392
406
  webmock
393
407
 
394
408
  RUBY VERSION
395
- ruby 3.4.5p51
409
+ ruby 4.0.5
396
410
 
397
411
  BUNDLED WITH
398
- 2.6.7
412
+ 4.0.15
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.5
1
+ 3.0.0
data/lib/search.rb CHANGED
@@ -94,8 +94,8 @@ module Search
94
94
  # fields:
95
95
  # [:id, :name, :input]
96
96
  scope :search,
97
- ->(q: "", fields: self.search_fields&.keys) do
98
- raise ArgumentError unless self.search_fields.is_an?(Hash)
97
+ lambda { |q: "", fields: search_fields&.keys|
98
+ raise ArgumentError unless search_fields.is_an?(Hash)
99
99
  raise ArgumentError unless fields.is_an?(Array)
100
100
 
101
101
  fields = fields.map(&:to_s)
@@ -113,22 +113,24 @@ module Search
113
113
  fields: fields
114
114
  )
115
115
  )
116
- end
116
+ }
117
117
 
118
118
  scope :_search_joins,
119
- ->(scope:, fields:) do
119
+ lambda { |scope:, fields:|
120
120
  fields = fields.map(&:to_s)
121
121
 
122
122
  relations =
123
- fields.map { |field| self.search_fields.fetch(field.to_sym)[:relation] }.compact
123
+ fields.filter_map do |field|
124
+ search_fields.fetch(field.to_sym)[:relation]
125
+ end
124
126
 
125
127
  relations.reduce(scope) do |scope_with_relations, relation|
126
128
  relation.call(scope_with_relations)
127
129
  end
128
- end
130
+ }
129
131
 
130
132
  scope :_search_parsed,
131
- ->(parsed:, scope:, fields:) do
133
+ lambda { |parsed:, scope:, fields:|
132
134
  if parsed.is_a?(String)
133
135
  scope._search_fields(q: parsed, fields: fields)
134
136
  elsif parsed.is_a?(Hash)
@@ -186,7 +188,11 @@ module Search
186
188
  if key.blank?
187
189
  scope.none
188
190
  else
189
- scope._search_field(key: key, operator: operator, value: value)
191
+ scope._search_field(
192
+ key: key,
193
+ operator: operator,
194
+ value: value
195
+ )
190
196
  end
191
197
  else
192
198
  raise ArgumentError
@@ -194,14 +200,14 @@ module Search
194
200
  else
195
201
  raise ArgumentError
196
202
  end
197
- end
203
+ }
198
204
 
199
205
  # q:
200
206
  # "dorian"
201
207
  # "1"
202
208
  # fields: [:id, :given_name, :family_name]
203
209
  scope :_search_fields,
204
- ->(q: "", fields: search_fields&.keys) do
210
+ lambda { |q: "", fields: search_fields&.keys|
205
211
  raise ArgumentError unless search_fields.is_an?(Hash)
206
212
  raise ArgumentError unless fields.is_an?(Array)
207
213
 
@@ -211,21 +217,20 @@ module Search
211
217
  where(
212
218
  fields
213
219
  .map do |field|
214
- field = self.search_fields.fetch(field.to_sym)
220
+ field = search_fields.fetch(field.to_sym)
215
221
  node = field[:node].call
216
222
  casted_field = _search_cast(node: node, type: :text)
217
223
  casted_field.matches("%#{q}%", nil, false)
218
224
  end
219
225
  .reduce(&:or)
220
226
  )
221
-
222
- end
227
+ }
223
228
 
224
229
  # key: input, name, id, created_at, updated_at, verified, admin, ...
225
230
  # operator: :, =, >, ~, <, >=, ...
226
231
  # value: "pomodoro", 123, true, false
227
232
  scope :_search_field,
228
- ->(key:, operator: ":", value:, fields: search_fields&.keys) do
233
+ lambda { |key:, value:, operator: ":", fields: search_fields&.keys|
229
234
  raise ArgumentError unless search_fields.is_an?(Hash)
230
235
  raise ArgumentError unless fields.is_an?(Array)
231
236
 
@@ -235,7 +240,7 @@ module Search
235
240
  raise ArgumentError if key.blank?
236
241
  raise ArgumentError if operator.blank?
237
242
 
238
- field = self.search_fields.fetch(key.to_sym)
243
+ field = search_fields.fetch(key.to_sym)
239
244
 
240
245
  case operator
241
246
  when ":"
@@ -256,9 +261,7 @@ module Search
256
261
  _search_matches(field: field, value: value)
257
262
  when "="
258
263
  _search_equal(field: field, value: value)
259
- when "!:"
260
- where.not(id: _search_colon(field: field, value: value))
261
- when "!!"
264
+ when "!:", "!!"
262
265
  where.not(id: _search_colon(field: field, value: value))
263
266
  when "!^"
264
267
  where.not(id: _search_starts(field: field, value: value))
@@ -279,11 +282,11 @@ module Search
279
282
  else
280
283
  raise ArgumentError
281
284
  end
282
- end
285
+ }
283
286
 
284
287
  # id:1, name:dorian, verified:true, created_at:today
285
288
  scope :_search_colon,
286
- ->(field:, value:) do
289
+ lambda { |field:, value:|
287
290
  node = field[:node].call
288
291
 
289
292
  case field[:type]
@@ -298,10 +301,10 @@ module Search
298
301
  else
299
302
  raise ArgumentError
300
303
  end
301
- end
304
+ }
302
305
 
303
306
  scope :_search_matches,
304
- ->(field:, value:) do
307
+ lambda { |field:, value:|
305
308
  node = field[:node].call
306
309
 
307
310
  case field[:type]
@@ -316,10 +319,10 @@ module Search
316
319
  else
317
320
  raise ArgumentError
318
321
  end
319
- end
322
+ }
320
323
 
321
324
  scope :_search_ends,
322
- ->(field:, value:) do
325
+ lambda { |field:, value:|
323
326
  node = field[:node].call
324
327
 
325
328
  case field[:type]
@@ -334,10 +337,10 @@ module Search
334
337
  else
335
338
  raise ArgumentError
336
339
  end
337
- end
340
+ }
338
341
 
339
342
  scope :_search_starts,
340
- ->(field:, value:) do
343
+ lambda { |field:, value:|
341
344
  node = field[:node].call
342
345
 
343
346
  case field[:type]
@@ -352,10 +355,10 @@ module Search
352
355
  else
353
356
  raise ArgumentError
354
357
  end
355
- end
358
+ }
356
359
 
357
360
  scope :_search_equal,
358
- ->(field:, value:) do
361
+ lambda { |field:, value:|
359
362
  node = field[:node].call
360
363
 
361
364
  case field[:type]
@@ -370,10 +373,10 @@ module Search
370
373
  else
371
374
  raise ArgumentError
372
375
  end
373
- end
376
+ }
374
377
 
375
378
  scope :_search_lesser,
376
- ->(field:, value:) do
379
+ lambda { |field:, value:|
377
380
  node = field[:node].call
378
381
 
379
382
  case field[:type]
@@ -388,10 +391,10 @@ module Search
388
391
  else
389
392
  raise ArgumentError
390
393
  end
391
- end
394
+ }
392
395
 
393
396
  scope :_search_lesser_or_equal,
394
- ->(field:, value:) do
397
+ lambda { |field:, value:|
395
398
  node = field[:node].call
396
399
 
397
400
  case field[:type]
@@ -406,10 +409,10 @@ module Search
406
409
  else
407
410
  raise ArgumentError
408
411
  end
409
- end
412
+ }
410
413
 
411
414
  scope :_search_greater,
412
- ->(field:, value:) do
415
+ lambda { |field:, value:|
413
416
  node = field[:node].call
414
417
 
415
418
  case field[:type]
@@ -424,10 +427,10 @@ module Search
424
427
  else
425
428
  raise ArgumentError
426
429
  end
427
- end
430
+ }
428
431
 
429
432
  scope :_search_greater_or_equal,
430
- ->(field:, value:) do
433
+ lambda { |field:, value:|
431
434
  node = field[:node].call
432
435
 
433
436
  case field[:type]
@@ -442,10 +445,10 @@ module Search
442
445
  else
443
446
  raise ArgumentError
444
447
  end
445
- end
448
+ }
446
449
 
447
450
  scope :_search_integer_eq,
448
- ->(node:, value:) do
451
+ lambda { |node:, value:|
449
452
  node = _search_cast(node: node, type: :bigint)
450
453
  value = _search_cast_integer(value)
451
454
 
@@ -458,10 +461,10 @@ module Search
458
461
  else
459
462
  where(node.eq(value))
460
463
  end
461
- end
464
+ }
462
465
 
463
466
  scope :_search_datetime_eq,
464
- ->(node:, value:) do
467
+ lambda { |node:, value:|
465
468
  node = _search_cast(node: node, type: :timestamp)
466
469
  value = _search_cast_datetime(value)
467
470
 
@@ -474,10 +477,10 @@ module Search
474
477
  else
475
478
  where(node.eq(value))
476
479
  end
477
- end
480
+ }
478
481
 
479
482
  scope :_search_string_eq,
480
- ->(node:, value:) do
483
+ lambda { |node:, value:|
481
484
  node = _search_cast(node: node, type: :text)
482
485
  value = _search_cast_string(value)
483
486
 
@@ -490,10 +493,10 @@ module Search
490
493
  else
491
494
  where(node.eq(value))
492
495
  end
493
- end
496
+ }
494
497
 
495
498
  scope :_search_boolean_eq,
496
- ->(node:, value:) do
499
+ lambda { |node:, value:|
497
500
  node = _search_cast(node: node, type: :boolean)
498
501
  value = _search_cast_boolean(value)
499
502
 
@@ -506,118 +509,118 @@ module Search
506
509
  else
507
510
  where(node.eq(value))
508
511
  end
509
- end
512
+ }
510
513
 
511
514
  scope :_search_integer_lt,
512
- ->(node:, value:) do
515
+ lambda { |node:, value:|
513
516
  node = _search_cast(node: node, type: :bigint)
514
517
  value = _search_cast_integer(value)
515
518
  value = value.first if value.is_a?(Range)
516
519
 
517
520
  where(node.lt(value))
518
- end
521
+ }
519
522
 
520
523
  scope :_search_datetime_lt,
521
- ->(node:, value:) do
524
+ lambda { |node:, value:|
522
525
  node = _search_cast(node: node, type: :timestamp)
523
526
  value = _search_cast_datetime(value)
524
527
  value = value.first if value.is_a?(Range)
525
528
 
526
529
  where(node.lt(value))
527
- end
530
+ }
528
531
 
529
532
  scope :_search_string_lt,
530
- ->(node:, value:) do
533
+ lambda { |node:, value:|
531
534
  node = _search_cast(node: node, type: :text)
532
535
  value = _search_cast_string(value)
533
536
  value = value.first if value.is_a?(Range)
534
537
 
535
538
  where(node.lt(value))
536
- end
539
+ }
537
540
 
538
541
  scope :_search_integer_lteq,
539
- ->(node:, value:) do
542
+ lambda { |node:, value:|
540
543
  node = _search_cast(node: node, type: :bigint)
541
544
  value = _search_cast_integer(value)
542
545
  value = value.first if value.is_a?(Range)
543
546
 
544
547
  where(node.lteq(value))
545
- end
548
+ }
546
549
 
547
550
  scope :_search_datetime_lteq,
548
- ->(node:, value:) do
551
+ lambda { |node:, value:|
549
552
  node = _search_cast(node: node, type: :timestamp)
550
553
  value = _search_cast_datetime(value)
551
554
  value = value.first if value.is_a?(Range)
552
555
 
553
556
  where(node.lteq(value))
554
- end
557
+ }
555
558
 
556
559
  scope :_search_string_lteq,
557
- ->(node:, value:) do
560
+ lambda { |node:, value:|
558
561
  node = _search_cast(node: node, type: :text)
559
562
  value = _search_cast_string(value)
560
563
  value = value.first if value.is_a?(Range)
561
564
 
562
565
  where(node.lteq(value))
563
- end
566
+ }
564
567
 
565
568
  scope :_search_integer_gt,
566
- ->(node:, value:) do
569
+ lambda { |node:, value:|
567
570
  node = _search_cast(node: node, type: :bigint)
568
571
  value = _search_cast_integer(value)
569
572
  value = value.last if value.is_a?(Range)
570
573
 
571
574
  where(node.gt(value))
572
- end
575
+ }
573
576
 
574
577
  scope :_search_datetime_gt,
575
- ->(node:, value:) do
578
+ lambda { |node:, value:|
576
579
  node = _search_cast(node: node, type: :timestamp)
577
580
  value = _search_cast_datetime(value)
578
581
  value = value.last if value.is_a?(Range)
579
582
 
580
583
  where(node.gt(value))
581
- end
584
+ }
582
585
 
583
586
  scope :_search_string_gt,
584
- ->(node:, value:) do
587
+ lambda { |node:, value:|
585
588
  node = _search_cast(node: node, type: :text)
586
589
  value = _search_cast_string(value)
587
590
  value = value.last if value.is_a?(Range)
588
591
 
589
592
  where(node.gt(value))
590
- end
593
+ }
591
594
 
592
595
  scope :_search_integer_gteq,
593
- ->(node:, value:) do
596
+ lambda { |node:, value:|
594
597
  node = _search_cast(node: node, type: :bigint)
595
598
  value = _search_cast_integer(value)
596
599
  value = value.last if value.is_a?(Range)
597
600
 
598
601
  where(node.gteq(value))
599
- end
602
+ }
600
603
 
601
604
  scope :_search_datetime_gteq,
602
- ->(node:, value:) do
605
+ lambda { |node:, value:|
603
606
  node = _search_cast(node: node, type: :timestamp)
604
607
  value = _search_cast_datetime(value)
605
608
  value = value.last if value.is_a?(Range)
606
609
 
607
610
  where(node.gteq(value))
608
- end
611
+ }
609
612
 
610
613
  scope :_search_string_gteq,
611
- ->(node:, value:) do
614
+ lambda { |node:, value:|
612
615
  node = _search_cast(node: node, type: :text)
613
616
  value = _search_cast_string(value)
614
617
  value = value.last if value.is_a?(Range)
615
618
 
616
619
  where(node.gteq(value))
617
- end
620
+ }
618
621
 
619
622
  scope :_search_string_matches,
620
- ->(node:, value:) do
623
+ lambda { |node:, value:|
621
624
  node = _search_cast(node: node, type: :text)
622
625
  value = _search_cast_string(value)
623
626
 
@@ -630,10 +633,10 @@ module Search
630
633
  else
631
634
  where(node.matches("%#{value}%", nil, false))
632
635
  end
633
- end
636
+ }
634
637
 
635
638
  scope :_search_string_ends,
636
- ->(node:, value:) do
639
+ lambda { |node:, value:|
637
640
  node = _search_cast(node: node, type: :text)
638
641
  value = _search_cast_string(value)
639
642
 
@@ -646,10 +649,10 @@ module Search
646
649
  else
647
650
  where(node.matches("%#{value}", nil, false))
648
651
  end
649
- end
652
+ }
650
653
 
651
654
  scope :_search_string_starts,
652
- ->(node:, value:) do
655
+ lambda { |node:, value:|
653
656
  node = _search_cast(node: node, type: :text)
654
657
  value = _search_cast_string(value)
655
658
 
@@ -662,6 +665,6 @@ module Search
662
665
  else
663
666
  where(node.matches("#{value}%", nil, false))
664
667
  end
665
- end
668
+ }
666
669
  end
667
670
  end
data/package-lock.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
- "name": "code-ruby",
2
+ "name": "search_rails",
3
3
  "lockfileVersion": 3,
4
4
  "requires": true,
5
5
  "packages": {
6
6
  "": {
7
7
  "license": "MIT",
8
8
  "engines": {
9
- "node": "23.11.0",
10
- "npm": "11.2.0"
9
+ "node": "26.3.1",
10
+ "npm": "11.17.0"
11
11
  }
12
12
  }
13
13
  }
14
- }
14
+ }
data/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "license": "MIT",
3
3
  "engines": {
4
- "node": "24.4.1",
5
- "npm": "11.4.2"
4
+ "node": "26.3.1",
5
+ "npm": "11.17.0"
6
6
  }
7
- }
7
+ }
data/search_rails.gemspec CHANGED
@@ -12,12 +12,12 @@ Gem::Specification.new do |s|
12
12
  s.homepage = "https://github.com/dorianmariecom/search_rails"
13
13
  s.license = "MIT"
14
14
 
15
- s.add_dependency "rails"
15
+ s.add_dependency "chronic"
16
16
  s.add_dependency "query-ruby"
17
+ s.add_dependency "rails"
17
18
  s.add_dependency "zeitwerk"
18
- s.add_dependency "chronic"
19
19
 
20
20
  s.metadata["rubygems_mfa_required"] = "true"
21
21
 
22
- s.required_ruby_version = ">= 3.0"
22
+ s.required_ruby_version = ">= 4.0"
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié
@@ -10,7 +10,7 @@ cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
- name: rails
13
+ name: chronic
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - ">="
@@ -38,7 +38,7 @@ dependencies:
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  - !ruby/object:Gem::Dependency
41
- name: zeitwerk
41
+ name: rails
42
42
  requirement: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - ">="
@@ -52,7 +52,7 @@ dependencies:
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  - !ruby/object:Gem::Dependency
55
- name: chronic
55
+ name: zeitwerk
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ">="
@@ -111,14 +111,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
111
  requirements:
112
112
  - - ">="
113
113
  - !ruby/object:Gem::Version
114
- version: '3.0'
114
+ version: '4.0'
115
115
  required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - ">="
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
- rubygems_version: 3.6.9
121
+ rubygems_version: 4.0.15
122
122
  specification_version: 4
123
123
  summary: a powerful search for rails
124
124
  test_files: []