algoliasearch-rails 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +12 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +50 -3
- data/README.md +3 -0
- data/Rakefile +5 -22
- data/VERSION +1 -1
- data/algoliasearch-rails.gemspec +6 -2
- data/lib/algoliasearch-rails.rb +3 -5
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afae0699f5d2896166af630b192195d06a257e25
|
4
|
+
data.tar.gz: 0f4424fe70d89538c30fb951b816f68e0263826f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 219fa0a2ed1f52b76de052c60f827651c380b1259d13d863df5476915033afef1d26eee49655d09b78a53bdbcd8566151d764a870c04e7bab23b502e2ca148b5
|
7
|
+
data.tar.gz: 59f48f606327aaf035353456efc05bed35a1be5eed4f7bd035abf8b8793608e640256513da06548fb640c135a38a96e11453f7f6c0a5e6667cf794128ddfb739
|
data/.travis.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
language: ruby
|
2
|
+
branches:
|
3
|
+
only:
|
4
|
+
- master
|
5
|
+
rvm:
|
6
|
+
- 2.0.0
|
7
|
+
- 1.9.3
|
8
|
+
- rbx-19mode
|
9
|
+
env:
|
10
|
+
global:
|
11
|
+
- secure: wRDLGbg+GS7Eo6KhjyAA6YNm6rFVo8j53b0oEZLBkJ2VzvLsKMnpEfopzc0W2wttgVwgkX8C/9adbd/BPsEYbpO+uJFt5DX3A2HVVXCZ2jP0TgLj2m4dOA4ohroYDcdeB0fuZM7a7hvFNswd9vSRLmes6vLQ0GcFTSz1rWQLf6U=
|
12
|
+
- secure: e7We+H6/XlWrPVSlLNcXdQxSC520SP2BteSddBjD9YNx9DosMDLTi85Rw3KJGRQowoftv00TwAe+iCRTyPElrW0Q/y5ozAU9UyipAtwhZhM06IPx1fhkU/Q3FIX/iwgruS253aiGlIUg7YcdGwfYuURk2iu7Xp3OdhS/evxbj/E=
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
ZenTest (4.9.
|
4
|
+
ZenTest (4.9.4)
|
5
5
|
actionpack (4.0.0)
|
6
6
|
activesupport (= 4.0.0)
|
7
7
|
builder (~> 3.1.0)
|
@@ -24,7 +24,7 @@ GEM
|
|
24
24
|
thread_safe (~> 0.1)
|
25
25
|
tzinfo (~> 0.3.37)
|
26
26
|
addressable (2.3.5)
|
27
|
-
algoliasearch (1.1.
|
27
|
+
algoliasearch (1.1.2)
|
28
28
|
curb
|
29
29
|
arel (4.0.0)
|
30
30
|
atomic (1.1.14)
|
@@ -33,13 +33,27 @@ GEM
|
|
33
33
|
autotest-fsevent (0.2.8)
|
34
34
|
sys-uname
|
35
35
|
autotest-growl (0.2.16)
|
36
|
+
backports (3.3.4)
|
36
37
|
builder (3.1.4)
|
38
|
+
coderay (1.0.9)
|
37
39
|
curb (0.8.4)
|
38
40
|
diff-lcs (1.2.4)
|
39
41
|
erubis (2.7.0)
|
42
|
+
ethon (0.6.1)
|
43
|
+
ffi (>= 1.3.0)
|
44
|
+
mime-types (~> 1.18)
|
40
45
|
faraday (0.8.8)
|
41
46
|
multipart-post (~> 1.2.0)
|
47
|
+
faraday_middleware (0.9.0)
|
48
|
+
faraday (>= 0.7.4, < 0.9)
|
42
49
|
ffi (1.9.0)
|
50
|
+
gh (0.13.0)
|
51
|
+
addressable
|
52
|
+
backports
|
53
|
+
faraday (~> 0.8)
|
54
|
+
multi_json (~> 1.0)
|
55
|
+
net-http-persistent (>= 2.7)
|
56
|
+
net-http-pipeline
|
43
57
|
git (1.2.6)
|
44
58
|
github_api (0.10.1)
|
45
59
|
addressable
|
@@ -67,10 +81,17 @@ GEM
|
|
67
81
|
kaminari (0.14.1)
|
68
82
|
actionpack (>= 3.0.0)
|
69
83
|
activesupport (>= 3.0.0)
|
84
|
+
launchy (2.3.0)
|
85
|
+
addressable (~> 2.3)
|
86
|
+
method_source (0.8.2)
|
87
|
+
mime-types (1.25)
|
70
88
|
minitest (4.7.5)
|
71
89
|
multi_json (1.8.0)
|
72
90
|
multi_xml (0.5.5)
|
73
91
|
multipart-post (1.2.0)
|
92
|
+
net-http-persistent (2.9)
|
93
|
+
net-http-pipeline (1.0.1)
|
94
|
+
netrc (0.7.7)
|
74
95
|
nokogiri (1.5.10)
|
75
96
|
oauth2 (0.9.2)
|
76
97
|
faraday (~> 0.8)
|
@@ -79,6 +100,13 @@ GEM
|
|
79
100
|
multi_json (~> 1.0)
|
80
101
|
multi_xml (~> 0.5)
|
81
102
|
rack (~> 1.2)
|
103
|
+
pry (0.9.12.2)
|
104
|
+
coderay (~> 1.0.5)
|
105
|
+
method_source (~> 0.8)
|
106
|
+
slop (~> 3.4)
|
107
|
+
pusher-client (0.3.1)
|
108
|
+
ruby-hmac (~> 0.4.0)
|
109
|
+
websocket (~> 1.0.0)
|
82
110
|
rack (1.5.2)
|
83
111
|
rack-test (0.6.2)
|
84
112
|
rack (>= 1.0)
|
@@ -91,15 +119,33 @@ GEM
|
|
91
119
|
rspec-expectations (~> 2.14.0)
|
92
120
|
rspec-mocks (~> 2.14.0)
|
93
121
|
rspec-core (2.14.5)
|
94
|
-
rspec-expectations (2.14.
|
122
|
+
rspec-expectations (2.14.3)
|
95
123
|
diff-lcs (>= 1.1.3, < 2.0)
|
96
124
|
rspec-mocks (2.14.3)
|
125
|
+
ruby-hmac (0.4.0)
|
126
|
+
slop (3.4.6)
|
97
127
|
sqlite3 (1.3.8)
|
98
128
|
sys-uname (0.9.2)
|
99
129
|
ffi (>= 1.0.0)
|
130
|
+
terminal-notifier (1.5.1)
|
100
131
|
thread_safe (0.1.3)
|
101
132
|
atomic
|
133
|
+
travis (1.5.5)
|
134
|
+
backports
|
135
|
+
faraday (~> 0.8.7)
|
136
|
+
faraday_middleware (~> 0.9)
|
137
|
+
gh (~> 0.13)
|
138
|
+
highline (~> 1.6)
|
139
|
+
launchy (~> 2.1)
|
140
|
+
netrc (~> 0.7)
|
141
|
+
pry (~> 0.9)
|
142
|
+
pusher-client (~> 0.3, >= 0.3.1)
|
143
|
+
terminal-notifier (>= 1.4.2)
|
144
|
+
typhoeus (~> 0.6)
|
145
|
+
typhoeus (0.6.5)
|
146
|
+
ethon (~> 0.6.1)
|
102
147
|
tzinfo (0.3.37)
|
148
|
+
websocket (1.0.7)
|
103
149
|
will_paginate (3.0.5)
|
104
150
|
|
105
151
|
PLATFORMS
|
@@ -117,4 +163,5 @@ DEPENDENCIES
|
|
117
163
|
redgreen
|
118
164
|
rspec (>= 2.5.0)
|
119
165
|
sqlite3
|
166
|
+
travis
|
120
167
|
will_paginate (>= 2.3.15)
|
data/README.md
CHANGED
@@ -3,6 +3,9 @@ Algolia Search for Rails
|
|
3
3
|
|
4
4
|
This gem let you easily integrate the Algolia Search API to your favorite ORM. It's based on the [algoliasearch-client-ruby](https://github.com/algolia/algoliasearch-client-ruby) gem.
|
5
5
|
|
6
|
+
[![Build Status](https://travis-ci.org/algolia/algoliasearch-rails.png?branch=master)](https://travis-ci.org/algolia/algoliasearch-rails) [![Gem Version](https://badge.fury.io/rb/algoliasearch-rails.png)](http://badge.fury.io/rb/algoliasearch-rails) [![Code Climate](https://codeclimate.com/github/algolia/algoliasearch-rails.png)](https://codeclimate.com/github/algolia/algoliasearch-rails)
|
7
|
+
|
8
|
+
|
6
9
|
Table of Content
|
7
10
|
-------------
|
8
11
|
**Get started**
|
data/Rakefile
CHANGED
@@ -19,28 +19,6 @@ rescue LoadError
|
|
19
19
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
20
20
|
end
|
21
21
|
|
22
|
-
require "rspec/core/rake_task"
|
23
|
-
# RSpec 2.0
|
24
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
25
|
-
spec.pattern = 'spec/{algoliasearch,utilities}_spec.rb'
|
26
|
-
spec.rspec_opts = ['--backtrace']
|
27
|
-
end
|
28
|
-
task :default => :spec
|
29
|
-
|
30
|
-
desc "Generate code coverage"
|
31
|
-
RSpec::Core::RakeTask.new(:coverage) do |t|
|
32
|
-
t.pattern = "./spec/**/*_spec.rb" # don't need this, it's default.
|
33
|
-
t.rcov = true
|
34
|
-
t.rcov_opts = ['--exclude', 'spec']
|
35
|
-
end
|
36
|
-
|
37
|
-
desc "Run Integration Specs"
|
38
|
-
RSpec::Core::RakeTask.new(:integration) do |t|
|
39
|
-
t.pattern = "spec/integration_spec.rb" # don't need this, it's default.
|
40
|
-
t.rcov = true
|
41
|
-
t.rcov_opts = ['--exclude', 'spec']
|
42
|
-
end
|
43
|
-
|
44
22
|
require 'rdoc/task'
|
45
23
|
Rake::RDocTask.new do |rdoc|
|
46
24
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
@@ -50,3 +28,8 @@ Rake::RDocTask.new do |rdoc|
|
|
50
28
|
rdoc.rdoc_files.include('README*')
|
51
29
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
52
30
|
end
|
31
|
+
|
32
|
+
require "rspec/core/rake_task"
|
33
|
+
RSpec::Core::RakeTask.new(:spec)
|
34
|
+
|
35
|
+
task :default => :spec
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.8
|
data/algoliasearch-rails.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "algoliasearch-rails"
|
8
|
-
s.version = "1.1.
|
8
|
+
s.version = "1.1.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Algolia"]
|
12
|
-
s.date = "2013-10-
|
12
|
+
s.date = "2013-10-04"
|
13
13
|
s.description = "AlgoliaSearch integration to your favorite ORM"
|
14
14
|
s.email = "contact@algolia.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
21
|
".rspec",
|
22
|
+
".travis.yml",
|
22
23
|
"Gemfile",
|
23
24
|
"Gemfile.lock",
|
24
25
|
"LICENSE",
|
@@ -52,12 +53,14 @@ Gem::Specification.new do |s|
|
|
52
53
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
53
54
|
s.add_development_dependency(%q<will_paginate>, [">= 2.3.15"])
|
54
55
|
s.add_development_dependency(%q<kaminari>, [">= 0"])
|
56
|
+
s.add_development_dependency(%q<travis>, [">= 0"])
|
55
57
|
else
|
56
58
|
s.add_dependency(%q<json>, [">= 1.5.1"])
|
57
59
|
s.add_dependency(%q<algoliasearch>, [">= 1.1.1"])
|
58
60
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
59
61
|
s.add_dependency(%q<will_paginate>, [">= 2.3.15"])
|
60
62
|
s.add_dependency(%q<kaminari>, [">= 0"])
|
63
|
+
s.add_dependency(%q<travis>, [">= 0"])
|
61
64
|
end
|
62
65
|
else
|
63
66
|
s.add_dependency(%q<json>, [">= 1.5.1"])
|
@@ -65,6 +68,7 @@ Gem::Specification.new do |s|
|
|
65
68
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
66
69
|
s.add_dependency(%q<will_paginate>, [">= 2.3.15"])
|
67
70
|
s.add_dependency(%q<kaminari>, [">= 0"])
|
71
|
+
s.add_dependency(%q<travis>, [">= 0"])
|
68
72
|
end
|
69
73
|
end
|
70
74
|
|
data/lib/algoliasearch-rails.rb
CHANGED
@@ -104,14 +104,12 @@ module AlgoliaSearch
|
|
104
104
|
end
|
105
105
|
|
106
106
|
def reindex!(batch_size = 1000, synchronous = true)
|
107
|
+
last_task = nil
|
107
108
|
find_in_batches(batch_size: batch_size) do |group|
|
108
109
|
objects = group.map { |o| attributes(o).merge 'objectID' => o.id.to_s }
|
109
|
-
|
110
|
-
@index.save_objects!(objects)
|
111
|
-
else
|
112
|
-
@index.save_objects(objects)
|
113
|
-
end
|
110
|
+
last_task = @index.save_objects(objects)
|
114
111
|
end
|
112
|
+
@index.wait_task(last_task["taskID"]) if last_task and synchronous == true
|
115
113
|
end
|
116
114
|
|
117
115
|
def index!(object, synchronous = true)
|
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.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: travis
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description: AlgoliaSearch integration to your favorite ORM
|
84
98
|
email: contact@algolia.com
|
85
99
|
executables: []
|
@@ -90,6 +104,7 @@ extra_rdoc_files:
|
|
90
104
|
files:
|
91
105
|
- .document
|
92
106
|
- .rspec
|
107
|
+
- .travis.yml
|
93
108
|
- Gemfile
|
94
109
|
- Gemfile.lock
|
95
110
|
- LICENSE
|