algoliasearch-rails 1.9.5 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +5 -0
- data/README.md +66 -0
- data/VERSION +1 -1
- data/algoliasearch-rails.gemspec +2 -2
- data/lib/algoliasearch-rails.rb +156 -81
- metadata +24 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bc9aa518564e9c0160f13ef67514a945f35da68
|
4
|
+
data.tar.gz: 49d26543e6d5adc2fccbc8bdcef24cc11f2c17f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35f38a0dab2988e3aa315c1b5077ee4757807fdf8869469e29e7b278a60c74cd949449f5749841fa9d90d9f0cd5934f127370c3ec5ccf5264a343a184afb261b
|
7
|
+
data.tar.gz: 62e110ee3248badf1f02bbe1b98e23d07f5c04f95f92310f10bdca53e35e5c7bb76eeb415a240bd98f53db475e4be7b926af08730b1da2f3e47df84c168a7de1
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -18,6 +18,8 @@ Table of Content
|
|
18
18
|
1. [Options](#options)
|
19
19
|
1. [Configuration example](#configuration-example)
|
20
20
|
1. [Indexing](#indexing)
|
21
|
+
1. [Master/Slave](#masterslave)
|
22
|
+
1. [Target multiple indexes](#target-multiple-indexes)
|
21
23
|
1. [Tags](#tags)
|
22
24
|
1. [Search](#search)
|
23
25
|
1. [Faceting](#faceting)
|
@@ -341,6 +343,70 @@ To clear an index, use the <code>clear_index!</code> class method:
|
|
341
343
|
Contact.clear_index!
|
342
344
|
```
|
343
345
|
|
346
|
+
Master/slave
|
347
|
+
---------
|
348
|
+
|
349
|
+
You can define slave indexes using the <code>add_slave</code> method:
|
350
|
+
|
351
|
+
```ruby
|
352
|
+
class Book < ActiveRecord::Base
|
353
|
+
attr_protected
|
354
|
+
|
355
|
+
include AlgoliaSearch
|
356
|
+
|
357
|
+
algoliasearch per_environment: true do
|
358
|
+
attributesToIndex [:name, :author, :editor]
|
359
|
+
|
360
|
+
# define a slave index to search by `author` only
|
361
|
+
add_slave 'Book_by_author', per_environment: true do
|
362
|
+
attributesToIndex [:author]
|
363
|
+
end
|
364
|
+
|
365
|
+
# define a slave index to search by `editor` only
|
366
|
+
add_slave 'Book_by_editor', per_environment: true do
|
367
|
+
attributesToIndex [:editor]
|
368
|
+
end
|
369
|
+
end
|
370
|
+
|
371
|
+
end
|
372
|
+
```
|
373
|
+
|
374
|
+
Target multiple indexes
|
375
|
+
---------
|
376
|
+
|
377
|
+
You can index a record in several indexes using the <code>add_index</code> method:
|
378
|
+
|
379
|
+
```ruby
|
380
|
+
class Book < ActiveRecord::Base
|
381
|
+
attr_protected
|
382
|
+
|
383
|
+
include AlgoliaSearch
|
384
|
+
|
385
|
+
PUBLIC_INDEX_NAME = "Book_#{Rails.env}"
|
386
|
+
SECURED_INDEX_NAME = "SecuredBook_#{Rails.env}"
|
387
|
+
|
388
|
+
# store all books in index 'SECURED_INDEX_NAME'
|
389
|
+
algoliasearch index_name: SECURED_INDEX_NAME do
|
390
|
+
attributesToIndex [:name, :author]
|
391
|
+
# convert security to tags
|
392
|
+
tags do
|
393
|
+
[released ? 'public' : 'private', premium ? 'premium' : 'standard']
|
394
|
+
end
|
395
|
+
|
396
|
+
# store all 'public' (released and not premium) books in index 'PUBLIC_INDEX_NAME'
|
397
|
+
add_index PUBLIC_INDEX_NAME, if: :public? do
|
398
|
+
attributesToIndex [:name, :author]
|
399
|
+
end
|
400
|
+
end
|
401
|
+
|
402
|
+
private
|
403
|
+
def public?
|
404
|
+
released && !premium
|
405
|
+
end
|
406
|
+
|
407
|
+
end
|
408
|
+
```
|
409
|
+
|
344
410
|
Tags
|
345
411
|
-----
|
346
412
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.10.1
|
data/algoliasearch-rails.gemspec
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "algoliasearch-rails"
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.10.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.authors = ["Algolia"]
|
13
|
-
s.date = "2014-04-
|
13
|
+
s.date = "2014-04-28"
|
14
14
|
s.description = "AlgoliaSearch integration to your favorite ORM"
|
15
15
|
s.email = "contact@algolia.com"
|
16
16
|
s.extra_rdoc_files = [
|
data/lib/algoliasearch-rails.rb
CHANGED
@@ -47,25 +47,26 @@ module AlgoliaSearch
|
|
47
47
|
class IndexSettings
|
48
48
|
|
49
49
|
# AlgoliaSearch settings
|
50
|
-
OPTIONS = [:
|
51
|
-
:
|
50
|
+
OPTIONS = [:minWordSizefor1Typo, :minWordSizefor2Typos,
|
51
|
+
:hitsPerPage, :attributesToRetrieve,
|
52
52
|
:attributesToHighlight, :attributesToSnippet, :attributesToIndex,
|
53
53
|
:highlightPreTag, :highlightPostTag,
|
54
54
|
:ranking, :customRanking, :queryType, :attributesForFaceting,
|
55
|
-
:separatorsToIndex, :optionalWords, :attributeForDistinct
|
56
|
-
:if, :unless]
|
55
|
+
:separatorsToIndex, :optionalWords, :attributeForDistinct]
|
57
56
|
OPTIONS.each do |k|
|
58
57
|
define_method k do |v|
|
59
58
|
instance_variable_set("@#{k}", v)
|
60
59
|
end
|
61
60
|
end
|
62
61
|
|
63
|
-
def initialize(block)
|
62
|
+
def initialize(options, block)
|
63
|
+
@options = options
|
64
64
|
instance_exec(&block) if block
|
65
65
|
end
|
66
66
|
|
67
67
|
def attribute(*names, &block)
|
68
68
|
raise ArgumentError.new('Cannot pass multiple attribute names if block given') if block_given? and names.length > 1
|
69
|
+
raise ArgumentError.new('Cannot specify additional attributes on a slave index') if @options[:slave]
|
69
70
|
@attributes ||= {}
|
70
71
|
names.each do |name|
|
71
72
|
@attributes[name.to_s] = block_given? ? Proc.new { |o| o.instance_eval(&block) } : Proc.new { |o| o.send(name) }
|
@@ -75,6 +76,7 @@ module AlgoliaSearch
|
|
75
76
|
|
76
77
|
def add_attribute(*names, &block)
|
77
78
|
raise ArgumentError.new('Cannot pass multiple attribute names if block given') if block_given? and names.length > 1
|
79
|
+
raise ArgumentError.new('Cannot specify additional attributes on a slave index') if @options[:slave]
|
78
80
|
@additional_attributes ||= {}
|
79
81
|
names.each do |name|
|
80
82
|
@additional_attributes[name.to_s] = block_given? ? Proc.new { |o| o.instance_eval(&block) } : Proc.new { |o| o.send(name) }
|
@@ -92,12 +94,14 @@ module AlgoliaSearch
|
|
92
94
|
end
|
93
95
|
|
94
96
|
def geoloc(lat_attr, lng_attr)
|
97
|
+
raise ArgumentError.new('Cannot specify additional attributes on a slave index') if @options[:slave]
|
95
98
|
add_attribute :_geoloc do |o|
|
96
99
|
{ :lat => o.send(lat_attr).to_f, :lng => o.send(lng_attr).to_f }
|
97
100
|
end
|
98
101
|
end
|
99
102
|
|
100
103
|
def tags(*args, &block)
|
104
|
+
raise ArgumentError.new('Cannot specify additional attributes on a slave index') if @options[:slave]
|
101
105
|
add_attribute :_tags do |o|
|
102
106
|
v = block_given? ? o.instance_eval(&block) : args
|
103
107
|
v.is_a?(Array) ? v : [v]
|
@@ -114,8 +118,32 @@ module AlgoliaSearch
|
|
114
118
|
v = get_setting(k)
|
115
119
|
settings[k] = v if !v.nil?
|
116
120
|
end
|
121
|
+
settings[:slaves] = additional_indexes.select { |options, s| options[:slave] }.map do |options, s|
|
122
|
+
name = options[:index_name]
|
123
|
+
name = "#{name}_#{Rails.env.to_s}" if options[:per_environment]
|
124
|
+
name
|
125
|
+
end
|
117
126
|
settings
|
118
127
|
end
|
128
|
+
|
129
|
+
def add_index(index_name, options = {}, &block)
|
130
|
+
raise ArgumentError.new('Cannot specify additional index on a slave index') if @options[:slave]
|
131
|
+
raise ArgumentError.new('No block given') if !block_given?
|
132
|
+
raise ArgumentError.new('Options auto_index and auto_remove cannot be set on nested indexes') if options[:auto_index] || options[:auto_remove]
|
133
|
+
options[:index_name] = index_name
|
134
|
+
@additional_indexes ||= {}
|
135
|
+
@additional_indexes[options] = IndexSettings.new(options, Proc.new)
|
136
|
+
end
|
137
|
+
|
138
|
+
def add_slave(index_name, options = {}, &block)
|
139
|
+
raise ArgumentError.new('Cannot specify additional slaves on a slave index') if @options[:slave]
|
140
|
+
raise ArgumentError.new('No block given') if !block_given?
|
141
|
+
add_index(index_name, options.merge({ :slave => true }), &block)
|
142
|
+
end
|
143
|
+
|
144
|
+
def additional_indexes
|
145
|
+
@additional_indexes || {}
|
146
|
+
end
|
119
147
|
end
|
120
148
|
|
121
149
|
# these are the class methods added when AlgoliaSearch is included
|
@@ -136,13 +164,12 @@ module AlgoliaSearch
|
|
136
164
|
alias_method :must_reindex?, :algolia_must_reindex? unless method_defined? :must_reindex?
|
137
165
|
end
|
138
166
|
|
139
|
-
base.cattr_accessor :
|
167
|
+
base.cattr_accessor :algoliasearch_options, :algoliasearch_settings
|
140
168
|
end
|
141
169
|
|
142
170
|
def algoliasearch(options = {}, &block)
|
143
|
-
self.
|
144
|
-
self.
|
145
|
-
self.algolia_options = { :type => algolia_full_const_get(model_name.to_s), :per_page => algolia_index_settings.get_setting(:hitsPerPage) || 10, :page => 1 }.merge(options)
|
171
|
+
self.algoliasearch_settings = IndexSettings.new(options, block_given? ? Proc.new : nil)
|
172
|
+
self.algoliasearch_options = { :type => algolia_full_const_get(model_name.to_s), :per_page => algoliasearch_settings.get_setting(:hitsPerPage) || 10, :page => 1 }.merge(options)
|
146
173
|
|
147
174
|
attr_accessor :highlight_result
|
148
175
|
|
@@ -170,70 +197,91 @@ module AlgoliaSearch
|
|
170
197
|
|
171
198
|
def algolia_reindex!(batch_size = 1000, synchronous = false)
|
172
199
|
return if @algolia_without_auto_index_scope
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
200
|
+
algolia_configurations.each do |options, settings|
|
201
|
+
index = algolia_ensure_init(options, settings)
|
202
|
+
next if options[:slave]
|
203
|
+
last_task = nil
|
204
|
+
|
205
|
+
algolia_find_in_batches(batch_size) do |group|
|
206
|
+
if algolia_conditional_index?(options)
|
207
|
+
# delete non-indexable objects
|
208
|
+
objects = group.select { |o| !algolia_indexable?(o, options) }.map { |o| algolia_object_id_of(o, options) }
|
209
|
+
index.delete_objects(objects)
|
210
|
+
# select only indexable objects
|
211
|
+
group = group.select { |o| algolia_indexable?(o, options) }
|
212
|
+
end
|
213
|
+
objects = group.map { |o| settings.get_attributes(o).merge 'objectID' => algolia_object_id_of(o, options) }
|
214
|
+
last_task = index.save_objects(objects)
|
183
215
|
end
|
184
|
-
|
185
|
-
last_task
|
216
|
+
|
217
|
+
index.wait_task(last_task["taskID"]) if last_task and synchronous == true
|
186
218
|
end
|
187
|
-
|
219
|
+
nil
|
188
220
|
end
|
189
221
|
|
190
222
|
def algolia_index_objects(objects, synchronous = false)
|
191
|
-
|
192
|
-
|
223
|
+
algolia_configurations.each do |options, settings|
|
224
|
+
index = algolia_ensure_init(options, settings)
|
225
|
+
next if options[:slave]
|
226
|
+
task = index.save_objects(objects.map { |o| settings.get_attributes(o).merge 'objectID' => algolia_object_id_of(o, options) })
|
227
|
+
index.wait_task(task["taskID"]) if synchronous == true
|
228
|
+
end
|
193
229
|
end
|
194
230
|
|
195
231
|
def algolia_index!(object, synchronous = false)
|
196
232
|
return if @algolia_without_auto_index_scope
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
if
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
233
|
+
algolia_configurations.each do |options, settings|
|
234
|
+
object_id = algolia_object_id_of(object, options)
|
235
|
+
raise ArgumentError.new("Cannot index a blank objectID") if object_id.blank?
|
236
|
+
index = algolia_ensure_init(options, settings)
|
237
|
+
next if options[:slave]
|
238
|
+
if algolia_indexable?(object, options)
|
239
|
+
if synchronous
|
240
|
+
index.add_object!(settings.get_attributes(object), object_id)
|
241
|
+
else
|
242
|
+
index.add_object(settings.get_attributes(object), object_id)
|
243
|
+
end
|
244
|
+
elsif algolia_conditional_index?(options)
|
245
|
+
# remove non-indexable objects
|
246
|
+
if synchronous
|
247
|
+
index.delete_object!(object_id)
|
248
|
+
else
|
249
|
+
index.delete_object(object_id)
|
250
|
+
end
|
212
251
|
end
|
213
252
|
end
|
253
|
+
nil
|
214
254
|
end
|
215
255
|
|
216
256
|
def algolia_remove_from_index!(object, synchronous = false)
|
217
257
|
return if @algolia_without_auto_index_scope
|
218
258
|
object_id = algolia_object_id_of(object)
|
219
259
|
raise ArgumentError.new("Cannot index a blank objectID") if object_id.blank?
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
260
|
+
algolia_configurations.each do |options, settings|
|
261
|
+
index = algolia_ensure_init(options, settings)
|
262
|
+
next if options[:slave]
|
263
|
+
if synchronous
|
264
|
+
index.delete_object!(object_id)
|
265
|
+
else
|
266
|
+
index.delete_object(object_id)
|
267
|
+
end
|
225
268
|
end
|
269
|
+
nil
|
226
270
|
end
|
227
271
|
|
228
272
|
def algolia_clear_index!(synchronous = false)
|
229
|
-
|
230
|
-
|
231
|
-
|
273
|
+
algolia_configurations.each do |options, settings|
|
274
|
+
index = algolia_ensure_init(options, settings)
|
275
|
+
next if options[:slave]
|
276
|
+
synchronous ? index.clear! : index.clear
|
277
|
+
@algolia_indexes[settings] = nil
|
278
|
+
end
|
279
|
+
nil
|
232
280
|
end
|
233
281
|
|
234
282
|
def algolia_raw_search(q, params = {})
|
235
|
-
algolia_ensure_init
|
236
|
-
|
283
|
+
index = algolia_ensure_init
|
284
|
+
index.search(q, Hash[params.map { |k,v| [k.to_s, v.to_s] }])
|
237
285
|
end
|
238
286
|
|
239
287
|
module AdditionalMethods
|
@@ -266,63 +314,88 @@ module AlgoliaSearch
|
|
266
314
|
end
|
267
315
|
json = algolia_raw_search(q, params)
|
268
316
|
results = json['hits'].map do |hit|
|
269
|
-
o =
|
317
|
+
o = algoliasearch_options[:type].where(algolia_object_id_method => hit['objectID']).first
|
270
318
|
if o
|
271
319
|
o.highlight_result = hit['_highlightResult']
|
272
320
|
o
|
273
321
|
end
|
274
322
|
end.compact
|
275
|
-
res = AlgoliaSearch::Pagination.create(results, json['nbHits'].to_i,
|
323
|
+
res = AlgoliaSearch::Pagination.create(results, json['nbHits'].to_i, algoliasearch_options.merge({ :page => json['page'] + 1, :per_page => json['hitsPerPage'] }))
|
276
324
|
res.extend(AdditionalMethods)
|
277
325
|
res.send(:algolia_init_raw_answer, json)
|
278
326
|
res
|
279
327
|
end
|
280
328
|
|
281
|
-
def algolia_index
|
329
|
+
def algolia_index(name = nil)
|
330
|
+
if name
|
331
|
+
algolia_configurations.each do |o, s|
|
332
|
+
return algolia_ensure_init(o, s) if o[:index_name].to_s == name.to_s
|
333
|
+
end
|
334
|
+
raise ArgumentError.new("Invalid index name: #{name}")
|
335
|
+
end
|
282
336
|
algolia_ensure_init
|
283
|
-
@algolia_index
|
284
337
|
end
|
285
338
|
|
286
|
-
def algolia_index_name
|
287
|
-
|
288
|
-
name =
|
339
|
+
def algolia_index_name(options = nil)
|
340
|
+
options ||= algoliasearch_options
|
341
|
+
name = options[:index_name] || model_name.to_s.gsub('::', '_')
|
342
|
+
name = "#{name}_#{Rails.env.to_s}" if options[:per_environment]
|
289
343
|
name
|
290
344
|
end
|
291
345
|
|
292
346
|
def algolia_must_reindex?(object)
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
347
|
+
algolia_configurations.each do |options, settings|
|
348
|
+
next if options[:slave]
|
349
|
+
return true if algolia_object_id_changed?(object, options)
|
350
|
+
settings.get_attributes(object).each do |k, v|
|
351
|
+
changed_method = "#{k}_changed?"
|
352
|
+
return true if object.respond_to?(changed_method) && object.send(changed_method)
|
353
|
+
end
|
297
354
|
end
|
298
355
|
return false
|
299
356
|
end
|
300
357
|
|
301
358
|
protected
|
302
359
|
|
303
|
-
def algolia_ensure_init
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
@
|
360
|
+
def algolia_ensure_init(options = nil, settings = nil)
|
361
|
+
@algolia_indexes ||= {}
|
362
|
+
options ||= algoliasearch_options
|
363
|
+
settings ||= algoliasearch_settings
|
364
|
+
return @algolia_indexes[settings] if @algolia_indexes[settings]
|
365
|
+
@algolia_indexes[settings] = Algolia::Index.new(algolia_index_name(options))
|
366
|
+
current_settings = @algolia_indexes[settings].get_settings rescue nil # if the index doesn't exist
|
367
|
+
@algolia_indexes[settings].set_settings(settings.to_settings) if algoliasearch_settings_changed?(current_settings, settings.to_settings)
|
368
|
+
@algolia_indexes[settings]
|
308
369
|
end
|
309
370
|
|
310
371
|
private
|
311
372
|
|
312
|
-
def
|
313
|
-
|
373
|
+
def algolia_configurations
|
374
|
+
if @configurations.nil?
|
375
|
+
@configurations = {}
|
376
|
+
@configurations[algoliasearch_options] = algoliasearch_settings
|
377
|
+
algoliasearch_settings.additional_indexes.each do |k,v|
|
378
|
+
@configurations[k] = v
|
379
|
+
end
|
380
|
+
end
|
381
|
+
@configurations
|
382
|
+
end
|
383
|
+
|
384
|
+
def algolia_object_id_method(options = nil)
|
385
|
+
options ||= algoliasearch_options
|
386
|
+
options[:id] || options[:object_id] || :id
|
314
387
|
end
|
315
388
|
|
316
|
-
def algolia_object_id_of(o)
|
317
|
-
o.send(algolia_object_id_method).to_s
|
389
|
+
def algolia_object_id_of(o, options = nil)
|
390
|
+
o.send(algolia_object_id_method(options)).to_s
|
318
391
|
end
|
319
392
|
|
320
|
-
def algolia_object_id_changed?(o)
|
321
|
-
m = "#{algolia_object_id_method}_changed?"
|
393
|
+
def algolia_object_id_changed?(o, options = nil)
|
394
|
+
m = "#{algolia_object_id_method(options)}_changed?"
|
322
395
|
o.respond_to?(m) ? o.send(m) : false
|
323
396
|
end
|
324
397
|
|
325
|
-
def
|
398
|
+
def algoliasearch_settings_changed?(prev, current)
|
326
399
|
return true if prev.nil?
|
327
400
|
current.each do |k, v|
|
328
401
|
prev_v = prev[k.to_s]
|
@@ -348,13 +421,15 @@ module AlgoliaSearch
|
|
348
421
|
obj
|
349
422
|
end
|
350
423
|
|
351
|
-
def algolia_conditional_index?
|
352
|
-
|
424
|
+
def algolia_conditional_index?(options = nil)
|
425
|
+
options ||= algoliasearch_options
|
426
|
+
options[:if].present? || options[:unless].present?
|
353
427
|
end
|
354
428
|
|
355
|
-
def algolia_indexable?(object)
|
356
|
-
|
357
|
-
|
429
|
+
def algolia_indexable?(object, options = nil)
|
430
|
+
options ||= algoliasearch_options
|
431
|
+
if_passes = options[:if].blank? || algolia_constraint_passes?(object, options[:if])
|
432
|
+
unless_passes = options[:unless].blank? || !algolia_constraint_passes?(object, options[:unless])
|
358
433
|
if_passes && unless_passes
|
359
434
|
end
|
360
435
|
|
@@ -404,12 +479,12 @@ module AlgoliaSearch
|
|
404
479
|
end
|
405
480
|
end
|
406
481
|
|
407
|
-
def algolia_index!
|
408
|
-
self.class.algolia_index!(self, algolia_synchronous?)
|
482
|
+
def algolia_index!(synchronous = false)
|
483
|
+
self.class.algolia_index!(self, synchronous || algolia_synchronous?)
|
409
484
|
end
|
410
485
|
|
411
|
-
def algolia_remove_from_index!
|
412
|
-
self.class.algolia_remove_from_index!(self, algolia_synchronous?)
|
486
|
+
def algolia_remove_from_index!(synchronous = false)
|
487
|
+
self.class.algolia_remove_from_index!(self, synchronous || algolia_synchronous?)
|
413
488
|
end
|
414
489
|
|
415
490
|
private
|
metadata
CHANGED
@@ -1,111 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: algoliasearch-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.5.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.5.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: algoliasearch
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.2.5
|
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
40
|
version: 1.2.5
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: will_paginate
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 2.3.15
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 2.3.15
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: kaminari
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: travis
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: rdoc
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
description: AlgoliaSearch integration to your favorite ORM
|
@@ -117,9 +117,9 @@ extra_rdoc_files:
|
|
117
117
|
- LICENSE
|
118
118
|
- README.md
|
119
119
|
files:
|
120
|
-
- .document
|
121
|
-
- .rspec
|
122
|
-
- .travis.yml
|
120
|
+
- ".document"
|
121
|
+
- ".rspec"
|
122
|
+
- ".travis.yml"
|
123
123
|
- ChangeLog
|
124
124
|
- Gemfile
|
125
125
|
- Gemfile.lock
|
@@ -140,10 +140,10 @@ files:
|
|
140
140
|
- spec/utilities_spec.rb
|
141
141
|
- vendor/assets/javascripts/algolia/algoliasearch.js
|
142
142
|
- vendor/assets/javascripts/algolia/algoliasearch.min.js
|
143
|
-
- vendor/assets/javascripts/algolia/
|
143
|
+
- vendor/assets/javascripts/algolia/bloodhound.js
|
144
144
|
- vendor/assets/javascripts/algolia/typeahead.bundle.js
|
145
145
|
- vendor/assets/javascripts/algolia/typeahead.bundle.min.js
|
146
|
-
- vendor/assets/javascripts/algolia/
|
146
|
+
- vendor/assets/javascripts/algolia/typeahead.jquery.js
|
147
147
|
homepage: http://github.com/algolia/algoliasearch-rails
|
148
148
|
licenses:
|
149
149
|
- MIT
|
@@ -154,17 +154,17 @@ require_paths:
|
|
154
154
|
- lib
|
155
155
|
required_ruby_version: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- -
|
157
|
+
- - ">="
|
158
158
|
- !ruby/object:Gem::Version
|
159
159
|
version: '0'
|
160
160
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
161
|
requirements:
|
162
|
-
- -
|
162
|
+
- - ">="
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
166
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.
|
167
|
+
rubygems_version: 2.2.2
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: AlgoliaSearch integration to your favorite ORM
|