algoliasearch-rails 1.24.1 → 1.25.0

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: 172aa1557bb7143640ef981eb9e392dbb6b719921b980d58f51d0deda1642710
4
- data.tar.gz: 697a29f878ab2997b01ffd5cda494dacabe053dc802ceb183a13c8b1a488b4c2
3
+ metadata.gz: 71ddc460401250164dd2422b959edbb444a99bec59ba34fc26facf7b2783b141
4
+ data.tar.gz: 4500a5845bafdbc8794d1538056f1c59a7ced17cd49e7c80fa827507d155c532
5
5
  SHA512:
6
- metadata.gz: 35e400c2809ce5c39da5f1dbcd5f485692c483ae87668c6a2817e2d34bd0b24bde83973704e981567f58aeeb24cdd2bab814d97a86a3da6178ba12f270494b1c
7
- data.tar.gz: d0d2277e45b06f564ba63daca91b5eadf4b78847af79f09b88ebc16e5fec4b85790b562e3cf9731b905417069ec3e5edeacf4787677041274de7d7a159bc5586
6
+ metadata.gz: 7e7512b284a7f61ff4a04f12e7979d632b04a208781b28f2b3690edc75da5b099c83a77205ca0f9ac7298a20e3b7674260b5d2fd1c9471498df95d1ac82be858
7
+ data.tar.gz: 51a2e7381403a45f0bdd2f587bdeffe30d375853eeae767a07385ca4ae0bab0c612f1d7b79b143460f5982be9d05bea85c636740b4f2141291155cc241a117bf
@@ -33,10 +33,16 @@ matrix:
33
33
  env: RAILS_VERSION=5.1 SEQUEL_VERSION=5.0
34
34
  - rvm: 2.5.3
35
35
  env: RAILS_VERSION=5.1 SEQUEL_VERSION=5.0
36
+ - rvm: 2.5.3
37
+ env: RAILS_VERSION=6.0 SEQUEL_VERSION=5.0
36
38
  - rvm: 2.6.0
37
39
  env: RAILS_VERSION=5.2 SEQUEL_VERSION=5.0
40
+ - rvm: 2.6.0
41
+ env: RAILS_VERSION=6.0 SEQUEL_VERSION=5.0
38
42
  - rvm: 2.7.0
39
43
  env: RAILS_VERSION=5.2 SEQUEL_VERSION=5.0
44
+ - rvm: 2.7.0
45
+ env: RAILS_VERSION=6.0 SEQUEL_VERSION=5.0
40
46
 
41
47
  before_install:
42
48
  - wget http://api-key-dealer.herokuapp.com/clients/algolia-keys && chmod +x algolia-keys
@@ -1,5 +1,16 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/1.25.0...master)
4
+
5
+ ## [1.25.0](https://github.com/algolia/algoliasearch-rails/compare/1.24.1...1.25.0) (2020-11-24)
6
+
7
+ ### Added
8
+ - Pass array argument to geoloc ([#372](https://github.com/algolia/algoliasearch-rails/pull/372))
9
+ - Containerize the repo ([#391](https://github.com/algolia/algoliasearch-rails/pull/391))
10
+
11
+ ### Fixed
12
+ - Use Zeitwerk for loading models in Rails 6 ([#364](https://github.com/algolia/algoliasearch-rails/pull/364))
13
+
3
14
  ## [1.24.1](https://github.com/algolia/algoliasearch-rails/releases/tag/1.24.1) (2020-07-15)
4
15
 
5
16
  **Fixed**
@@ -1,167 +1,153 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- actioncable (6.0.1)
5
- actionpack (= 6.0.1)
4
+ actioncable (5.2.4.4)
5
+ actionpack (= 5.2.4.4)
6
6
  nio4r (~> 2.0)
7
7
  websocket-driver (>= 0.6.1)
8
- actionmailbox (6.0.1)
9
- actionpack (= 6.0.1)
10
- activejob (= 6.0.1)
11
- activerecord (= 6.0.1)
12
- activestorage (= 6.0.1)
13
- activesupport (= 6.0.1)
14
- mail (>= 2.7.1)
15
- actionmailer (6.0.1)
16
- actionpack (= 6.0.1)
17
- actionview (= 6.0.1)
18
- activejob (= 6.0.1)
8
+ actionmailer (5.2.4.4)
9
+ actionpack (= 5.2.4.4)
10
+ actionview (= 5.2.4.4)
11
+ activejob (= 5.2.4.4)
19
12
  mail (~> 2.5, >= 2.5.4)
20
13
  rails-dom-testing (~> 2.0)
21
- actionpack (6.0.1)
22
- actionview (= 6.0.1)
23
- activesupport (= 6.0.1)
24
- rack (~> 2.0)
14
+ actionpack (5.2.4.4)
15
+ actionview (= 5.2.4.4)
16
+ activesupport (= 5.2.4.4)
17
+ rack (~> 2.0, >= 2.0.8)
25
18
  rack-test (>= 0.6.3)
26
19
  rails-dom-testing (~> 2.0)
27
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
28
- actiontext (6.0.1)
29
- actionpack (= 6.0.1)
30
- activerecord (= 6.0.1)
31
- activestorage (= 6.0.1)
32
- activesupport (= 6.0.1)
33
- nokogiri (>= 1.8.5)
34
- actionview (6.0.1)
35
- activesupport (= 6.0.1)
20
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
21
+ actionview (5.2.4.4)
22
+ activesupport (= 5.2.4.4)
36
23
  builder (~> 3.1)
37
24
  erubi (~> 1.4)
38
25
  rails-dom-testing (~> 2.0)
39
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
26
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
40
27
  active_model_serializers (0.10.10)
41
28
  actionpack (>= 4.1, < 6.1)
42
29
  activemodel (>= 4.1, < 6.1)
43
30
  case_transform (>= 0.2)
44
31
  jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
45
- activejob (6.0.1)
46
- activesupport (= 6.0.1)
32
+ activejob (5.2.4.4)
33
+ activesupport (= 5.2.4.4)
47
34
  globalid (>= 0.3.6)
48
- activemodel (6.0.1)
49
- activesupport (= 6.0.1)
50
- activerecord (6.0.1)
51
- activemodel (= 6.0.1)
52
- activesupport (= 6.0.1)
53
- activestorage (6.0.1)
54
- actionpack (= 6.0.1)
55
- activejob (= 6.0.1)
56
- activerecord (= 6.0.1)
35
+ activemodel (5.2.4.4)
36
+ activesupport (= 5.2.4.4)
37
+ activerecord (5.2.4.4)
38
+ activemodel (= 5.2.4.4)
39
+ activesupport (= 5.2.4.4)
40
+ arel (>= 9.0)
41
+ activestorage (5.2.4.4)
42
+ actionpack (= 5.2.4.4)
43
+ activerecord (= 5.2.4.4)
57
44
  marcel (~> 0.3.1)
58
- activesupport (6.0.1)
45
+ activesupport (5.2.4.4)
59
46
  concurrent-ruby (~> 1.0, >= 1.0.2)
60
47
  i18n (>= 0.7, < 2)
61
48
  minitest (~> 5.1)
62
49
  tzinfo (~> 1.1)
63
- zeitwerk (~> 2.2)
64
- addressable (2.4.0)
65
- algoliasearch (1.27.1)
50
+ addressable (2.7.0)
51
+ public_suffix (>= 2.0.2, < 5.0)
52
+ algoliasearch (1.27.5)
66
53
  httpclient (~> 2.8, >= 2.8.3)
67
54
  json (>= 1.5.1)
68
- backports (3.15.0)
69
- builder (3.2.3)
55
+ arel (9.0.0)
56
+ builder (3.2.4)
70
57
  case_transform (0.2)
71
58
  activesupport
72
- concurrent-ruby (1.1.5)
73
- crass (1.0.5)
74
- diff-lcs (1.3)
59
+ concurrent-ruby (1.1.7)
60
+ crass (1.0.6)
61
+ diff-lcs (1.4.4)
75
62
  erubi (1.9.0)
76
- ethon (0.12.0)
77
- ffi (>= 1.3.0)
78
- faraday (0.17.0)
63
+ faraday (1.1.0)
79
64
  multipart-post (>= 1.2, < 3)
80
- faraday_middleware (0.13.1)
81
- faraday (>= 0.7.4, < 1.0)
82
- ffi (1.11.3)
83
- gh (0.15.1)
84
- addressable (~> 2.4.0)
85
- backports
86
- faraday (~> 0.8)
65
+ ruby2_keywords
66
+ faraday_middleware (1.0.0)
67
+ faraday (~> 1.0)
68
+ gh (0.18.0)
69
+ activesupport (~> 5.0)
70
+ addressable (~> 2.4)
71
+ faraday (~> 1.0)
72
+ faraday_middleware (~> 1.0)
87
73
  multi_json (~> 1.0)
88
74
  net-http-persistent (~> 2.9)
89
75
  net-http-pipeline
90
76
  globalid (0.4.2)
91
77
  activesupport (>= 4.2.0)
92
- highline (1.7.10)
78
+ highline (2.0.3)
93
79
  httpclient (2.8.3)
94
- i18n (1.7.0)
80
+ i18n (1.8.5)
95
81
  concurrent-ruby (~> 1.0)
96
82
  json (1.8.6)
83
+ json_pure (2.3.1)
97
84
  jsonapi-renderer (0.2.2)
98
- kaminari (1.1.1)
85
+ kaminari (1.2.1)
99
86
  activesupport (>= 4.1.0)
100
- kaminari-actionview (= 1.1.1)
101
- kaminari-activerecord (= 1.1.1)
102
- kaminari-core (= 1.1.1)
103
- kaminari-actionview (1.1.1)
87
+ kaminari-actionview (= 1.2.1)
88
+ kaminari-activerecord (= 1.2.1)
89
+ kaminari-core (= 1.2.1)
90
+ kaminari-actionview (1.2.1)
104
91
  actionview
105
- kaminari-core (= 1.1.1)
106
- kaminari-activerecord (1.1.1)
92
+ kaminari-core (= 1.2.1)
93
+ kaminari-activerecord (1.2.1)
107
94
  activerecord
108
- kaminari-core (= 1.1.1)
109
- kaminari-core (1.1.1)
95
+ kaminari-core (= 1.2.1)
96
+ kaminari-core (1.2.1)
110
97
  launchy (2.4.3)
111
98
  addressable (~> 2.3)
112
- loofah (2.4.0)
99
+ loofah (2.7.0)
113
100
  crass (~> 1.0.2)
114
101
  nokogiri (>= 1.5.9)
115
102
  mail (2.7.1)
116
103
  mini_mime (>= 0.1.1)
117
104
  marcel (0.3.3)
118
105
  mimemagic (~> 0.3.2)
119
- method_source (0.9.2)
120
- mimemagic (0.3.3)
106
+ method_source (1.0.0)
107
+ mimemagic (0.3.5)
121
108
  mini_mime (1.0.2)
122
109
  mini_portile2 (2.4.0)
123
- minitest (5.13.0)
124
- multi_json (1.14.1)
110
+ minitest (5.14.2)
111
+ multi_json (1.15.0)
125
112
  multipart-post (2.1.1)
126
113
  net-http-persistent (2.9.4)
127
114
  net-http-pipeline (1.0.1)
128
- nio4r (2.5.2)
129
- nokogiri (1.10.5)
115
+ nio4r (2.5.4)
116
+ nokogiri (1.10.10)
130
117
  mini_portile2 (~> 2.4.0)
118
+ public_suffix (4.0.6)
131
119
  pusher-client (0.6.2)
132
120
  json
133
121
  websocket (~> 1.0)
134
- rack (2.0.7)
122
+ rack (2.2.3)
135
123
  rack-test (1.1.0)
136
124
  rack (>= 1.0, < 3)
137
- rails (6.0.1)
138
- actioncable (= 6.0.1)
139
- actionmailbox (= 6.0.1)
140
- actionmailer (= 6.0.1)
141
- actionpack (= 6.0.1)
142
- actiontext (= 6.0.1)
143
- actionview (= 6.0.1)
144
- activejob (= 6.0.1)
145
- activemodel (= 6.0.1)
146
- activerecord (= 6.0.1)
147
- activestorage (= 6.0.1)
148
- activesupport (= 6.0.1)
125
+ rails (5.2.4.4)
126
+ actioncable (= 5.2.4.4)
127
+ actionmailer (= 5.2.4.4)
128
+ actionpack (= 5.2.4.4)
129
+ actionview (= 5.2.4.4)
130
+ activejob (= 5.2.4.4)
131
+ activemodel (= 5.2.4.4)
132
+ activerecord (= 5.2.4.4)
133
+ activestorage (= 5.2.4.4)
134
+ activesupport (= 5.2.4.4)
149
135
  bundler (>= 1.3.0)
150
- railties (= 6.0.1)
136
+ railties (= 5.2.4.4)
151
137
  sprockets-rails (>= 2.0.0)
152
138
  rails-dom-testing (2.0.3)
153
139
  activesupport (>= 4.2.0)
154
140
  nokogiri (>= 1.6)
155
141
  rails-html-sanitizer (1.3.0)
156
142
  loofah (~> 2.3)
157
- railties (6.0.1)
158
- actionpack (= 6.0.1)
159
- activesupport (= 6.0.1)
143
+ railties (5.2.4.4)
144
+ actionpack (= 5.2.4.4)
145
+ activesupport (= 5.2.4.4)
160
146
  method_source
161
147
  rake (>= 0.8.7)
162
- thor (>= 0.20.3, < 2.0)
148
+ thor (>= 0.19.0, < 2.0)
163
149
  rake (10.1.1)
164
- rdoc (6.2.0)
150
+ rdoc (6.2.1)
165
151
  redgreen (1.2.2)
166
152
  rspec (2.99.0)
167
153
  rspec-core (~> 2.99.0)
@@ -171,36 +157,33 @@ GEM
171
157
  rspec-expectations (2.99.2)
172
158
  diff-lcs (>= 1.1.3, < 2.0)
173
159
  rspec-mocks (2.99.4)
174
- sequel (5.26.0)
175
- sprockets (4.0.0)
160
+ ruby2_keywords (0.0.2)
161
+ sequel (5.38.0)
162
+ sprockets (4.0.2)
176
163
  concurrent-ruby (~> 1.0)
177
164
  rack (> 1, < 3)
178
- sprockets-rails (3.2.1)
165
+ sprockets-rails (3.2.2)
179
166
  actionpack (>= 4.0)
180
167
  activesupport (>= 4.0)
181
168
  sprockets (>= 3.0.0)
182
169
  sqlite3 (1.3.13)
183
- thor (0.20.3)
170
+ thor (1.0.1)
184
171
  thread_safe (0.3.6)
185
- travis (1.8.10)
186
- backports
187
- faraday (~> 0.9)
188
- faraday_middleware (~> 0.9, >= 0.9.1)
172
+ travis (1.10.0)
173
+ faraday (~> 1.0)
174
+ faraday_middleware (~> 1.0)
189
175
  gh (~> 0.13)
190
- highline (~> 1.6)
191
- launchy (~> 2.1)
176
+ highline (~> 2.0)
177
+ json_pure (~> 2.3)
178
+ launchy (~> 2.1, < 2.5.0)
192
179
  pusher-client (~> 0.4)
193
- typhoeus (~> 0.6, >= 0.6.8)
194
- typhoeus (0.8.0)
195
- ethon (>= 0.8.0)
196
- tzinfo (1.2.5)
180
+ tzinfo (1.2.7)
197
181
  thread_safe (~> 0.1)
198
182
  websocket (1.2.8)
199
- websocket-driver (0.7.1)
183
+ websocket-driver (0.7.3)
200
184
  websocket-extensions (>= 0.1.0)
201
- websocket-extensions (0.1.4)
202
- will_paginate (3.2.1)
203
- zeitwerk (2.2.1)
185
+ websocket-extensions (0.1.5)
186
+ will_paginate (3.3.0)
204
187
 
205
188
  PLATFORMS
206
189
  ruby
@@ -224,4 +207,4 @@ DEPENDENCIES
224
207
  will_paginate (>= 2.3.15)
225
208
 
226
209
  BUNDLED WITH
227
- 2.0.2
210
+ 2.1.4
data/README.md CHANGED
@@ -20,6 +20,7 @@
20
20
  <a href="https://discourse.algolia.com" target="_blank">Community Forum</a> •
21
21
  <a href="http://stackoverflow.com/questions/tagged/algolia" target="_blank">Stack Overflow</a> •
22
22
  <a href="https://github.com/algolia/algoliasearch-rails/issues" target="_blank">Report a bug</a> •
23
+ <a href="https://www.algolia.com/doc/framework-integration/rails/troubleshooting/faq/" target="_blank">FAQ</a> •
23
24
  <a href="https://www.algolia.com/support" target="_blank">Support</a>
24
25
  </p>
25
26
 
@@ -82,6 +83,8 @@ You can find the full reference on [Algolia's website](https://www.algolia.com/d
82
83
  1. **[Testing](#testing)**
83
84
  * [Notes](#notes)
84
85
 
86
+ 1. **[Troubleshooting](#troubleshooting)**
87
+ * [Frequently asked questions](#frequently-asked-questions)
85
88
 
86
89
 
87
90
 
@@ -1181,4 +1184,11 @@ end
1181
1184
  ```
1182
1185
 
1183
1186
 
1187
+ ## ❓ Troubleshooting
1188
+
1189
+ Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/api-client/troubleshooting/faq/ruby/) where you will find answers for the most common issues and gotchas with the client.
1190
+
1191
+ ## Use the Dockerfile
1192
+
1193
+ If you want to contribute to this project without installing all its dependencies, you can use our Docker image. Please check our [dedicated guide](DOCKER_README.MD) to learn more.
1184
1194
 
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.description = "AlgoliaSearch integration to your favorite ORM"
15
15
  s.email = "contact@algolia.com"
16
16
  s.extra_rdoc_files = [
17
- "ChangeLog",
17
+ "CHANGELOG.MD",
18
18
  "LICENSE",
19
19
  "README.md"
20
20
  ]
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  ".document",
23
23
  ".rspec",
24
24
  ".travis.yml",
25
- "ChangeLog",
25
+ "CHANGELOG.MD",
26
26
  "Gemfile",
27
27
  "Gemfile.lock",
28
28
  "LICENSE",
@@ -223,10 +223,10 @@ module AlgoliaSearch
223
223
  end
224
224
  end
225
225
 
226
- def geoloc(lat_attr, lng_attr)
226
+ def geoloc(lat_attr = nil, lng_attr = nil, &block)
227
227
  raise ArgumentError.new('Cannot specify additional attributes on a replica index') if @options[:slave] || @options[:replica]
228
228
  add_attribute :_geoloc do |o|
229
- { :lat => o.send(lat_attr).to_f, :lng => o.send(lng_attr).to_f }
229
+ block_given? ? o.instance_eval(&block) : { :lat => o.send(lat_attr).to_f, :lng => o.send(lng_attr).to_f }
230
230
  end
231
231
  end
232
232
 
@@ -2,7 +2,11 @@ module AlgoliaSearch
2
2
  module Utilities
3
3
  class << self
4
4
  def get_model_classes
5
- Rails.application.eager_load! if Rails.application # Ensure all models are loaded (not necessary in production when cache_classes is true).
5
+ if defined?(Rails.autoloaders) && Rails.autoloaders.zeitwerk_enabled?
6
+ Zeitwerk::Loader.eager_load_all
7
+ elsif Rails.application
8
+ Rails.application.eager_load!
9
+ end
6
10
  AlgoliaSearch.instance_variable_get :@included_in
7
11
  end
8
12
 
@@ -1,3 +1,3 @@
1
1
  module AlgoliaSearch
2
- VERSION = '1.24.1'
2
+ VERSION = '1.25.0'
3
3
  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: 1.24.1
4
+ version: 1.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-15 00:00:00.000000000 Z
11
+ date: 2020-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -119,14 +119,14 @@ email: contact@algolia.com
119
119
  executables: []
120
120
  extensions: []
121
121
  extra_rdoc_files:
122
- - ChangeLog
122
+ - CHANGELOG.MD
123
123
  - LICENSE
124
124
  - README.md
125
125
  files:
126
126
  - ".document"
127
127
  - ".rspec"
128
128
  - ".travis.yml"
129
- - ChangeLog
129
+ - CHANGELOG.MD
130
130
  - Gemfile
131
131
  - Gemfile.lock
132
132
  - LICENSE
@@ -173,7 +173,7 @@ homepage: http://github.com/algolia/algoliasearch-rails
173
173
  licenses:
174
174
  - MIT
175
175
  metadata: {}
176
- post_install_message:
176
+ post_install_message:
177
177
  rdoc_options: []
178
178
  require_paths:
179
179
  - lib
@@ -188,8 +188,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  - !ruby/object:Gem::Version
189
189
  version: '0'
190
190
  requirements: []
191
- rubygems_version: 3.0.4
192
- signing_key:
191
+ rubygems_version: 3.0.3
192
+ signing_key:
193
193
  specification_version: 4
194
194
  summary: AlgoliaSearch integration to your favorite ORM
195
195
  test_files: []