algoliasearch-rails 3.0.1 → 3.0.2

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: 14ef8f9ecc85826893e288b3fc0ec82a908b407893edb067f0fe2acc05f89240
4
- data.tar.gz: acd4e020ef97b41b6900e0c379abe1cb6f02e503980d0da7186e85250ba4eb75
3
+ metadata.gz: c0094d8d764b360f5760b80ff2620b24bcecf17da7cc27be3ba057bead8b3021
4
+ data.tar.gz: 5446ba88ac084f595832a72b960fd556e8d9b021d7977a11fb8bcc05b9f2cd9d
5
5
  SHA512:
6
- metadata.gz: 594ce23363e9706940a948f27b29db9be1a030859714672a3fba8aa2b3818173188cd64b294699f086966bc5b446ba51612a30fb9ae83ec80fbd2ea839ac7ade
7
- data.tar.gz: 0ba91ece82a88fffadaeff270b1a1de90a7409bc09c370848b31cfeb732712df92c33382031d4d6c956f02d915a19655569e4eac3d9545086e591279aeb2f16e
6
+ metadata.gz: 1d44235532282641c27f279895cb309c3b0e726b71983c39c2d928cadbcc39af2835ffa1357e6be62da71bbbbd02cb3a525fd784bab6bd83f6b9b470f20037b8
7
+ data.tar.gz: a6b6957ae0b007e04fcb0e524efcba10b5da419194fbdad44073c69dd1a903df1d308f2322c4402e74a42de5e0ddb094cd3fd802f1a7e841264a49db1be9d69c
data/CHANGELOG.MD CHANGED
@@ -1,6 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
- ## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/3.0.0...master)
3
+ ## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/3.0.2...master)
4
+
5
+ ## [3.0.2](https://github.com/algolia/algoliasearch-rails/compare/3.0.1...3.0.2)
6
+ ### Fixed
7
+ * Avoid re-initializing index [`#457`](https://github.com/algolia/algoliasearch-rails/pull/457)
4
8
 
5
9
  ## [3.0.1](https://github.com/algolia/algoliasearch-rails/compare/3.0.0...3.0.1)
6
10
  ### Fixed
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem 'json', '>= 1.5.1'
4
- gem 'algolia', '>= 3.5.2'
4
+ gem 'algolia', '>= 3.12.0'
5
5
 
6
6
  if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
7
7
  gem 'rubysl', '~> 2.0', :platform => :rbx
@@ -12,7 +12,7 @@ group :test do
12
12
  gem 'rails', "~> #{rails_version}"
13
13
  gem 'active_model_serializers'
14
14
  if Gem::Version.new(rails_version) >= Gem::Version.new('6.0')
15
- gem 'sqlite3', '~> 1.4.0', :platform => [:rbx, :ruby]
15
+ gem 'sqlite3', '~> 1.5.0', :platform => [:rbx, :ruby]
16
16
  else
17
17
  gem 'sqlite3', '< 1.4.0', :platform => [:rbx, :ruby]
18
18
  end
data/Gemfile.lock CHANGED
@@ -1,103 +1,106 @@
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 (6.1.7.10)
5
+ actionpack (= 6.1.7.10)
6
+ activesupport (= 6.1.7.10)
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 (6.1.7.10)
10
+ actionpack (= 6.1.7.10)
11
+ activejob (= 6.1.7.10)
12
+ activerecord (= 6.1.7.10)
13
+ activestorage (= 6.1.7.10)
14
+ activesupport (= 6.1.7.10)
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
+ actionmailer (6.1.7.10)
17
+ actionpack (= 6.1.7.10)
18
+ actionview (= 6.1.7.10)
19
+ activejob (= 6.1.7.10)
20
+ activesupport (= 6.1.7.10)
21
21
  mail (~> 2.5, >= 2.5.4)
22
22
  rails-dom-testing (~> 2.0)
23
- actionpack (6.1.4.7)
24
- actionview (= 6.1.4.7)
25
- activesupport (= 6.1.4.7)
23
+ actionpack (6.1.7.10)
24
+ actionview (= 6.1.7.10)
25
+ activesupport (= 6.1.7.10)
26
26
  rack (~> 2.0, >= 2.0.9)
27
27
  rack-test (>= 0.6.3)
28
28
  rails-dom-testing (~> 2.0)
29
29
  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)
30
+ actiontext (6.1.7.10)
31
+ actionpack (= 6.1.7.10)
32
+ activerecord (= 6.1.7.10)
33
+ activestorage (= 6.1.7.10)
34
+ activesupport (= 6.1.7.10)
35
35
  nokogiri (>= 1.8.5)
36
- actionview (6.1.4.7)
37
- activesupport (= 6.1.4.7)
36
+ actionview (6.1.7.10)
37
+ activesupport (= 6.1.7.10)
38
38
  builder (~> 3.1)
39
39
  erubi (~> 1.4)
40
40
  rails-dom-testing (~> 2.0)
41
41
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
42
- active_model_serializers (0.10.13)
43
- actionpack (>= 4.1, < 7.1)
44
- activemodel (>= 4.1, < 7.1)
42
+ active_model_serializers (0.10.15)
43
+ actionpack (>= 4.1)
44
+ activemodel (>= 4.1)
45
45
  case_transform (>= 0.2)
46
46
  jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
47
- activejob (6.1.4.7)
48
- activesupport (= 6.1.4.7)
47
+ activejob (6.1.7.10)
48
+ activesupport (= 6.1.7.10)
49
49
  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)
50
+ activemodel (6.1.7.10)
51
+ activesupport (= 6.1.7.10)
52
+ activerecord (6.1.7.10)
53
+ activemodel (= 6.1.7.10)
54
+ activesupport (= 6.1.7.10)
55
+ activestorage (6.1.7.10)
56
+ actionpack (= 6.1.7.10)
57
+ activejob (= 6.1.7.10)
58
+ activerecord (= 6.1.7.10)
59
+ activesupport (= 6.1.7.10)
60
+ marcel (~> 1.0)
61
61
  mini_mime (>= 1.1.0)
62
- activesupport (6.1.4.7)
62
+ activesupport (6.1.7.10)
63
63
  concurrent-ruby (~> 1.0, >= 1.0.2)
64
64
  i18n (>= 1.6, < 2)
65
65
  minitest (>= 5.1)
66
66
  tzinfo (~> 2.0)
67
67
  zeitwerk (~> 2.3)
68
- algolia (2.3.2)
69
- faraday (>= 0.15, < 3)
68
+ algolia (3.15.0)
69
+ base64 (>= 0.2.0, < 1)
70
+ faraday (>= 1.0.1, < 3.0)
70
71
  faraday-net_http_persistent (>= 0.15, < 3)
71
- multi_json (~> 1.0)
72
72
  net-http-persistent
73
73
  base64 (0.2.0)
74
- builder (3.2.4)
74
+ bigdecimal (3.1.9)
75
+ builder (3.3.0)
75
76
  case_transform (0.2)
76
77
  activesupport
77
- concurrent-ruby (1.2.2)
78
- connection_pool (2.4.1)
78
+ concurrent-ruby (1.3.5)
79
+ connection_pool (2.5.0)
79
80
  crass (1.0.6)
80
- date (3.3.3)
81
- diff-lcs (1.5.1)
82
- erubi (1.12.0)
83
- faraday (2.8.1)
84
- base64
85
- faraday-net_http (>= 2.0, < 3.1)
86
- ruby2_keywords (>= 0.0.4)
87
- faraday-net_http (3.0.2)
81
+ date (3.4.1)
82
+ diff-lcs (1.6.1)
83
+ erubi (1.13.1)
84
+ faraday (2.12.2)
85
+ faraday-net_http (>= 2.0, < 3.5)
86
+ json
87
+ logger
88
+ faraday-net_http (3.4.0)
89
+ net-http (>= 0.5.0)
88
90
  faraday-net_http_persistent (2.3.0)
89
91
  faraday (~> 2.5)
90
92
  net-http-persistent (>= 4.0.4, < 5)
91
- globalid (1.1.0)
92
- activesupport (>= 5.0)
93
- i18n (1.14.1)
93
+ globalid (1.2.1)
94
+ activesupport (>= 6.1)
95
+ i18n (1.14.7)
94
96
  concurrent-ruby (~> 1.0)
95
- json (2.6.3)
97
+ json (2.10.2)
96
98
  jsonapi-renderer (0.2.2)
97
99
  kaminari (0.17.0)
98
100
  actionpack (>= 3.0.0)
99
101
  activesupport (>= 3.0.0)
100
- loofah (2.21.3)
102
+ logger (1.7.0)
103
+ loofah (2.24.0)
101
104
  crass (~> 1.0.2)
102
105
  nokogiri (>= 1.12.0)
103
106
  mail (2.8.1)
@@ -105,114 +108,128 @@ GEM
105
108
  net-imap
106
109
  net-pop
107
110
  net-smtp
108
- marcel (1.0.2)
109
- method_source (1.0.0)
111
+ marcel (1.0.4)
112
+ method_source (1.1.0)
110
113
  mini_mime (1.1.5)
111
- mini_portile2 (2.8.4)
112
- minitest (5.19.0)
113
- multi_json (1.15.0)
114
- net-http-persistent (4.0.4)
114
+ mini_portile2 (2.8.8)
115
+ minitest (5.25.5)
116
+ net-http (0.6.0)
117
+ uri
118
+ net-http-persistent (4.0.5)
115
119
  connection_pool (~> 2.2)
116
- net-imap (0.3.7)
120
+ net-imap (0.5.6)
117
121
  date
118
122
  net-protocol
119
123
  net-pop (0.1.2)
120
124
  net-protocol
121
- net-protocol (0.2.1)
125
+ net-protocol (0.2.2)
122
126
  timeout
123
- net-smtp (0.3.3)
127
+ net-smtp (0.5.1)
124
128
  net-protocol
125
- nio4r (2.5.9)
126
- nokogiri (1.13.10)
127
- mini_portile2 (~> 2.8.0)
129
+ nio4r (2.7.4)
130
+ nokogiri (1.18.6)
131
+ mini_portile2 (~> 2.8.2)
132
+ racc (~> 1.4)
133
+ nokogiri (1.18.6-arm64-darwin)
128
134
  racc (~> 1.4)
129
- pagy (6.5.0)
130
- psych (5.1.0)
135
+ pagy (9.3.4)
136
+ psych (5.2.3)
137
+ date
131
138
  stringio
132
- racc (1.7.1)
133
- rack (2.2.8)
134
- rack-test (2.1.0)
139
+ racc (1.8.1)
140
+ rack (2.2.13)
141
+ rack-test (2.2.0)
135
142
  rack (>= 1.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)
143
+ rails (6.1.7.10)
144
+ actioncable (= 6.1.7.10)
145
+ actionmailbox (= 6.1.7.10)
146
+ actionmailer (= 6.1.7.10)
147
+ actionpack (= 6.1.7.10)
148
+ actiontext (= 6.1.7.10)
149
+ actionview (= 6.1.7.10)
150
+ activejob (= 6.1.7.10)
151
+ activemodel (= 6.1.7.10)
152
+ activerecord (= 6.1.7.10)
153
+ activestorage (= 6.1.7.10)
154
+ activesupport (= 6.1.7.10)
148
155
  bundler (>= 1.15.0)
149
- railties (= 6.1.4.7)
156
+ railties (= 6.1.7.10)
150
157
  sprockets-rails (>= 2.0.0)
151
158
  rails-dom-testing (2.2.0)
152
159
  activesupport (>= 5.0.0)
153
160
  minitest
154
161
  nokogiri (>= 1.6)
155
- rails-html-sanitizer (1.5.0)
156
- loofah (~> 2.19, >= 2.19.1)
157
- railties (6.1.4.7)
158
- actionpack (= 6.1.4.7)
159
- activesupport (= 6.1.4.7)
162
+ rails-html-sanitizer (1.6.2)
163
+ loofah (~> 2.21)
164
+ 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)
165
+ railties (6.1.7.10)
166
+ actionpack (= 6.1.7.10)
167
+ activesupport (= 6.1.7.10)
160
168
  method_source
161
- rake (>= 0.13)
169
+ rake (>= 12.2)
162
170
  thor (~> 1.0)
163
- rake (10.1.1)
164
- rdoc (6.5.0)
171
+ rake (13.2.1)
172
+ rdoc (6.13.0)
165
173
  psych (>= 4.0.0)
166
174
  redgreen (1.2.2)
167
- rspec (2.99.0)
168
- rspec-core (~> 2.99.0)
169
- rspec-expectations (~> 2.99.0)
170
- rspec-mocks (~> 2.99.0)
171
- rspec-core (2.99.2)
172
- rspec-expectations (2.99.2)
173
- diff-lcs (>= 1.1.3, < 2.0)
174
- rspec-mocks (2.99.4)
175
- ruby2_keywords (0.0.5)
176
- sequel (5.71.0)
177
- sprockets (4.2.0)
175
+ rspec (3.13.0)
176
+ rspec-core (~> 3.13.0)
177
+ rspec-expectations (~> 3.13.0)
178
+ rspec-mocks (~> 3.13.0)
179
+ rspec-core (3.13.3)
180
+ rspec-support (~> 3.13.0)
181
+ rspec-expectations (3.13.3)
182
+ diff-lcs (>= 1.2.0, < 2.0)
183
+ rspec-support (~> 3.13.0)
184
+ rspec-mocks (3.13.2)
185
+ diff-lcs (>= 1.2.0, < 2.0)
186
+ rspec-support (~> 3.13.0)
187
+ rspec-support (3.13.2)
188
+ sequel (5.90.0)
189
+ bigdecimal
190
+ sprockets (4.2.1)
178
191
  concurrent-ruby (~> 1.0)
179
192
  rack (>= 2.2.4, < 4)
180
- sprockets-rails (3.4.2)
181
- actionpack (>= 5.2)
182
- activesupport (>= 5.2)
193
+ sprockets-rails (3.5.2)
194
+ actionpack (>= 6.1)
195
+ activesupport (>= 6.1)
183
196
  sprockets (>= 3.0.0)
184
- sqlite3 (1.4.4)
185
- stringio (3.0.6)
186
- thor (1.2.2)
187
- timeout (0.4.0)
197
+ sqlite3 (1.5.4)
198
+ mini_portile2 (~> 2.8.0)
199
+ stringio (3.1.6)
200
+ thor (1.3.2)
201
+ timeout (0.4.3)
188
202
  tzinfo (2.0.6)
189
203
  concurrent-ruby (~> 1.0)
190
- websocket-driver (0.7.6)
204
+ uri (1.0.3)
205
+ websocket-driver (0.7.7)
206
+ base64
191
207
  websocket-extensions (>= 0.1.0)
192
208
  websocket-extensions (0.1.5)
193
- will_paginate (4.0.0)
194
- zeitwerk (2.6.11)
209
+ will_paginate (4.0.1)
210
+ zeitwerk (2.7.2)
195
211
 
196
212
  PLATFORMS
213
+ arm64-darwin-24
197
214
  ruby
198
215
 
199
216
  DEPENDENCIES
200
217
  active_model_serializers
201
218
  activerecord-jdbc-adapter
202
219
  activerecord-jdbcsqlite3-adapter
203
- algolia (< 3.0.0)
220
+ algolia (>= 3.12.0)
204
221
  jdbc-sqlite3
205
222
  json (>= 1.5.1)
206
223
  kaminari (< 1)
207
224
  pagy
208
225
  rails (~> 6.1)
209
- rake (~> 10.1.0)
226
+ rake (>= 10.1.0)
210
227
  rdoc
211
228
  redgreen
212
- rspec (>= 2.5.0, < 3.0)
229
+ rspec (~> 3.0)
213
230
  sequel (>= 4.0)
214
- sqlite3 (~> 1.4.0)
231
+ sqlite3 (~> 1.5.0)
215
232
  will_paginate (>= 2.3.15)
216
233
 
217
234
  BUNDLED WITH
218
- 2.1.4
235
+ 2.5.9
@@ -1,3 +1,3 @@
1
1
  module AlgoliaSearch
2
- VERSION = '3.0.1'
2
+ VERSION = '3.0.2'
3
3
  end
@@ -540,7 +540,7 @@ module AlgoliaSearch
540
540
 
541
541
  synonyms = s.delete("synonyms") || s.delete(:synonyms)
542
542
  unless synonyms.nil? || synonyms.empty?
543
- resp = AlgoliaSearch.client.save_synonyms(index_name,synonyms.map {|s| Algolia::Search::SynonymHit.new({object_id: s.join("-"), synonyms: s, type: "synonym"}) } )
543
+ resp = AlgoliaSearch.client.save_synonyms(index_name,synonyms.map {|s| Algolia::Search::SynonymHit.new({algolia_object_id: s.join("-"), synonyms: s, type: "synonym"}) } )
544
544
  AlgoliaSearch.client.wait_for_task(index_name, resp.task_id) if synchronous || options[:synchronous]
545
545
  end
546
546
 
@@ -769,10 +769,11 @@ module AlgoliaSearch
769
769
  options ||= algoliasearch_options
770
770
  settings ||= algoliasearch_settings
771
771
 
772
- return if @algolia_indexes_init[settings]
773
-
774
772
  index_name = algolia_index_name(options)
775
773
 
774
+ return if @algolia_indexes_init[index_name]
775
+
776
+ @algolia_indexes_init[index_name] = settings
776
777
 
777
778
  index_settings_hash ||= settings.to_settings.to_hash
778
779
  index_settings_hash = options[:primary_settings].to_settings.to_hash.merge(index_settings_hash) if options[:inherit]
@@ -792,7 +793,7 @@ module AlgoliaSearch
792
793
 
793
794
  synonyms = s.delete("synonyms") || s.delete(:synonyms)
794
795
  unless synonyms.nil? || synonyms.empty?
795
- resp = AlgoliaSearch.client.save_synonyms(index_name,synonyms.map {|s| Algolia::Search::SynonymHit.new({object_id: s.join("-"), synonyms: s, type: "synonym"}) } )
796
+ resp = AlgoliaSearch.client.save_synonyms(index_name,synonyms.map {|s| Algolia::Search::SynonymHit.new({algolia_object_id: s.join("-"), synonyms: s, type: "synonym"}) } )
796
797
  AlgoliaSearch.client.wait_for_task(index_name, resp.task_id) if options[:synchronous]
797
798
  end
798
799
 
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: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-03 00:00:00.000000000 Z
11
+ date: 2025-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
182
  - !ruby/object:Gem::Version
183
183
  version: '0'
184
184
  requirements: []
185
- rubygems_version: 3.1.6
185
+ rubygems_version: 3.5.9
186
186
  signing_key:
187
187
  specification_version: 4
188
188
  summary: AlgoliaSearch integration to your favorite ORM