algoliasearch-rails 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.MD +10 -1
- data/Gemfile.lock +58 -58
- data/lib/algoliasearch/version.rb +1 -1
- data/lib/algoliasearch-rails.rb +8 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6433c4f68c91187b97118401b684386ba5cdf5be16e37aaa45e650805bf7af8e
|
4
|
+
data.tar.gz: 81f4035a44f66d65e98f37630a683fef8b152a6c605f6a50974c8a37d9b518e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa288fd052a2ff08ba427128c42e313563bf8e6c54cb7e4347c1e526e981806c4cd8d77bf91865fac3c9d2d84b1591ee628cbbd1d0e043b1a3b1b45d3f6e227a
|
7
|
+
data.tar.gz: 2baff463707d56ab0937b3887eeb61b2833d2ee79e06a550211e32a14adb364a6129a89d61384cfa5b788cba8086f297d1fcdecdde7bdba75978286a35f2491f
|
data/CHANGELOG.MD
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/2.1
|
3
|
+
## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/2.2.1...master)
|
4
|
+
|
5
|
+
## [2.2.1](https://github.com/algolia/algoliasearch-rails/compare/2.2.0...2.2.1)
|
6
|
+
### Fixed
|
7
|
+
* fix:settings changes detection issue with empty array [`#424`](https://github.com/algolia/algoliasearch-rails/pull/424)
|
8
|
+
* fix: settings changes detection issue for replica indexes with inherit option [`#426`](https://github.com/algolia/algoliasearch-rails/pull/426)
|
9
|
+
* fix: make sync opt to be selectable for auto setting update logic [`#425`](https://github.com/algolia/algoliasearch-rails/pull/425)
|
10
|
+
|
11
|
+
### Added
|
12
|
+
* Add relevancyStrictness to IndexSettings [`#427`](https://github.com/algolia/algoliasearch-rails/pull/427)
|
4
13
|
|
5
14
|
## [2.2.0](https://github.com/algolia/algoliasearch-rails/compare/2.1.4...2.2.0)
|
6
15
|
### Added
|
data/Gemfile.lock
CHANGED
@@ -1,40 +1,40 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
actioncable (6.1.4.
|
5
|
-
actionpack (= 6.1.4.
|
6
|
-
activesupport (= 6.1.4.
|
4
|
+
actioncable (6.1.4.7)
|
5
|
+
actionpack (= 6.1.4.7)
|
6
|
+
activesupport (= 6.1.4.7)
|
7
7
|
nio4r (~> 2.0)
|
8
8
|
websocket-driver (>= 0.6.1)
|
9
|
-
actionmailbox (6.1.4.
|
10
|
-
actionpack (= 6.1.4.
|
11
|
-
activejob (= 6.1.4.
|
12
|
-
activerecord (= 6.1.4.
|
13
|
-
activestorage (= 6.1.4.
|
14
|
-
activesupport (= 6.1.4.
|
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)
|
15
15
|
mail (>= 2.7.1)
|
16
|
-
actionmailer (6.1.4.
|
17
|
-
actionpack (= 6.1.4.
|
18
|
-
actionview (= 6.1.4.
|
19
|
-
activejob (= 6.1.4.
|
20
|
-
activesupport (= 6.1.4.
|
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)
|
21
21
|
mail (~> 2.5, >= 2.5.4)
|
22
22
|
rails-dom-testing (~> 2.0)
|
23
|
-
actionpack (6.1.4.
|
24
|
-
actionview (= 6.1.4.
|
25
|
-
activesupport (= 6.1.4.
|
23
|
+
actionpack (6.1.4.7)
|
24
|
+
actionview (= 6.1.4.7)
|
25
|
+
activesupport (= 6.1.4.7)
|
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.
|
31
|
-
actionpack (= 6.1.4.
|
32
|
-
activerecord (= 6.1.4.
|
33
|
-
activestorage (= 6.1.4.
|
34
|
-
activesupport (= 6.1.4.
|
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)
|
35
35
|
nokogiri (>= 1.8.5)
|
36
|
-
actionview (6.1.4.
|
37
|
-
activesupport (= 6.1.4.
|
36
|
+
actionview (6.1.4.7)
|
37
|
+
activesupport (= 6.1.4.7)
|
38
38
|
builder (~> 3.1)
|
39
39
|
erubi (~> 1.4)
|
40
40
|
rails-dom-testing (~> 2.0)
|
@@ -44,22 +44,22 @@ GEM
|
|
44
44
|
activemodel (>= 4.1, < 7.1)
|
45
45
|
case_transform (>= 0.2)
|
46
46
|
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
|
47
|
-
activejob (6.1.4.
|
48
|
-
activesupport (= 6.1.4.
|
47
|
+
activejob (6.1.4.7)
|
48
|
+
activesupport (= 6.1.4.7)
|
49
49
|
globalid (>= 0.3.6)
|
50
|
-
activemodel (6.1.4.
|
51
|
-
activesupport (= 6.1.4.
|
52
|
-
activerecord (6.1.4.
|
53
|
-
activemodel (= 6.1.4.
|
54
|
-
activesupport (= 6.1.4.
|
55
|
-
activestorage (6.1.4.
|
56
|
-
actionpack (= 6.1.4.
|
57
|
-
activejob (= 6.1.4.
|
58
|
-
activerecord (= 6.1.4.
|
59
|
-
activesupport (= 6.1.4.
|
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
60
|
marcel (~> 1.0.0)
|
61
61
|
mini_mime (>= 1.1.0)
|
62
|
-
activesupport (6.1.4.
|
62
|
+
activesupport (6.1.4.7)
|
63
63
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
64
64
|
i18n (>= 1.6, < 2)
|
65
65
|
minitest (>= 5.1)
|
@@ -72,7 +72,7 @@ GEM
|
|
72
72
|
builder (3.2.4)
|
73
73
|
case_transform (0.2)
|
74
74
|
activesupport
|
75
|
-
concurrent-ruby (1.1.
|
75
|
+
concurrent-ruby (1.1.10)
|
76
76
|
connection_pool (2.2.5)
|
77
77
|
crass (1.0.6)
|
78
78
|
diff-lcs (1.5.0)
|
@@ -109,7 +109,7 @@ GEM
|
|
109
109
|
kaminari (0.17.0)
|
110
110
|
actionpack (>= 3.0.0)
|
111
111
|
activesupport (>= 3.0.0)
|
112
|
-
loofah (2.
|
112
|
+
loofah (2.16.0)
|
113
113
|
crass (~> 1.0.2)
|
114
114
|
nokogiri (>= 1.5.9)
|
115
115
|
mail (2.7.1)
|
@@ -124,7 +124,7 @@ GEM
|
|
124
124
|
net-http-persistent (4.0.1)
|
125
125
|
connection_pool (~> 2.2)
|
126
126
|
nio4r (2.5.8)
|
127
|
-
nokogiri (1.13.
|
127
|
+
nokogiri (1.13.4)
|
128
128
|
mini_portile2 (~> 2.8.0)
|
129
129
|
racc (~> 1.4)
|
130
130
|
psych (4.0.3)
|
@@ -133,29 +133,29 @@ GEM
|
|
133
133
|
rack (2.2.3)
|
134
134
|
rack-test (1.1.0)
|
135
135
|
rack (>= 1.0, < 3)
|
136
|
-
rails (6.1.4.
|
137
|
-
actioncable (= 6.1.4.
|
138
|
-
actionmailbox (= 6.1.4.
|
139
|
-
actionmailer (= 6.1.4.
|
140
|
-
actionpack (= 6.1.4.
|
141
|
-
actiontext (= 6.1.4.
|
142
|
-
actionview (= 6.1.4.
|
143
|
-
activejob (= 6.1.4.
|
144
|
-
activemodel (= 6.1.4.
|
145
|
-
activerecord (= 6.1.4.
|
146
|
-
activestorage (= 6.1.4.
|
147
|
-
activesupport (= 6.1.4.
|
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)
|
148
148
|
bundler (>= 1.15.0)
|
149
|
-
railties (= 6.1.4.
|
149
|
+
railties (= 6.1.4.7)
|
150
150
|
sprockets-rails (>= 2.0.0)
|
151
151
|
rails-dom-testing (2.0.3)
|
152
152
|
activesupport (>= 4.2.0)
|
153
153
|
nokogiri (>= 1.6)
|
154
154
|
rails-html-sanitizer (1.4.2)
|
155
155
|
loofah (~> 2.3)
|
156
|
-
railties (6.1.4.
|
157
|
-
actionpack (= 6.1.4.
|
158
|
-
activesupport (= 6.1.4.
|
156
|
+
railties (6.1.4.7)
|
157
|
+
actionpack (= 6.1.4.7)
|
158
|
+
activesupport (= 6.1.4.7)
|
159
159
|
method_source
|
160
160
|
rake (>= 0.13)
|
161
161
|
thor (~> 1.0)
|
@@ -172,7 +172,7 @@ GEM
|
|
172
172
|
diff-lcs (>= 1.1.3, < 2.0)
|
173
173
|
rspec-mocks (2.99.4)
|
174
174
|
ruby2_keywords (0.0.5)
|
175
|
-
sequel (5.
|
175
|
+
sequel (5.55.0)
|
176
176
|
sprockets (4.0.3)
|
177
177
|
concurrent-ruby (~> 1.0)
|
178
178
|
rack (> 1, < 3)
|
@@ -212,4 +212,4 @@ DEPENDENCIES
|
|
212
212
|
will_paginate (>= 2.3.15)
|
213
213
|
|
214
214
|
BUNDLED WITH
|
215
|
-
|
215
|
+
1.17.2
|
data/lib/algoliasearch-rails.rb
CHANGED
@@ -54,7 +54,7 @@ module AlgoliaSearch
|
|
54
54
|
# Attributes
|
55
55
|
:searchableAttributes, :attributesForFaceting, :unretrievableAttributes, :attributesToRetrieve,
|
56
56
|
# Ranking
|
57
|
-
:ranking, :customRanking, # Replicas are handled via `add_replica`
|
57
|
+
:ranking, :customRanking, :relevancyStrictness, # Replicas are handled via `add_replica`
|
58
58
|
# Faceting
|
59
59
|
:maxValuesPerFacet, :sortFacetValuesBy,
|
60
60
|
# Highlighting / Snippeting
|
@@ -789,6 +789,9 @@ module AlgoliaSearch
|
|
789
789
|
|
790
790
|
index_settings ||= settings.to_settings
|
791
791
|
index_settings = options[:primary_settings].to_settings.merge(index_settings) if options[:inherit]
|
792
|
+
replicas = index_settings.delete(:replicas) ||
|
793
|
+
index_settings.delete('replicas')
|
794
|
+
index_settings[:replicas] = replicas unless replicas.nil? || options[:inherit]
|
792
795
|
|
793
796
|
options[:check_settings] = true if options[:check_settings].nil?
|
794
797
|
|
@@ -797,10 +800,8 @@ module AlgoliaSearch
|
|
797
800
|
end
|
798
801
|
|
799
802
|
if !algolia_indexing_disabled?(options) && options[:check_settings] && algoliasearch_settings_changed?(current_settings, index_settings)
|
800
|
-
|
801
|
-
|
802
|
-
index_settings[:replicas] = replicas unless replicas.nil? || options[:inherit]
|
803
|
-
@algolia_indexes[settings].set_settings!(index_settings)
|
803
|
+
set_settings_method = options[:synchronous] ? :set_settings! : :set_settings
|
804
|
+
@algolia_indexes[settings].send(set_settings_method, index_settings)
|
804
805
|
end
|
805
806
|
|
806
807
|
@algolia_indexes[settings]
|
@@ -847,6 +848,8 @@ module AlgoliaSearch
|
|
847
848
|
if v.is_a?(Array) and prev_v.is_a?(Array)
|
848
849
|
# compare array of strings, avoiding symbols VS strings comparison
|
849
850
|
return true if v.map { |x| x.to_s } != prev_v.map { |x| x.to_s }
|
851
|
+
elsif v.blank? # blank? check is needed to compare [] and null
|
852
|
+
return true unless prev_v.blank?
|
850
853
|
else
|
851
854
|
return true if prev_v != v
|
852
855
|
end
|
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.
|
4
|
+
version: 2.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
|
-
rubygems_version: 3.0.
|
170
|
+
rubygems_version: 3.0.3.1
|
171
171
|
signing_key:
|
172
172
|
specification_version: 4
|
173
173
|
summary: AlgoliaSearch integration to your favorite ORM
|