algoliasearch-rails 1.20.4 → 2.2.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.
data/spec/spec_helper.rb CHANGED
@@ -26,11 +26,27 @@ RSpec.configure do |c|
26
26
  example.run
27
27
  }
28
28
  end
29
+
30
+ # Remove all indexes setup in this run in local or CI
31
+ c.after(:suite) do
32
+ safe_index_list.each do |i|
33
+ index = AlgoliaSearch.client.init_index(i['name'])
34
+ index.delete!
35
+ end
36
+ end
29
37
  end
30
38
 
31
- # avoid concurrent access to the same index
39
+ # A unique prefix for your test run in local or CI
40
+ SAFE_INDEX_PREFIX = "rails_#{SecureRandom.hex(8)}".freeze
41
+
42
+ # avoid concurrent access to the same index in local or CI
32
43
  def safe_index_name(name)
33
- return name if ENV['TRAVIS'].to_s != "true"
34
- id = ENV['TRAVIS_JOB_NUMBER'].split('.').last
35
- "#{name}_travis-#{id}"
44
+ "#{SAFE_INDEX_PREFIX}_#{name}"
45
+ end
46
+
47
+ # get a list of safe indexes in local or CI
48
+ def safe_index_list
49
+ list = AlgoliaSearch.client.list_indexes['items']
50
+ list = list.select { |index| index["name"].include?(SAFE_INDEX_PREFIX) }
51
+ list.sort_by { |index| index["primary"] || "" }
36
52
  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.20.4
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-04 00:00:00.000000000 Z
11
+ date: 2023-06-14 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: algoliasearch
28
+ name: algolia
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.17.0
34
31
  - - "<"
35
32
  - !ruby/object:Gem::Version
36
- version: 2.0.0
33
+ version: 3.0.0
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: 1.17.0
44
38
  - - "<"
45
39
  - !ruby/object:Gem::Version
46
- version: 2.0.0
40
+ version: 3.0.0
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: will_paginate
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,20 +66,6 @@ dependencies:
72
66
  - - ">="
73
67
  - !ruby/object:Gem::Version
74
68
  version: '0'
75
- - !ruby/object:Gem::Dependency
76
- name: travis
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
81
- version: '0'
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - ">="
87
- - !ruby/object:Gem::Version
88
- version: '0'
89
69
  - !ruby/object:Gem::Dependency
90
70
  name: rake
91
71
  requirement: !ruby/object:Gem::Requirement
@@ -119,14 +99,13 @@ email: contact@algolia.com
119
99
  executables: []
120
100
  extensions: []
121
101
  extra_rdoc_files:
122
- - ChangeLog
102
+ - CHANGELOG.MD
123
103
  - LICENSE
124
104
  - README.md
125
105
  files:
126
106
  - ".document"
127
107
  - ".rspec"
128
- - ".travis.yml"
129
- - ChangeLog
108
+ - CHANGELOG.MD
130
109
  - Gemfile
131
110
  - Gemfile.lock
132
111
  - LICENSE
@@ -173,7 +152,7 @@ homepage: http://github.com/algolia/algoliasearch-rails
173
152
  licenses:
174
153
  - MIT
175
154
  metadata: {}
176
- post_install_message:
155
+ post_install_message:
177
156
  rdoc_options: []
178
157
  require_paths:
179
158
  - lib
@@ -188,9 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
167
  - !ruby/object:Gem::Version
189
168
  version: '0'
190
169
  requirements: []
191
- rubyforge_project:
192
- rubygems_version: 2.6.13
193
- signing_key:
170
+ rubygems_version: 3.0.3.1
171
+ signing_key:
194
172
  specification_version: 4
195
173
  summary: AlgoliaSearch integration to your favorite ORM
196
174
  test_files: []
data/.travis.yml DELETED
@@ -1,55 +0,0 @@
1
- language: ruby
2
- branches:
3
- only:
4
- - master
5
- matrix:
6
- include:
7
- - rvm: 1.8.7
8
- env: RAILS_VERSION=3.2.0
9
- - rvm: 1.9.3
10
- env: RAILS_VERSION=3.2.0
11
- - rvm: 1.9.3
12
- env: RAILS_VERSION=4.2
13
- - rvm: 2.2.5
14
- env: RAILS_VERSION=3.2.0
15
- - rvm: 2.2.5
16
- env: RAILS_VERSION=4.2
17
- - rvm: 2.2.5
18
- env: RAILS_VERSION=5.1
19
- - rvm: 2.3.4
20
- env: RAILS_VERSION=3.2.0
21
- - rvm: 2.3.4
22
- env: RAILS_VERSION=4.2
23
- - rvm: 2.3.4
24
- env: RAILS_VERSION=5.1
25
- - rvm: 2.4.1
26
- env: RAILS_VERSION=4.2
27
- - rvm: 2.4.1
28
- env: RAILS_VERSION=5.1
29
- # - rvm: jruby-9.1.2.0
30
- # env: RAILS_VERSION=3.2.0
31
- # - rvm: jruby-9.1.2.0
32
- # env: RAILS_VERSION=4.2
33
- # - rvm: jruby-9.1.2.0
34
- # env: RAILS_VERSION=5.0
35
- # - rvm: rbx-2
36
- # env: RAILS_VERSION=3.2.0
37
- # - rvm: rbx-2
38
- # env: RAILS_VERSION=4.2
39
- # - rvm: rbx-3.20
40
- # env: RAILS_VERSION=3.2.0
41
- # - rvm: rbx-3.20
42
- # env: RAILS_VERSION=4.2
43
- # - rvm: rbx-3.20
44
- # env: RAILS_VERSION=5.0
45
- allow_failures:
46
- - rvm: rbx-2
47
- before_install:
48
- - gem install bundler
49
- - bundle --version
50
- install: rm -f Gemfile.lock && bundle install
51
- cache: bundler
52
- env:
53
- global:
54
- - secure: "o/Hi/6KnBugN5P/cpVtpwyKrK5fVzAc0efw+qZ9ZqwqZN0GmipZrHmRNuLVUxVf+CIcqfLpIT0U172XGOZ5zJ1gs3qZZrDsJ1ptXnPyvvCrw+VX5yGhMh67JnlO0WLWvci0WdltJTmrhCoLSSw39nCPswC7I6/hai4KyiOXoMk4="
55
- - secure: "Jv9jOYRwJq5i17Int/p75330yxCJXKLYlstHuBjwkKa6anJHFSXQaAxWj8sZHCY4IAVDsBfdi0j6S3dtVu2LaVLA3hfPp36YRVolSZu9zLbGqyPKBWM7E3i7GkS3Jub0nMV3Yo3cMeiFzQ4BmpSQOYo0biCkL8bh4/5NRZ7Q6VI="