algoliasearch-rails 1.25.0 → 3.0.1
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 +4 -4
- data/CHANGELOG.MD +79 -1
- data/Gemfile +12 -38
- data/Gemfile.lock +157 -149
- data/README.md +13 -41
- data/algoliasearch-rails.gemspec +5 -5
- data/lib/algoliasearch/algolia_job.rb +1 -1
- data/lib/algoliasearch/configuration.rb +33 -4
- data/lib/algoliasearch/pagination/kaminari.rb +1 -1
- data/lib/algoliasearch/pagination/pagy.rb +29 -0
- data/lib/algoliasearch/pagination.rb +1 -0
- data/lib/algoliasearch/utilities.rb +1 -1
- data/lib/algoliasearch/version.rb +1 -1
- data/lib/algoliasearch-rails.rb +185 -207
- data/spec/spec_helper.rb +12 -5
- metadata +8 -14
- data/.travis.yml +0 -62
data/spec/spec_helper.rb
CHANGED
@@ -15,6 +15,8 @@ raise "missing ALGOLIA_APPLICATION_ID or ALGOLIA_API_KEY environment variables"
|
|
15
15
|
|
16
16
|
Thread.current[:algolia_hosts] = nil
|
17
17
|
|
18
|
+
GlobalID.app = 'algoiasearch-rails'
|
19
|
+
|
18
20
|
RSpec.configure do |c|
|
19
21
|
c.mock_with :rspec
|
20
22
|
c.filter_run :focus => true
|
@@ -29,8 +31,13 @@ RSpec.configure do |c|
|
|
29
31
|
|
30
32
|
# Remove all indexes setup in this run in local or CI
|
31
33
|
c.after(:suite) do
|
32
|
-
safe_index_list.each do |
|
33
|
-
|
34
|
+
safe_index_list.each do |i|
|
35
|
+
begin
|
36
|
+
res = AlgoliaSearch.client.delete_index(i.name)
|
37
|
+
AlgoliaSearch.client.wait_for_task(i.name, res.task_id)
|
38
|
+
rescue
|
39
|
+
# fail gracefully
|
40
|
+
end
|
34
41
|
end
|
35
42
|
end
|
36
43
|
end
|
@@ -45,7 +52,7 @@ end
|
|
45
52
|
|
46
53
|
# get a list of safe indexes in local or CI
|
47
54
|
def safe_index_list
|
48
|
-
list =
|
49
|
-
list = list.select { |index| index
|
50
|
-
list.sort_by { |index| index
|
55
|
+
list = AlgoliaSearch.client.list_indices.items
|
56
|
+
list = list.select { |index| index.name.include?(SAFE_INDEX_PREFIX) }
|
57
|
+
list.sort_by { |index| index.primary || "" }
|
51
58
|
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:
|
4
|
+
version: 3.0.1
|
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: 2024-12-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -25,25 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.5.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: algolia
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 2.0.0
|
33
|
+
version: 3.5.2
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
38
|
- - ">="
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version:
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 2.0.0
|
40
|
+
version: 3.5.2
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: will_paginate
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,7 +67,7 @@ dependencies:
|
|
73
67
|
- !ruby/object:Gem::Version
|
74
68
|
version: '0'
|
75
69
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
70
|
+
name: pagy
|
77
71
|
requirement: !ruby/object:Gem::Requirement
|
78
72
|
requirements:
|
79
73
|
- - ">="
|
@@ -125,7 +119,6 @@ extra_rdoc_files:
|
|
125
119
|
files:
|
126
120
|
- ".document"
|
127
121
|
- ".rspec"
|
128
|
-
- ".travis.yml"
|
129
122
|
- CHANGELOG.MD
|
130
123
|
- Gemfile
|
131
124
|
- Gemfile.lock
|
@@ -138,6 +131,7 @@ files:
|
|
138
131
|
- lib/algoliasearch/configuration.rb
|
139
132
|
- lib/algoliasearch/pagination.rb
|
140
133
|
- lib/algoliasearch/pagination/kaminari.rb
|
134
|
+
- lib/algoliasearch/pagination/pagy.rb
|
141
135
|
- lib/algoliasearch/pagination/will_paginate.rb
|
142
136
|
- lib/algoliasearch/railtie.rb
|
143
137
|
- lib/algoliasearch/tasks/algoliasearch.rake
|
@@ -188,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
182
|
- !ruby/object:Gem::Version
|
189
183
|
version: '0'
|
190
184
|
requirements: []
|
191
|
-
rubygems_version: 3.
|
185
|
+
rubygems_version: 3.1.6
|
192
186
|
signing_key:
|
193
187
|
specification_version: 4
|
194
188
|
summary: AlgoliaSearch integration to your favorite ORM
|
data/.travis.yml
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
branches:
|
4
|
-
only:
|
5
|
-
- master
|
6
|
-
|
7
|
-
matrix:
|
8
|
-
include:
|
9
|
-
- rvm: 1.8.7
|
10
|
-
env: RAILS_VERSION=3.2.0 SEQUEL_VERSION=4.0
|
11
|
-
dist: trusty
|
12
|
-
- rvm: 1.9.3
|
13
|
-
env: RAILS_VERSION=3.2.0
|
14
|
-
- rvm: 1.9.3
|
15
|
-
env: RAILS_VERSION=4.2
|
16
|
-
- rvm: 2.2.9
|
17
|
-
env: RAILS_VERSION=3.2.0
|
18
|
-
- rvm: 2.2.9
|
19
|
-
env: RAILS_VERSION=4.2
|
20
|
-
- rvm: 2.2.9
|
21
|
-
env: RAILS_VERSION=5.1
|
22
|
-
- rvm: 2.3.6
|
23
|
-
env: RAILS_VERSION=3.2.0
|
24
|
-
- rvm: 2.3.6
|
25
|
-
env: RAILS_VERSION=4.2
|
26
|
-
- rvm: 2.3.6
|
27
|
-
env: RAILS_VERSION=5.1
|
28
|
-
- rvm: 2.4.3
|
29
|
-
env: RAILS_VERSION=4.2
|
30
|
-
- rvm: 2.4.3
|
31
|
-
env: RAILS_VERSION=5.1 SEQUEL_VERSION=4.0
|
32
|
-
- rvm: 2.4.3
|
33
|
-
env: RAILS_VERSION=5.1 SEQUEL_VERSION=5.0
|
34
|
-
- rvm: 2.5.3
|
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
|
38
|
-
- rvm: 2.6.0
|
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
|
42
|
-
- rvm: 2.7.0
|
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
|
46
|
-
|
47
|
-
before_install:
|
48
|
-
- wget http://api-key-dealer.herokuapp.com/clients/algolia-keys && chmod +x algolia-keys
|
49
|
-
- which bundle || true
|
50
|
-
- find /home/travis/.rvm -wholename "*/bundler-*.gemspec" -print -delete || true
|
51
|
-
- bundle --version || true
|
52
|
-
- gem uninstall bundler || true
|
53
|
-
- bundle --version || true
|
54
|
-
- gem install bundler -v 1.17.3
|
55
|
-
- bundle --version
|
56
|
-
|
57
|
-
install: rm -f Gemfile.lock && bundle install --without development
|
58
|
-
|
59
|
-
cache: bundler
|
60
|
-
|
61
|
-
script:
|
62
|
-
- eval $(./algolia-keys export) && bundle exec rake
|