algoliasearch-rails 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6433c4f68c91187b97118401b684386ba5cdf5be16e37aaa45e650805bf7af8e
4
- data.tar.gz: 81f4035a44f66d65e98f37630a683fef8b152a6c605f6a50974c8a37d9b518e5
3
+ metadata.gz: cc15b367cfcf9859a354bc12cc93aa844e32c88147d929a71ed7a9913ced85b4
4
+ data.tar.gz: 3bdc03e4a7644dbfe306c6d9748c20f8b95e916bd4185059712f735050ed10f6
5
5
  SHA512:
6
- metadata.gz: fa288fd052a2ff08ba427128c42e313563bf8e6c54cb7e4347c1e526e981806c4cd8d77bf91865fac3c9d2d84b1591ee628cbbd1d0e043b1a3b1b45d3f6e227a
7
- data.tar.gz: 2baff463707d56ab0937b3887eeb61b2833d2ee79e06a550211e32a14adb364a6129a89d61384cfa5b788cba8086f297d1fcdecdde7bdba75978286a35f2491f
6
+ metadata.gz: a1527739dd334bbedce3883a5f664534d91a35ce6948f752e90bd77e418302660e9a3cabbf0f2e67d900bff1335bbad95c047b8954563f278dbf629dc8fac8d5
7
+ data.tar.gz: 86b196e2196d3730e90a34cbfad5bb32022fdb94ee5160471f1c2b79e8f1302d2095f50a1376b292b613803542767b237fdab70f10c90811ae6c52a0a91ef94a
data/CHANGELOG.MD CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/2.2.1...master)
4
4
 
5
+ ## [2.2.2](https://github.com/algolia/algoliasearch-rails/compare/2.2.1...2.2.2)
6
+ ### Fixed
7
+ * fix: wrong method name [`#429`](https://github.com/algolia/algoliasearch-rails/pull/429)
8
+ * fix: check if `Sequel::Model` is defined [`#433`](https://github.com/algolia/algoliasearch-rails/pull/433)
9
+
5
10
  ## [2.2.1](https://github.com/algolia/algoliasearch-rails/compare/2.2.0...2.2.1)
6
11
  ### Fixed
7
12
  * fix:settings changes detection issue with empty array [`#424`](https://github.com/algolia/algoliasearch-rails/pull/424)
data/Gemfile.lock CHANGED
@@ -1,40 +1,47 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- actioncable (6.1.4.7)
5
- actionpack (= 6.1.4.7)
6
- activesupport (= 6.1.4.7)
4
+ actioncable (7.0.4.2)
5
+ actionpack (= 7.0.4.2)
6
+ activesupport (= 7.0.4.2)
7
7
  nio4r (~> 2.0)
8
8
  websocket-driver (>= 0.6.1)
9
- actionmailbox (6.1.4.7)
10
- actionpack (= 6.1.4.7)
11
- activejob (= 6.1.4.7)
12
- activerecord (= 6.1.4.7)
13
- activestorage (= 6.1.4.7)
14
- activesupport (= 6.1.4.7)
9
+ actionmailbox (7.0.4.2)
10
+ actionpack (= 7.0.4.2)
11
+ activejob (= 7.0.4.2)
12
+ activerecord (= 7.0.4.2)
13
+ activestorage (= 7.0.4.2)
14
+ activesupport (= 7.0.4.2)
15
15
  mail (>= 2.7.1)
16
- actionmailer (6.1.4.7)
17
- actionpack (= 6.1.4.7)
18
- actionview (= 6.1.4.7)
19
- activejob (= 6.1.4.7)
20
- activesupport (= 6.1.4.7)
16
+ net-imap
17
+ net-pop
18
+ net-smtp
19
+ actionmailer (7.0.4.2)
20
+ actionpack (= 7.0.4.2)
21
+ actionview (= 7.0.4.2)
22
+ activejob (= 7.0.4.2)
23
+ activesupport (= 7.0.4.2)
21
24
  mail (~> 2.5, >= 2.5.4)
25
+ net-imap
26
+ net-pop
27
+ net-smtp
22
28
  rails-dom-testing (~> 2.0)
23
- actionpack (6.1.4.7)
24
- actionview (= 6.1.4.7)
25
- activesupport (= 6.1.4.7)
26
- rack (~> 2.0, >= 2.0.9)
29
+ actionpack (7.0.4.2)
30
+ actionview (= 7.0.4.2)
31
+ activesupport (= 7.0.4.2)
32
+ rack (~> 2.0, >= 2.2.0)
27
33
  rack-test (>= 0.6.3)
28
34
  rails-dom-testing (~> 2.0)
29
35
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
30
- actiontext (6.1.4.7)
31
- actionpack (= 6.1.4.7)
32
- activerecord (= 6.1.4.7)
33
- activestorage (= 6.1.4.7)
34
- activesupport (= 6.1.4.7)
36
+ actiontext (7.0.4.2)
37
+ actionpack (= 7.0.4.2)
38
+ activerecord (= 7.0.4.2)
39
+ activestorage (= 7.0.4.2)
40
+ activesupport (= 7.0.4.2)
41
+ globalid (>= 0.6.0)
35
42
  nokogiri (>= 1.8.5)
36
- actionview (6.1.4.7)
37
- activesupport (= 6.1.4.7)
43
+ actionview (7.0.4.2)
44
+ activesupport (= 7.0.4.2)
38
45
  builder (~> 3.1)
39
46
  erubi (~> 1.4)
40
47
  rails-dom-testing (~> 2.0)
@@ -44,152 +51,147 @@ GEM
44
51
  activemodel (>= 4.1, < 7.1)
45
52
  case_transform (>= 0.2)
46
53
  jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
47
- activejob (6.1.4.7)
48
- activesupport (= 6.1.4.7)
54
+ activejob (7.0.4.2)
55
+ activesupport (= 7.0.4.2)
49
56
  globalid (>= 0.3.6)
50
- activemodel (6.1.4.7)
51
- activesupport (= 6.1.4.7)
52
- activerecord (6.1.4.7)
53
- activemodel (= 6.1.4.7)
54
- activesupport (= 6.1.4.7)
55
- activestorage (6.1.4.7)
56
- actionpack (= 6.1.4.7)
57
- activejob (= 6.1.4.7)
58
- activerecord (= 6.1.4.7)
59
- activesupport (= 6.1.4.7)
60
- marcel (~> 1.0.0)
57
+ activemodel (7.0.4.2)
58
+ activesupport (= 7.0.4.2)
59
+ activerecord (7.0.4.2)
60
+ activemodel (= 7.0.4.2)
61
+ activesupport (= 7.0.4.2)
62
+ activestorage (7.0.4.2)
63
+ actionpack (= 7.0.4.2)
64
+ activejob (= 7.0.4.2)
65
+ activerecord (= 7.0.4.2)
66
+ activesupport (= 7.0.4.2)
67
+ marcel (~> 1.0)
61
68
  mini_mime (>= 1.1.0)
62
- activesupport (6.1.4.7)
69
+ activesupport (7.0.4.2)
63
70
  concurrent-ruby (~> 1.0, >= 1.0.2)
64
71
  i18n (>= 1.6, < 2)
65
72
  minitest (>= 5.1)
66
73
  tzinfo (~> 2.0)
67
- zeitwerk (~> 2.3)
68
- algolia (2.2.2)
69
- faraday (>= 0.15, < 2.0)
74
+ algolia (2.3.1)
75
+ faraday (>= 0.15, < 3)
76
+ faraday-net_http_persistent (>= 0.15, < 3)
70
77
  multi_json (~> 1.0)
71
78
  net-http-persistent
72
79
  builder (3.2.4)
73
80
  case_transform (0.2)
74
81
  activesupport
75
- concurrent-ruby (1.1.10)
76
- connection_pool (2.2.5)
82
+ concurrent-ruby (1.2.0)
83
+ connection_pool (2.3.0)
77
84
  crass (1.0.6)
85
+ date (3.3.3)
78
86
  diff-lcs (1.5.0)
79
- erubi (1.10.0)
80
- faraday (1.10.0)
81
- faraday-em_http (~> 1.0)
82
- faraday-em_synchrony (~> 1.0)
83
- faraday-excon (~> 1.1)
84
- faraday-httpclient (~> 1.0)
85
- faraday-multipart (~> 1.0)
86
- faraday-net_http (~> 1.0)
87
- faraday-net_http_persistent (~> 1.0)
88
- faraday-patron (~> 1.0)
89
- faraday-rack (~> 1.0)
90
- faraday-retry (~> 1.0)
87
+ erubi (1.12.0)
88
+ faraday (2.7.4)
89
+ faraday-net_http (>= 2.0, < 3.1)
91
90
  ruby2_keywords (>= 0.0.4)
92
- faraday-em_http (1.0.0)
93
- faraday-em_synchrony (1.0.0)
94
- faraday-excon (1.1.0)
95
- faraday-httpclient (1.0.1)
96
- faraday-multipart (1.0.3)
97
- multipart-post (>= 1.2, < 3)
98
- faraday-net_http (1.0.1)
99
- faraday-net_http_persistent (1.2.0)
100
- faraday-patron (1.0.0)
101
- faraday-rack (1.0.0)
102
- faraday-retry (1.0.3)
103
- globalid (1.0.0)
91
+ faraday-net_http (3.0.2)
92
+ faraday-net_http_persistent (2.1.0)
93
+ faraday (~> 2.5)
94
+ net-http-persistent (~> 4.0)
95
+ globalid (1.1.0)
104
96
  activesupport (>= 5.0)
105
- i18n (1.10.0)
97
+ i18n (1.12.0)
106
98
  concurrent-ruby (~> 1.0)
107
- json (2.6.1)
99
+ json (2.6.3)
108
100
  jsonapi-renderer (0.2.2)
109
101
  kaminari (0.17.0)
110
102
  actionpack (>= 3.0.0)
111
103
  activesupport (>= 3.0.0)
112
- loofah (2.16.0)
104
+ loofah (2.19.1)
113
105
  crass (~> 1.0.2)
114
106
  nokogiri (>= 1.5.9)
115
- mail (2.7.1)
107
+ mail (2.8.1)
116
108
  mini_mime (>= 0.1.1)
109
+ net-imap
110
+ net-pop
111
+ net-smtp
117
112
  marcel (1.0.2)
118
113
  method_source (1.0.0)
119
114
  mini_mime (1.1.2)
120
- mini_portile2 (2.8.0)
121
- minitest (5.15.0)
115
+ mini_portile2 (2.8.1)
116
+ minitest (5.17.0)
122
117
  multi_json (1.15.0)
123
- multipart-post (2.1.1)
124
118
  net-http-persistent (4.0.1)
125
119
  connection_pool (~> 2.2)
120
+ net-imap (0.3.4)
121
+ date
122
+ net-protocol
123
+ net-pop (0.1.2)
124
+ net-protocol
125
+ net-protocol (0.2.1)
126
+ timeout
127
+ net-smtp (0.3.3)
128
+ net-protocol
126
129
  nio4r (2.5.8)
127
- nokogiri (1.13.4)
130
+ nokogiri (1.14.2)
128
131
  mini_portile2 (~> 2.8.0)
129
132
  racc (~> 1.4)
130
- psych (4.0.3)
133
+ psych (5.1.0)
131
134
  stringio
132
- racc (1.6.0)
133
- rack (2.2.3)
134
- rack-test (1.1.0)
135
- rack (>= 1.0, < 3)
136
- rails (6.1.4.7)
137
- actioncable (= 6.1.4.7)
138
- actionmailbox (= 6.1.4.7)
139
- actionmailer (= 6.1.4.7)
140
- actionpack (= 6.1.4.7)
141
- actiontext (= 6.1.4.7)
142
- actionview (= 6.1.4.7)
143
- activejob (= 6.1.4.7)
144
- activemodel (= 6.1.4.7)
145
- activerecord (= 6.1.4.7)
146
- activestorage (= 6.1.4.7)
147
- activesupport (= 6.1.4.7)
135
+ racc (1.6.2)
136
+ rack (2.2.6.2)
137
+ rack-test (2.0.2)
138
+ rack (>= 1.3)
139
+ rails (7.0.4.2)
140
+ actioncable (= 7.0.4.2)
141
+ actionmailbox (= 7.0.4.2)
142
+ actionmailer (= 7.0.4.2)
143
+ actionpack (= 7.0.4.2)
144
+ actiontext (= 7.0.4.2)
145
+ actionview (= 7.0.4.2)
146
+ activejob (= 7.0.4.2)
147
+ activemodel (= 7.0.4.2)
148
+ activerecord (= 7.0.4.2)
149
+ activestorage (= 7.0.4.2)
150
+ activesupport (= 7.0.4.2)
148
151
  bundler (>= 1.15.0)
149
- railties (= 6.1.4.7)
150
- sprockets-rails (>= 2.0.0)
152
+ railties (= 7.0.4.2)
151
153
  rails-dom-testing (2.0.3)
152
154
  activesupport (>= 4.2.0)
153
155
  nokogiri (>= 1.6)
154
- rails-html-sanitizer (1.4.2)
155
- loofah (~> 2.3)
156
- railties (6.1.4.7)
157
- actionpack (= 6.1.4.7)
158
- activesupport (= 6.1.4.7)
156
+ rails-html-sanitizer (1.5.0)
157
+ loofah (~> 2.19, >= 2.19.1)
158
+ railties (7.0.4.2)
159
+ actionpack (= 7.0.4.2)
160
+ activesupport (= 7.0.4.2)
159
161
  method_source
160
- rake (>= 0.13)
162
+ rake (>= 12.2)
161
163
  thor (~> 1.0)
162
- rake (10.1.1)
163
- rdoc (6.4.0)
164
+ zeitwerk (~> 2.5)
165
+ rake (12.3.3)
166
+ rdoc (6.5.0)
164
167
  psych (>= 4.0.0)
165
168
  redgreen (1.2.2)
166
- rspec (2.99.0)
167
- rspec-core (~> 2.99.0)
168
- rspec-expectations (~> 2.99.0)
169
- rspec-mocks (~> 2.99.0)
170
- rspec-core (2.99.2)
171
- rspec-expectations (2.99.2)
172
- diff-lcs (>= 1.1.3, < 2.0)
173
- rspec-mocks (2.99.4)
169
+ rspec (3.12.0)
170
+ rspec-core (~> 3.12.0)
171
+ rspec-expectations (~> 3.12.0)
172
+ rspec-mocks (~> 3.12.0)
173
+ rspec-core (3.12.1)
174
+ rspec-support (~> 3.12.0)
175
+ rspec-expectations (3.12.2)
176
+ diff-lcs (>= 1.2.0, < 2.0)
177
+ rspec-support (~> 3.12.0)
178
+ rspec-mocks (3.12.3)
179
+ diff-lcs (>= 1.2.0, < 2.0)
180
+ rspec-support (~> 3.12.0)
181
+ rspec-support (3.12.0)
174
182
  ruby2_keywords (0.0.5)
175
- sequel (5.55.0)
176
- sprockets (4.0.3)
177
- concurrent-ruby (~> 1.0)
178
- rack (> 1, < 3)
179
- sprockets-rails (3.4.2)
180
- actionpack (>= 5.2)
181
- activesupport (>= 5.2)
182
- sprockets (>= 3.0.0)
183
- sqlite3 (1.4.2)
184
- stringio (3.0.1)
183
+ sequel (5.65.0)
184
+ sqlite3 (1.4.4)
185
+ stringio (3.0.5)
185
186
  thor (1.2.1)
186
- tzinfo (2.0.4)
187
+ timeout (0.3.2)
188
+ tzinfo (2.0.6)
187
189
  concurrent-ruby (~> 1.0)
188
190
  websocket-driver (0.7.5)
189
191
  websocket-extensions (>= 0.1.0)
190
192
  websocket-extensions (0.1.5)
191
193
  will_paginate (3.3.1)
192
- zeitwerk (2.5.4)
194
+ zeitwerk (2.6.7)
193
195
 
194
196
  PLATFORMS
195
197
  ruby
@@ -202,14 +204,15 @@ DEPENDENCIES
202
204
  jdbc-sqlite3
203
205
  json (>= 1.5.1)
204
206
  kaminari (< 1)
205
- rails (~> 6.1)
206
- rake (~> 10.1.0)
207
+ rails (~> 7.0)
208
+ rails-html-sanitizer
209
+ rake (~> 12.2)
207
210
  rdoc
208
211
  redgreen
209
- rspec (>= 2.5.0, < 3.0)
210
- sequel (>= 4.0)
212
+ rspec (~> 3.0)
213
+ sequel (~> 5.0)
211
214
  sqlite3 (~> 1.4.0)
212
215
  will_paginate (>= 2.3.15)
213
216
 
214
217
  BUNDLED WITH
215
- 1.17.2
218
+ 2.1.4
@@ -1,6 +1,6 @@
1
1
  module AlgoliaSearch
2
2
  module Configuration
3
- def initiliaze
3
+ def initialize
4
4
  @client = nil
5
5
  end
6
6
 
@@ -1,3 +1,3 @@
1
1
  module AlgoliaSearch
2
- VERSION = '2.2.1'
2
+ VERSION = '2.2.2'
3
3
  end
@@ -123,7 +123,7 @@ module AlgoliaSearch
123
123
  end
124
124
 
125
125
  def is_sequel?(object)
126
- defined?(::Sequel) && object.class < ::Sequel::Model
126
+ defined?(::Sequel) && defined?(::Sequel::Model) && object.class < ::Sequel::Model
127
127
  end
128
128
 
129
129
  def is_active_record?(object)
@@ -382,7 +382,7 @@ module AlgoliaSearch
382
382
  attr_accessor :highlight_result, :snippet_result
383
383
 
384
384
  if options[:synchronous] == true
385
- if defined?(::Sequel) && self < Sequel::Model
385
+ if defined?(::Sequel) && defined?(::Sequel::Model) && self < Sequel::Model
386
386
  class_eval do
387
387
  copy_after_validation = instance_method(:after_validation)
388
388
  define_method(:after_validation) do |*args|
@@ -413,7 +413,7 @@ module AlgoliaSearch
413
413
  end
414
414
  end
415
415
  unless options[:auto_index] == false
416
- if defined?(::Sequel) && self < Sequel::Model
416
+ if defined?(::Sequel) && defined?(::Sequel::Model) && self < Sequel::Model
417
417
  class_eval do
418
418
  copy_after_validation = instance_method(:after_validation)
419
419
  copy_before_save = instance_method(:before_save)
@@ -460,7 +460,7 @@ module AlgoliaSearch
460
460
  end
461
461
  end
462
462
  unless options[:auto_remove] == false
463
- if defined?(::Sequel) && self < Sequel::Model
463
+ if defined?(::Sequel) && defined?(::Sequel::Model) && self < Sequel::Model
464
464
  class_eval do
465
465
  copy_after_destroy = instance_method(:after_destroy)
466
466
 
@@ -918,7 +918,7 @@ module AlgoliaSearch
918
918
  def algolia_find_in_batches(batch_size, &block)
919
919
  if (defined?(::ActiveRecord) && ancestors.include?(::ActiveRecord::Base)) || respond_to?(:find_in_batches)
920
920
  find_in_batches(:batch_size => batch_size, &block)
921
- elsif defined?(::Sequel) && self < Sequel::Model
921
+ elsif defined?(::Sequel) && defined?(::Sequel::Model) && self < Sequel::Model
922
922
  dataset.extension(:pagination).each_page(batch_size, &block)
923
923
  else
924
924
  # don't worry, mongoid has its own underlying cursor/streaming mechanism
@@ -1031,7 +1031,7 @@ module AlgoliaSearch
1031
1031
  # algolia_must_reindex flag is reset after every commit as part. If we must reindex at any point in
1032
1032
  # a stransaction, keep flag set until it is explicitly unset
1033
1033
  @algolia_must_reindex ||=
1034
- if defined?(::Sequel) && is_a?(Sequel::Model)
1034
+ if defined?(::Sequel) && defined?(::Sequel::Model) && is_a?(Sequel::Model)
1035
1035
  new? || self.class.algolia_must_reindex?(self)
1036
1036
  else
1037
1037
  new_record? || self.class.algolia_must_reindex?(self)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algoliasearch-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-06 00:00:00.000000000 Z
11
+ date: 2023-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json