algoliasearch-rails 1.25.0 → 1.26.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.MD +7 -1
- data/Gemfile +7 -3
- data/Gemfile.lock +103 -102
- data/README.md +1 -1
- data/lib/algoliasearch/pagination/kaminari.rb +1 -1
- data/lib/algoliasearch/utilities.rb +1 -1
- data/lib/algoliasearch/version.rb +1 -1
- data/lib/algoliasearch-rails.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e7605f49088d6e5dad323c990b8419c9bd61a19189ee875d59a1b3b9c70c350
|
4
|
+
data.tar.gz: 3352a8e76be0c0f1bd25e77a151bec3bb594535effdf4fbe0d6c43c038ade8b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab287068f7733e21e9765ee0757c35e1300c5a5a04c227473ad0839935f9eb7d4e1c93a69180605b49f7ebf936bb19029e6c9ecc5e9b431c8b7dcef7c78d7224
|
7
|
+
data.tar.gz: b9e3a0aa8dfbbd213fb02443933407ec74b3a1b2bc0013e90e83171fd06b42d76938bd450fb4fe90e5e39d8d78b6c29cbc70eae2bfc1c5736cf19d09d8a6042e
|
data/CHANGELOG.MD
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/1.
|
3
|
+
## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/1.26.0...master)
|
4
|
+
|
5
|
+
## [1.26.0](https://github.com/algolia/algoliasearch-rails/compare/1.25.0...1.26.0) (2021-09-03)
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
- Implement virtual replicas ([#409](https://github.com/algolia/algoliasearch-rails/pull/409))
|
4
10
|
|
5
11
|
## [1.25.0](https://github.com/algolia/algoliasearch-rails/compare/1.24.1...1.25.0) (2020-11-24)
|
6
12
|
|
data/Gemfile
CHANGED
@@ -8,8 +8,8 @@ if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
|
|
8
8
|
end
|
9
9
|
|
10
10
|
group :test do
|
11
|
-
rails_version = ENV["RAILS_VERSION"]
|
12
|
-
gem 'rails', rails_version
|
11
|
+
rails_version = ENV["RAILS_VERSION"] || '5.2'
|
12
|
+
gem 'rails', "~> #{rails_version}"
|
13
13
|
gem 'active_model_serializers'
|
14
14
|
if defined?(RUBY_VERSION) && RUBY_VERSION == "1.8.7"
|
15
15
|
gem 'i18n', '< 0.7'
|
@@ -34,8 +34,12 @@ group :test do
|
|
34
34
|
Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.1')
|
35
35
|
gem 'net-http-persistent', '< 3.0'
|
36
36
|
end
|
37
|
+
if Gem::Version.new(rails_version) >= Gem::Version.new('6.0')
|
38
|
+
gem 'sqlite3', '~> 1.4.0', :platform => [:rbx, :ruby]
|
39
|
+
else
|
40
|
+
gem 'sqlite3', '< 1.4.0', :platform => [:rbx, :ruby]
|
41
|
+
end
|
37
42
|
gem 'rspec', '>= 2.5.0', '< 3.0'
|
38
|
-
gem 'sqlite3', '< 1.4.0', :platform => [:rbx, :ruby]
|
39
43
|
gem 'jdbc-sqlite3', :platform => :jruby
|
40
44
|
gem 'activerecord-jdbc-adapter', :platform => :jruby
|
41
45
|
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
|
data/Gemfile.lock
CHANGED
@@ -1,153 +1,152 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
actioncable (5.2.
|
5
|
-
actionpack (= 5.2.
|
4
|
+
actioncable (5.2.2)
|
5
|
+
actionpack (= 5.2.2)
|
6
6
|
nio4r (~> 2.0)
|
7
7
|
websocket-driver (>= 0.6.1)
|
8
|
-
actionmailer (5.2.
|
9
|
-
actionpack (= 5.2.
|
10
|
-
actionview (= 5.2.
|
11
|
-
activejob (= 5.2.
|
8
|
+
actionmailer (5.2.2)
|
9
|
+
actionpack (= 5.2.2)
|
10
|
+
actionview (= 5.2.2)
|
11
|
+
activejob (= 5.2.2)
|
12
12
|
mail (~> 2.5, >= 2.5.4)
|
13
13
|
rails-dom-testing (~> 2.0)
|
14
|
-
actionpack (5.2.
|
15
|
-
actionview (= 5.2.
|
16
|
-
activesupport (= 5.2.
|
17
|
-
rack (~> 2.0
|
14
|
+
actionpack (5.2.2)
|
15
|
+
actionview (= 5.2.2)
|
16
|
+
activesupport (= 5.2.2)
|
17
|
+
rack (~> 2.0)
|
18
18
|
rack-test (>= 0.6.3)
|
19
19
|
rails-dom-testing (~> 2.0)
|
20
20
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
21
|
-
actionview (5.2.
|
22
|
-
activesupport (= 5.2.
|
21
|
+
actionview (5.2.2)
|
22
|
+
activesupport (= 5.2.2)
|
23
23
|
builder (~> 3.1)
|
24
24
|
erubi (~> 1.4)
|
25
25
|
rails-dom-testing (~> 2.0)
|
26
26
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
27
|
-
active_model_serializers (0.10.
|
28
|
-
actionpack (>= 4.1, < 6
|
29
|
-
activemodel (>= 4.1, < 6
|
27
|
+
active_model_serializers (0.10.8)
|
28
|
+
actionpack (>= 4.1, < 6)
|
29
|
+
activemodel (>= 4.1, < 6)
|
30
30
|
case_transform (>= 0.2)
|
31
31
|
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
|
32
|
-
activejob (5.2.
|
33
|
-
activesupport (= 5.2.
|
32
|
+
activejob (5.2.2)
|
33
|
+
activesupport (= 5.2.2)
|
34
34
|
globalid (>= 0.3.6)
|
35
|
-
activemodel (5.2.
|
36
|
-
activesupport (= 5.2.
|
37
|
-
activerecord (5.2.
|
38
|
-
activemodel (= 5.2.
|
39
|
-
activesupport (= 5.2.
|
35
|
+
activemodel (5.2.2)
|
36
|
+
activesupport (= 5.2.2)
|
37
|
+
activerecord (5.2.2)
|
38
|
+
activemodel (= 5.2.2)
|
39
|
+
activesupport (= 5.2.2)
|
40
40
|
arel (>= 9.0)
|
41
|
-
activestorage (5.2.
|
42
|
-
actionpack (= 5.2.
|
43
|
-
activerecord (= 5.2.
|
41
|
+
activestorage (5.2.2)
|
42
|
+
actionpack (= 5.2.2)
|
43
|
+
activerecord (= 5.2.2)
|
44
44
|
marcel (~> 0.3.1)
|
45
|
-
activesupport (5.2.
|
45
|
+
activesupport (5.2.2)
|
46
46
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
47
47
|
i18n (>= 0.7, < 2)
|
48
48
|
minitest (~> 5.1)
|
49
49
|
tzinfo (~> 1.1)
|
50
|
-
addressable (2.
|
51
|
-
|
52
|
-
algoliasearch (1.27.5)
|
50
|
+
addressable (2.4.0)
|
51
|
+
algoliasearch (1.27.4)
|
53
52
|
httpclient (~> 2.8, >= 2.8.3)
|
54
53
|
json (>= 1.5.1)
|
55
54
|
arel (9.0.0)
|
56
|
-
|
55
|
+
backports (3.11.4)
|
56
|
+
builder (3.2.3)
|
57
57
|
case_transform (0.2)
|
58
58
|
activesupport
|
59
|
-
concurrent-ruby (1.1.
|
60
|
-
crass (1.0.
|
61
|
-
diff-lcs (1.
|
62
|
-
erubi (1.
|
63
|
-
|
59
|
+
concurrent-ruby (1.1.4)
|
60
|
+
crass (1.0.4)
|
61
|
+
diff-lcs (1.3)
|
62
|
+
erubi (1.8.0)
|
63
|
+
ethon (0.11.0)
|
64
|
+
ffi (>= 1.3.0)
|
65
|
+
faraday (0.15.4)
|
64
66
|
multipart-post (>= 1.2, < 3)
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
gh (0.
|
69
|
-
|
70
|
-
|
71
|
-
faraday (~>
|
72
|
-
faraday_middleware (~> 1.0)
|
67
|
+
faraday_middleware (0.12.2)
|
68
|
+
faraday (>= 0.7.4, < 1.0)
|
69
|
+
ffi (1.9.25)
|
70
|
+
gh (0.15.1)
|
71
|
+
addressable (~> 2.4.0)
|
72
|
+
backports
|
73
|
+
faraday (~> 0.8)
|
73
74
|
multi_json (~> 1.0)
|
74
75
|
net-http-persistent (~> 2.9)
|
75
76
|
net-http-pipeline
|
76
|
-
globalid (0.4.
|
77
|
+
globalid (0.4.1)
|
77
78
|
activesupport (>= 4.2.0)
|
78
|
-
highline (
|
79
|
+
highline (1.7.10)
|
79
80
|
httpclient (2.8.3)
|
80
|
-
i18n (1.
|
81
|
+
i18n (1.4.0)
|
81
82
|
concurrent-ruby (~> 1.0)
|
82
83
|
json (1.8.6)
|
83
|
-
|
84
|
-
|
85
|
-
kaminari (1.2.1)
|
84
|
+
jsonapi-renderer (0.2.0)
|
85
|
+
kaminari (1.1.1)
|
86
86
|
activesupport (>= 4.1.0)
|
87
|
-
kaminari-actionview (= 1.
|
88
|
-
kaminari-activerecord (= 1.
|
89
|
-
kaminari-core (= 1.
|
90
|
-
kaminari-actionview (1.
|
87
|
+
kaminari-actionview (= 1.1.1)
|
88
|
+
kaminari-activerecord (= 1.1.1)
|
89
|
+
kaminari-core (= 1.1.1)
|
90
|
+
kaminari-actionview (1.1.1)
|
91
91
|
actionview
|
92
|
-
kaminari-core (= 1.
|
93
|
-
kaminari-activerecord (1.
|
92
|
+
kaminari-core (= 1.1.1)
|
93
|
+
kaminari-activerecord (1.1.1)
|
94
94
|
activerecord
|
95
|
-
kaminari-core (= 1.
|
96
|
-
kaminari-core (1.
|
95
|
+
kaminari-core (= 1.1.1)
|
96
|
+
kaminari-core (1.1.1)
|
97
97
|
launchy (2.4.3)
|
98
98
|
addressable (~> 2.3)
|
99
|
-
loofah (2.
|
99
|
+
loofah (2.2.3)
|
100
100
|
crass (~> 1.0.2)
|
101
101
|
nokogiri (>= 1.5.9)
|
102
102
|
mail (2.7.1)
|
103
103
|
mini_mime (>= 0.1.1)
|
104
104
|
marcel (0.3.3)
|
105
105
|
mimemagic (~> 0.3.2)
|
106
|
-
method_source (
|
107
|
-
mimemagic (0.3.
|
108
|
-
mini_mime (1.0.
|
106
|
+
method_source (0.9.2)
|
107
|
+
mimemagic (0.3.3)
|
108
|
+
mini_mime (1.0.1)
|
109
109
|
mini_portile2 (2.4.0)
|
110
|
-
minitest (5.
|
111
|
-
multi_json (1.
|
112
|
-
multipart-post (2.
|
110
|
+
minitest (5.11.3)
|
111
|
+
multi_json (1.13.1)
|
112
|
+
multipart-post (2.0.0)
|
113
113
|
net-http-persistent (2.9.4)
|
114
114
|
net-http-pipeline (1.0.1)
|
115
|
-
nio4r (2.
|
116
|
-
nokogiri (1.
|
115
|
+
nio4r (2.3.1)
|
116
|
+
nokogiri (1.9.1)
|
117
117
|
mini_portile2 (~> 2.4.0)
|
118
|
-
public_suffix (4.0.6)
|
119
118
|
pusher-client (0.6.2)
|
120
119
|
json
|
121
120
|
websocket (~> 1.0)
|
122
|
-
rack (2.
|
121
|
+
rack (2.0.6)
|
123
122
|
rack-test (1.1.0)
|
124
123
|
rack (>= 1.0, < 3)
|
125
|
-
rails (5.2.
|
126
|
-
actioncable (= 5.2.
|
127
|
-
actionmailer (= 5.2.
|
128
|
-
actionpack (= 5.2.
|
129
|
-
actionview (= 5.2.
|
130
|
-
activejob (= 5.2.
|
131
|
-
activemodel (= 5.2.
|
132
|
-
activerecord (= 5.2.
|
133
|
-
activestorage (= 5.2.
|
134
|
-
activesupport (= 5.2.
|
124
|
+
rails (5.2.2)
|
125
|
+
actioncable (= 5.2.2)
|
126
|
+
actionmailer (= 5.2.2)
|
127
|
+
actionpack (= 5.2.2)
|
128
|
+
actionview (= 5.2.2)
|
129
|
+
activejob (= 5.2.2)
|
130
|
+
activemodel (= 5.2.2)
|
131
|
+
activerecord (= 5.2.2)
|
132
|
+
activestorage (= 5.2.2)
|
133
|
+
activesupport (= 5.2.2)
|
135
134
|
bundler (>= 1.3.0)
|
136
|
-
railties (= 5.2.
|
135
|
+
railties (= 5.2.2)
|
137
136
|
sprockets-rails (>= 2.0.0)
|
138
137
|
rails-dom-testing (2.0.3)
|
139
138
|
activesupport (>= 4.2.0)
|
140
139
|
nokogiri (>= 1.6)
|
141
|
-
rails-html-sanitizer (1.
|
142
|
-
loofah (~> 2.
|
143
|
-
railties (5.2.
|
144
|
-
actionpack (= 5.2.
|
145
|
-
activesupport (= 5.2.
|
140
|
+
rails-html-sanitizer (1.0.4)
|
141
|
+
loofah (~> 2.2, >= 2.2.2)
|
142
|
+
railties (5.2.2)
|
143
|
+
actionpack (= 5.2.2)
|
144
|
+
activesupport (= 5.2.2)
|
146
145
|
method_source
|
147
146
|
rake (>= 0.8.7)
|
148
147
|
thor (>= 0.19.0, < 2.0)
|
149
148
|
rake (10.1.1)
|
150
|
-
rdoc (6.
|
149
|
+
rdoc (6.1.1)
|
151
150
|
redgreen (1.2.2)
|
152
151
|
rspec (2.99.0)
|
153
152
|
rspec-core (~> 2.99.0)
|
@@ -157,33 +156,35 @@ GEM
|
|
157
156
|
rspec-expectations (2.99.2)
|
158
157
|
diff-lcs (>= 1.1.3, < 2.0)
|
159
158
|
rspec-mocks (2.99.4)
|
160
|
-
|
161
|
-
|
162
|
-
sprockets (4.0.2)
|
159
|
+
sequel (5.16.0)
|
160
|
+
sprockets (3.7.2)
|
163
161
|
concurrent-ruby (~> 1.0)
|
164
162
|
rack (> 1, < 3)
|
165
|
-
sprockets-rails (3.2.
|
163
|
+
sprockets-rails (3.2.1)
|
166
164
|
actionpack (>= 4.0)
|
167
165
|
activesupport (>= 4.0)
|
168
166
|
sprockets (>= 3.0.0)
|
169
167
|
sqlite3 (1.3.13)
|
170
|
-
thor (
|
168
|
+
thor (0.20.3)
|
171
169
|
thread_safe (0.3.6)
|
172
|
-
travis (1.
|
173
|
-
|
174
|
-
|
170
|
+
travis (1.8.9)
|
171
|
+
backports
|
172
|
+
faraday (~> 0.9)
|
173
|
+
faraday_middleware (~> 0.9, >= 0.9.1)
|
175
174
|
gh (~> 0.13)
|
176
|
-
highline (~>
|
177
|
-
|
178
|
-
launchy (~> 2.1, < 2.5.0)
|
175
|
+
highline (~> 1.6)
|
176
|
+
launchy (~> 2.1)
|
179
177
|
pusher-client (~> 0.4)
|
180
|
-
|
178
|
+
typhoeus (~> 0.6, >= 0.6.8)
|
179
|
+
typhoeus (0.8.0)
|
180
|
+
ethon (>= 0.8.0)
|
181
|
+
tzinfo (1.2.5)
|
181
182
|
thread_safe (~> 0.1)
|
182
183
|
websocket (1.2.8)
|
183
|
-
websocket-driver (0.7.
|
184
|
+
websocket-driver (0.7.0)
|
184
185
|
websocket-extensions (>= 0.1.0)
|
185
|
-
websocket-extensions (0.1.
|
186
|
-
will_paginate (3.
|
186
|
+
websocket-extensions (0.1.3)
|
187
|
+
will_paginate (3.1.6)
|
187
188
|
|
188
189
|
PLATFORMS
|
189
190
|
ruby
|
@@ -196,7 +197,7 @@ DEPENDENCIES
|
|
196
197
|
jdbc-sqlite3
|
197
198
|
json (~> 1.8, >= 1.8.6)
|
198
199
|
kaminari
|
199
|
-
rails (
|
200
|
+
rails (~> 5.2)
|
200
201
|
rake (~> 10.1.0)
|
201
202
|
rdoc
|
202
203
|
redgreen
|
@@ -207,4 +208,4 @@ DEPENDENCIES
|
|
207
208
|
will_paginate (>= 2.3.15)
|
208
209
|
|
209
210
|
BUNDLED WITH
|
210
|
-
|
211
|
+
1.17.2
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<h4 align="center">The perfect starting point to integrate <a href="https://algolia.com" target="_blank">Algolia</a> within your Rails project</h4>
|
7
7
|
|
8
8
|
<p align="center">
|
9
|
-
<a href="https://
|
9
|
+
<a href="https://circleci.com/gh/algolia/algoliasearch-rails"><img src="https://circleci.com/gh/algolia/algoliasearch-rails.svg?style=shield" alt="CircleCI" /></a>
|
10
10
|
<a href="http://badge.fury.io/rb/algoliasearch-rails"><img src="https://badge.fury.io/rb/algoliasearch-rails.svg" alt="Gem Version"></img></a>
|
11
11
|
<a href="https://codeclimate.com/github/algolia/algoliasearch-rails"><img src="https://codeclimate.com/github/algolia/algoliasearch-rails.svg" alt="Code Climate"></img></a>
|
12
12
|
<img src="https://img.shields.io/badge/ActiveRecord-yes-blue.svg?style=flat-square" alt="ActiveRecord"></img>
|
@@ -2,7 +2,7 @@ module AlgoliaSearch
|
|
2
2
|
module Utilities
|
3
3
|
class << self
|
4
4
|
def get_model_classes
|
5
|
-
if defined?(Rails.autoloaders) && Rails.autoloaders.zeitwerk_enabled?
|
5
|
+
if Rails.application && defined?(Rails.autoloaders) && Rails.autoloaders.zeitwerk_enabled?
|
6
6
|
Zeitwerk::Loader.eager_load_all
|
7
7
|
elsif Rails.application
|
8
8
|
Rails.application.eager_load!
|
data/lib/algoliasearch-rails.rb
CHANGED
@@ -252,12 +252,14 @@ module AlgoliaSearch
|
|
252
252
|
settings[:slaves] = additional_indexes.select { |opts, s| opts[:slave] }.map do |opts, s|
|
253
253
|
name = opts[:index_name]
|
254
254
|
name = "#{name}_#{Rails.env.to_s}" if opts[:per_environment]
|
255
|
+
name = "virtual(#{name})" if opts[:virtual]
|
255
256
|
name
|
256
257
|
end
|
257
258
|
settings.delete(:slaves) if settings[:slaves].empty?
|
258
259
|
settings[:replicas] = additional_indexes.select { |opts, s| opts[:replica] }.map do |opts, s|
|
259
260
|
name = opts[:index_name]
|
260
261
|
name = "#{name}_#{Rails.env.to_s}" if opts[:per_environment]
|
262
|
+
name = "virtual(#{name})" if opts[:virtual]
|
261
263
|
name
|
262
264
|
end
|
263
265
|
settings.delete(:replicas) if settings[:replicas].empty?
|
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: 1.
|
4
|
+
version: 1.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|