algoliasearch-rails 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28e2a33f207e6f6d7f2c1bc4e3bf875ce6e422bb
4
- data.tar.gz: 6668fdcaf13f41338546c65794006b71072e5a12
3
+ metadata.gz: 041314b13c5b2fcd737c3dbb68490c07f03da0bc
4
+ data.tar.gz: afdb9fc9761aaad6983f5d8b3648bcb383e10a89
5
5
  SHA512:
6
- metadata.gz: 0803d9705e833df8ba2e03ea59bddd9ae99e3b51e84e180aa20e328b0e7dfe1ad22d62b18b23dd204d4fbf82d75b5104b63d2db53b49728709a556f53d34236c
7
- data.tar.gz: 559edd2efe42025cf102542f14ec90be69a93a89bbb70ffb955174a77048b768364e66181f0b353f9243993940d5450a58c0944526f36acc4e57da61fd656f20
6
+ metadata.gz: 65267280749d9b543035022acf729ffe1bd0aec7fb1fb92b34705ffcffca4114e22ffe04bcbee565fd303c5658e8dee3469b613fda9be5db87bdb2bf7812f811
7
+ data.tar.gz: edfae803b4bd1aa594812fa7417c63a48db9c05ca7fe7a2341fc37a732f8b1b6bd68ff01993a701c9fdb3ca805ca9df07fe96d91a07c2c799f506cc0124d1d4f
@@ -0,0 +1,120 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ ZenTest (4.9.3)
5
+ actionpack (4.0.0)
6
+ activesupport (= 4.0.0)
7
+ builder (~> 3.1.0)
8
+ erubis (~> 2.7.0)
9
+ rack (~> 1.5.2)
10
+ rack-test (~> 0.6.2)
11
+ activemodel (4.0.0)
12
+ activesupport (= 4.0.0)
13
+ builder (~> 3.1.0)
14
+ activerecord (4.0.0)
15
+ activemodel (= 4.0.0)
16
+ activerecord-deprecated_finders (~> 1.0.2)
17
+ activesupport (= 4.0.0)
18
+ arel (~> 4.0.0)
19
+ activerecord-deprecated_finders (1.0.3)
20
+ activesupport (4.0.0)
21
+ i18n (~> 0.6, >= 0.6.4)
22
+ minitest (~> 4.2)
23
+ multi_json (~> 1.3)
24
+ thread_safe (~> 0.1)
25
+ tzinfo (~> 0.3.37)
26
+ addressable (2.3.5)
27
+ algoliasearch (1.1.0)
28
+ curb
29
+ arel (4.0.0)
30
+ atomic (1.1.14)
31
+ autotest (4.4.6)
32
+ ZenTest (>= 4.4.1)
33
+ autotest-fsevent (0.2.8)
34
+ sys-uname
35
+ autotest-growl (0.2.16)
36
+ builder (3.1.4)
37
+ curb (0.8.4)
38
+ diff-lcs (1.2.4)
39
+ erubis (2.7.0)
40
+ faraday (0.8.8)
41
+ multipart-post (~> 1.2.0)
42
+ ffi (1.9.0)
43
+ git (1.2.6)
44
+ github_api (0.10.1)
45
+ addressable
46
+ faraday (~> 0.8.1)
47
+ hashie (>= 1.2)
48
+ multi_json (~> 1.4)
49
+ nokogiri (~> 1.5.2)
50
+ oauth2
51
+ hashie (2.0.5)
52
+ highline (1.6.19)
53
+ httpauth (0.2.0)
54
+ i18n (0.6.5)
55
+ jeweler (1.8.7)
56
+ builder
57
+ bundler (~> 1.0)
58
+ git (>= 1.2.5)
59
+ github_api (= 0.10.1)
60
+ highline (>= 1.6.15)
61
+ nokogiri (= 1.5.10)
62
+ rake
63
+ rdoc
64
+ json (1.8.0)
65
+ jwt (0.1.8)
66
+ multi_json (>= 1.5)
67
+ kaminari (0.14.1)
68
+ actionpack (>= 3.0.0)
69
+ activesupport (>= 3.0.0)
70
+ minitest (4.7.5)
71
+ multi_json (1.8.0)
72
+ multi_xml (0.5.5)
73
+ multipart-post (1.2.0)
74
+ nokogiri (1.5.10)
75
+ oauth2 (0.9.2)
76
+ faraday (~> 0.8)
77
+ httpauth (~> 0.2)
78
+ jwt (~> 0.1.4)
79
+ multi_json (~> 1.0)
80
+ multi_xml (~> 0.5)
81
+ rack (~> 1.2)
82
+ rack (1.5.2)
83
+ rack-test (0.6.2)
84
+ rack (>= 1.0)
85
+ rake (10.1.0)
86
+ rdoc (4.0.1)
87
+ json (~> 1.4)
88
+ redgreen (1.2.2)
89
+ rspec (2.14.1)
90
+ rspec-core (~> 2.14.0)
91
+ rspec-expectations (~> 2.14.0)
92
+ rspec-mocks (~> 2.14.0)
93
+ rspec-core (2.14.5)
94
+ rspec-expectations (2.14.2)
95
+ diff-lcs (>= 1.1.3, < 2.0)
96
+ rspec-mocks (2.14.3)
97
+ sqlite3 (1.3.8)
98
+ sys-uname (0.9.2)
99
+ ffi (>= 1.0.0)
100
+ thread_safe (0.1.3)
101
+ atomic
102
+ tzinfo (0.3.37)
103
+ will_paginate (3.0.5)
104
+
105
+ PLATFORMS
106
+ ruby
107
+
108
+ DEPENDENCIES
109
+ activerecord (>= 3.0.7)
110
+ algoliasearch (>= 1.0.2)
111
+ autotest
112
+ autotest-fsevent
113
+ autotest-growl
114
+ jeweler
115
+ json (>= 1.5.1)
116
+ kaminari
117
+ redgreen
118
+ rspec (>= 2.5.0)
119
+ sqlite3
120
+ will_paginate (>= 2.3.15)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.3
1
+ 1.1.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "algoliasearch-rails"
8
- s.version = "1.1.3"
8
+ s.version = "1.1.4"
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-09-19"
12
+ s.date = "2013-09-28"
13
13
  s.description = "AlgoliaSearch integration to your favorite ORM"
14
14
  s.email = "contact@algolia.com"
15
15
  s.extra_rdoc_files = [
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  ".document",
21
21
  ".rspec",
22
22
  "Gemfile",
23
+ "Gemfile.lock",
23
24
  "LICENSE",
24
25
  "README.md",
25
26
  "Rakefile",
@@ -49,7 +49,15 @@ module AlgoliaSearch
49
49
  :minWordSizeForApprox2, :hitsPerPage, :attributesToRetrieve,
50
50
  :attributesToHighlight, :attributesToSnippet, :attributesToIndex,
51
51
  :ranking, :customRanking, :queryType]
52
- attr_accessor *OPTIONS
52
+ OPTIONS.each do |k|
53
+ define_method k do |v|
54
+ instance_variable_set("@#{k}", v)
55
+ end
56
+ end
57
+
58
+ def attributesToIndex(v)
59
+ instance_variable_set(:@attributesToIndex, v)
60
+ end
53
61
 
54
62
  # attributes to consider
55
63
  attr_accessor :attributes
@@ -63,10 +71,14 @@ module AlgoliaSearch
63
71
  self.attributes += names
64
72
  end
65
73
 
74
+ def get(setting)
75
+ instance_variable_get("@#{setting}")
76
+ end
77
+
66
78
  def to_settings
67
79
  settings = {}
68
80
  OPTIONS.each do |k|
69
- v = send(k)
81
+ v = get(k)
70
82
  settings[k] = v if !v.nil?
71
83
  end
72
84
  settings
@@ -90,7 +102,7 @@ module AlgoliaSearch
90
102
  after_destroy { |searchable| searchable.remove_from_index! } if respond_to?(:after_destroy)
91
103
  end
92
104
 
93
- @options = { type: model_name, per_page: @index_options.hitsPerPage || 10, page: 1 }.merge(options)
105
+ @options = { type: model_name, per_page: @index_options.get(:hitsPerPage) || 10, page: 1 }.merge(options)
94
106
  init
95
107
  end
96
108
 
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.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-19 00:00:00.000000000 Z
11
+ date: 2013-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -91,6 +91,7 @@ files:
91
91
  - .document
92
92
  - .rspec
93
93
  - Gemfile
94
+ - Gemfile.lock
94
95
  - LICENSE
95
96
  - README.md
96
97
  - Rakefile