algoliasearch-rails 1.16.2 → 1.16.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d98461af981409260540c03583112e7db9e0963
4
- data.tar.gz: b0c724f787ca66fcd95c46c6d56eecf3b24644ef
3
+ metadata.gz: 52de41878cc41dc76652c65d5756e3a7bd4388ef
4
+ data.tar.gz: fa59514cb2befd16b72e20fa99a324d17ed90eef
5
5
  SHA512:
6
- metadata.gz: 3664eff68d50cdcb7ab1ab3b0047876a04eb723d084e88f384f06e26abf626ff87ddfa921b5daca450a2a34c982df1c82a7b6e8009a592712fb577f510b076d0
7
- data.tar.gz: 70df77333e9af7ae77ba4b8ff5e8c1239a5f5819af20b98181f402df09638dfb351201de1a1031c043223503fea6f2b35d44654b98cb07e649357494ea25930a
6
+ metadata.gz: 6a63d43c7956d7bed29fe961eeff363f873848c2a6040599ac71764eebf0919b26ddade734b2dcb6992fd862b5e5592dc66286673884a9c7d9d206ae7ed7ba1c
7
+ data.tar.gz: 59d339a85f0120d75a7392878fbec5dfa02eec4e182c182a1c59168b729d20e0ce658e8c6fad36652a474a13fb58f5922e887feffc85cd0142e2616535589464
data/ChangeLog CHANGED
@@ -1,5 +1,11 @@
1
1
  CHANGELOG
2
2
 
3
+ 2016-11-25 1.16.3
4
+
5
+ * Propagate `search_facet` to `search_for_facet_values` renaming (backward compatible)
6
+ * Upgrade `algoliasearch` dependency to ~> 1.12.1
7
+ * Add missing `typoTolerance` setting
8
+
3
9
  2016-11-14 1.16.2
4
10
 
5
11
  * Add missing disableTypoToleranceOnAttributes and disableTypoToleranceOnWords index settings
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem 'json', '~> 1.5', '>= 1.5.1'
4
- gem 'algoliasearch', '~> 1.12.0'
4
+ gem 'algoliasearch', '~> 1.12.1'
5
5
  gem 'rubysl', '~> 2.0', :platform => :rbx
6
6
 
7
7
  group :test do
data/README.md CHANGED
@@ -876,7 +876,7 @@ p json_answer['hits']
876
876
  p json_answer['facets']
877
877
  ```
878
878
 
879
- Search parameters can be specified either through the index's [settings](https://github.com/algolia/algoliasearch-client-ruby#index-settings) statically in your model or dynamically at search time specifying [search parameters](https://github.com/algolia/algoliasearch-client-ruby#search) as second argument of the `search` method:
879
+ Search parameters can be specified either through the index's [settings](https://github.com/algolia/algoliasearch-client-ruby#index-settings-parameters) statically in your model or dynamically at search time specifying [search parameters](https://github.com/algolia/algoliasearch-client-ruby#search) as second argument of the `search` method:
880
880
 
881
881
  ```ruby
882
882
  class Contact < ActiveRecord::Base
@@ -936,7 +936,7 @@ p raw_json['facets']
936
936
  You can also search for facet values.
937
937
 
938
938
  ```ruby
939
- Product.search_facet('category', 'Headphones') # Array of {value, highlighted, count}
939
+ Product.search_for_facet_values('category', 'Headphones') # Array of {value, highlighted, count}
940
940
  ```
941
941
 
942
942
  This method can also take any parameter a query can take.
@@ -944,7 +944,7 @@ This will adjust the search to only hits which would have matched the query.
944
944
 
945
945
  ```ruby
946
946
  # Only sends back the categories containing red Apple products (and only counts those)
947
- Product.search_facet('category', 'phone', {
947
+ Product.search_for_facet_values('category', 'phone', {
948
948
  query: 'red',
949
949
  filters: 'brand:Apple'
950
950
  }) # Array of phone categories linked to red Apple products
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.16.2
1
+ 1.16.3
@@ -77,7 +77,7 @@ Gem::Specification.new do |s|
77
77
 
78
78
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
79
79
  s.add_runtime_dependency(%q<json>, [">= 1.5.1"])
80
- s.add_runtime_dependency(%q<algoliasearch>, ["~> 1.11.0"])
80
+ s.add_runtime_dependency(%q<algoliasearch>, ["~> 1.12.1"])
81
81
  s.add_development_dependency(%q<will_paginate>, [">= 2.3.15"])
82
82
  s.add_development_dependency(%q<kaminari>, [">= 0"])
83
83
  s.add_development_dependency "travis"
@@ -85,11 +85,11 @@ Gem::Specification.new do |s|
85
85
  s.add_development_dependency "rdoc"
86
86
  else
87
87
  s.add_dependency(%q<json>, [">= 1.5.1"])
88
- s.add_dependency(%q<algoliasearch>, ["~> 1.11.0"])
88
+ s.add_dependency(%q<algoliasearch>, ["~> 1.12.1"])
89
89
  end
90
90
  else
91
91
  s.add_dependency(%q<json>, [">= 1.5.1"])
92
- s.add_dependency(%q<algoliasearch>, ["~> 1.11.0"])
92
+ s.add_dependency(%q<algoliasearch>, ["~> 1.12.1"])
93
93
  end
94
94
  end
95
95
 
@@ -55,7 +55,7 @@ module AlgoliaSearch
55
55
  class IndexSettings
56
56
 
57
57
  # AlgoliaSearch settings
58
- OPTIONS = [:minWordSizefor1Typo, :minWordSizefor2Typos,
58
+ OPTIONS = [:minWordSizefor1Typo, :minWordSizefor2Typos, :typoTolerance,
59
59
  :hitsPerPage, :attributesToRetrieve,
60
60
  :attributesToHighlight, :attributesToSnippet, :attributesToIndex,
61
61
  :highlightPreTag, :highlightPostTag,
@@ -340,6 +340,7 @@ module AlgoliaSearch
340
340
  alias_method :search, :algolia_search unless method_defined? :search
341
341
  alias_method :raw_search, :algolia_raw_search unless method_defined? :raw_search
342
342
  alias_method :search_facet, :algolia_search_facet unless method_defined? :search_facet
343
+ alias_method :search_for_facet_values, :algolia_search_for_facet_values unless method_defined? :search_for_facet_values
343
344
  alias_method :index, :algolia_index unless method_defined? :index
344
345
  alias_method :index_name, :algolia_index_name unless method_defined? :index_name
345
346
  alias_method :must_reindex?, :algolia_must_reindex? unless method_defined? :must_reindex?
@@ -639,13 +640,16 @@ module AlgoliaSearch
639
640
  res
640
641
  end
641
642
 
642
- def algolia_search_facet(facet, text, params = {})
643
+ def algolia_search_for_facet_values(facet, text, params = {})
643
644
  index_name = params.delete(:index) || params.delete('index') || params.delete(:slave) || params.delete('slave')
644
645
  index = algolia_index(index_name)
645
646
  query = Hash[params.map { |k, v| [k.to_s, v.to_s] }]
646
647
  index.search_facet(facet, text, query)['facetHits']
647
648
  end
648
649
 
650
+ # deprecated (renaming)
651
+ alias :algolia_search_facet :algolia_search_for_facet_values
652
+
649
653
  def algolia_index(name = nil)
650
654
  if name
651
655
  algolia_configurations.each do |o, s|
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.16.2
4
+ version: 1.16.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-14 00:00:00.000000000 Z
11
+ date: 2016-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.11.0
33
+ version: 1.12.1
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.11.0
40
+ version: 1.12.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: will_paginate
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -183,8 +183,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  requirements: []
185
185
  rubyforge_project:
186
- rubygems_version: 2.5.1
186
+ rubygems_version: 2.4.1
187
187
  signing_key:
188
188
  specification_version: 4
189
189
  summary: AlgoliaSearch integration to your favorite ORM
190
190
  test_files: []
191
+ has_rdoc: