algoliasearch-rails 1.3.1 → 1.3.2

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: 38a5a98007303604cd0b4ca04fc8b1736ea5203e
4
- data.tar.gz: 9df459551b4c2c4bedc1506d54eb1de2f954ebdb
3
+ metadata.gz: d428c61f7c4dc2a09a1cf096ea4a3ff8f473a371
4
+ data.tar.gz: 6ff620725b76b9d753a6a01078c216168e33d0ab
5
5
  SHA512:
6
- metadata.gz: 2d51eba21673ccb197b71b4b2ecd8cf50f80f7e0f2d485443e8bf1de2fd9507fbeea9acb60944545939b0dd338757192cec850fed427689fff28d69e602e0227
7
- data.tar.gz: 688292e69b163a1d967a9d6f7610b5ef80c5c966f6defe1f20793dcfa1171dc5c0799be1693fb1a7aff3ae961dec002855f3381bbd338971bd9620930b347e6e
6
+ metadata.gz: bd7bf16ad2c6ca12e1850b5cc0e33c6990a03bae6aca68c6b97185fef5d1e842b6a6f56c5f7700b85936c8c26ca136542cf68b334fec1bde0eadd77601e24d79
7
+ data.tar.gz: 361a11ba7ba9c81f572b773f0bc97afc0e8fea5d324c552963c06fd248d22b93fe69f54c87503910361656c86a11bb9ba05c9de69c76373c90570e9f202fa2b6
data/ChangeLog CHANGED
@@ -1,5 +1,9 @@
1
1
  CHANGELOG
2
2
 
3
+ 2013-10-17 1.3.2
4
+
5
+ * while detecting settings changes, fixed array comparison
6
+
3
7
  2013-10-17 1.3.1
4
8
 
5
9
  * upgraded to algoliasearch 1.1.4 (too aggressive wait_task calls)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.1
1
+ 1.3.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "algoliasearch-rails"
8
- s.version = "1.3.1"
8
+ s.version = "1.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Algolia"]
@@ -83,6 +83,7 @@ module AlgoliaSearch
83
83
 
84
84
  # these are the class methods added when AlgoliaSearch is included
85
85
  module ClassMethods
86
+
86
87
  def algoliasearch(options = {}, &block)
87
88
  @index_options = IndexOptions.new(block_given? ? Proc.new : nil)
88
89
  attr_accessor :highlight_result
@@ -170,7 +171,13 @@ module AlgoliaSearch
170
171
  def index_settings_changed?(prev, current)
171
172
  return true if prev.nil?
172
173
  current.each do |k, v|
173
- return true if prev[k.to_s] != v
174
+ prev_v = prev[k.to_s]
175
+ if v.is_a?(Array) and prev_v.is_a?(Array)
176
+ # compare array of strings, avoiding symbols VS strings comparison
177
+ return true if v.map { |x| x.to_s } != prev_v.map { |x| x.to_s }
178
+ else
179
+ return true if prev_v != v
180
+ end
174
181
  end
175
182
  false
176
183
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algoliasearch-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia