algoliasearch-rails 1.19.1 → 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.19.1
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-03-13 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,19 +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
- - - "~>"
31
+ - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.12.4
33
+ version: 3.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - "<"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.12.4
40
+ version: 3.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: will_paginate
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: travis
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: rake
85
71
  requirement: !ruby/object:Gem::Requirement
@@ -113,20 +99,18 @@ email: contact@algolia.com
113
99
  executables: []
114
100
  extensions: []
115
101
  extra_rdoc_files:
116
- - ChangeLog
102
+ - CHANGELOG.MD
117
103
  - LICENSE
118
104
  - README.md
119
105
  files:
120
106
  - ".document"
121
107
  - ".rspec"
122
- - ".travis.yml"
123
- - ChangeLog
108
+ - CHANGELOG.MD
124
109
  - Gemfile
125
110
  - Gemfile.lock
126
111
  - LICENSE
127
112
  - README.md
128
113
  - Rakefile
129
- - VERSION
130
114
  - algoliasearch-rails.gemspec
131
115
  - lib/algoliasearch-rails.rb
132
116
  - lib/algoliasearch/algolia_job.rb
@@ -137,6 +121,7 @@ files:
137
121
  - lib/algoliasearch/railtie.rb
138
122
  - lib/algoliasearch/tasks/algoliasearch.rake
139
123
  - lib/algoliasearch/utilities.rb
124
+ - lib/algoliasearch/version.rb
140
125
  - spec/spec_helper.rb
141
126
  - spec/utilities_spec.rb
142
127
  - vendor/assets/javascripts/algolia/algoliasearch.angular.js
@@ -167,7 +152,7 @@ homepage: http://github.com/algolia/algoliasearch-rails
167
152
  licenses:
168
153
  - MIT
169
154
  metadata: {}
170
- post_install_message:
155
+ post_install_message:
171
156
  rdoc_options: []
172
157
  require_paths:
173
158
  - lib
@@ -182,9 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
182
167
  - !ruby/object:Gem::Version
183
168
  version: '0'
184
169
  requirements: []
185
- rubyforge_project:
186
- rubygems_version: 2.6.8
187
- signing_key:
170
+ rubygems_version: 3.0.3.1
171
+ signing_key:
188
172
  specification_version: 4
189
173
  summary: AlgoliaSearch integration to your favorite ORM
190
174
  test_files: []
data/.travis.yml DELETED
@@ -1,51 +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.0
19
- - rvm: 2.3.1
20
- env: RAILS_VERSION=3.2.0
21
- - rvm: 2.3.1
22
- env: RAILS_VERSION=4.2
23
- - rvm: 2.3.1
24
- env: RAILS_VERSION=5.0
25
- # - rvm: jruby-9.1.2.0
26
- # env: RAILS_VERSION=3.2.0
27
- # - rvm: jruby-9.1.2.0
28
- # env: RAILS_VERSION=4.2
29
- # - rvm: jruby-9.1.2.0
30
- # env: RAILS_VERSION=5.0
31
- # - rvm: rbx-2
32
- # env: RAILS_VERSION=3.2.0
33
- # - rvm: rbx-2
34
- # env: RAILS_VERSION=4.2
35
- # - rvm: rbx-3.20
36
- # env: RAILS_VERSION=3.2.0
37
- # - rvm: rbx-3.20
38
- # env: RAILS_VERSION=4.2
39
- # - rvm: rbx-3.20
40
- # env: RAILS_VERSION=5.0
41
- allow_failures:
42
- - rvm: rbx-2
43
- before_install:
44
- - gem install bundler
45
- - bundle --version
46
- install: rm -f Gemfile.lock && bundle install
47
- cache: bundler
48
- env:
49
- global:
50
- - secure: kD+PX8ZNg+AAzyr6WYs1vp9teAkzMfEoYkIMI0hrRN0ml9ccJVsJR1pIGpaIwyCa5PmFtCZ1Xi2vFb4XzTTeaZoHHS/ll9LwuQH6mwvdgj3n6TmNRdq3b/oGRHBX4Z0HMobqaftuzY/V8iTpVk92jwIY8NPj00k055b2jrKqhdw=
51
- - secure: Eai99h4K7s9/Sh3CHClWs3IQNaEUdVagpmA/A8m0rysGBAYJdMKbUOp9DZPAmCnT+06l0aFv87+CRYtgyX05pE5f21nqBOU46eKS38cLif3aPTwFmwokf28WLDgmZKa/zJp767SiQ/dp0hz+LJrkJvkDRnA1un36f7wiyY9xnYs=
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.19.1