algoliasearch-rails 2.1.2 → 2.1.3

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
  SHA256:
3
- metadata.gz: 0e330655018646114452e35b60f4abfa3b254655b88b3028e4c5157f029be2ca
4
- data.tar.gz: 94889786577b906e218d3c8b253b521201d3ca64da20b9c510a81fc30a01c01a
3
+ metadata.gz: 05d79fea6be33d2b368545b05d61ff20d6c9ebc24c82c6ebce9d101b5dd6c1be
4
+ data.tar.gz: 9d321dcbd147b7f566b520cc2c9f536a505451ede8a654bcb58a39aa68190b4c
5
5
  SHA512:
6
- metadata.gz: 4affa94cd09f68fa4524c7e1199d68af6ca84aeea272f2f6e05bb3abd1a0c644f84e6f4c35be35cb621a7c30fd7cea669f09f4e8725459ce21195f1801fe406c
7
- data.tar.gz: 8b690f23e9fce5b8f0f82b0793947d8a9569dbf7ed3dad2f91c3febe2244341aa6a5756726c4166bd73441e1af67f0c0ec3a6237d9e6ed70b4486b367635094c
6
+ metadata.gz: 90c767d7f18c8b3c4262851b76b7a2ce1985b54b0b865ce735f9730f13f0680884965999a055e2b8a20912e9bdc777395100df71639888e38a6c4a315629f5ab
7
+ data.tar.gz: 3bbe879c074ca6debba2c4966917595f7f530f3c5a625d43958e00e73927495ebf183e711067c3ae2cdef4e7eb89c6b26357dab48ae1bf71a18eac6f07396345
data/CHANGELOG.MD CHANGED
@@ -1,6 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
- ## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/2.1.1...master)
3
+ ## [Unreleased](https://github.com/algolia/algoliasearch-rails/compare/2.1.3...master)
4
+
5
+ ## [2.1.3](https://github.com/algolia/algoliasearch-rails/compare/2.1.3...2.1.2)
6
+ ### Fixed
7
+ - Prevent an extra get_settings call even if `check_settings` is false [`#367`](https://github.com/algolia/algoliasearch-rails/pull/367)
4
8
 
5
9
  ## [2.1.2](https://github.com/algolia/algoliasearch-rails/compare/2.1.2...2.1.1)
6
10
  ### Fixed
@@ -1,3 +1,3 @@
1
1
  module AlgoliaSearch
2
- VERSION = '2.1.2'
2
+ VERSION = '2.1.3'
3
3
  end
@@ -786,13 +786,15 @@ module AlgoliaSearch
786
786
 
787
787
  @algolia_indexes[settings] = SafeIndex.new(algolia_index_name(options), algoliasearch_options[:raise_on_failure])
788
788
 
789
- current_settings = @algolia_indexes[settings].get_settings(:getVersion => 1) rescue nil # if the index doesn't exist
790
-
791
789
  index_settings ||= settings.to_settings
792
790
  index_settings = options[:primary_settings].to_settings.merge(index_settings) if options[:inherit]
793
791
 
794
792
  options[:check_settings] = true if options[:check_settings].nil?
795
793
 
794
+ current_settings = if options[:check_settings]
795
+ @algolia_indexes[settings].get_settings(:getVersion => 1) rescue nil # if the index doesn't exist
796
+ end
797
+
796
798
  if !algolia_indexing_disabled?(options) && options[:check_settings] && algoliasearch_settings_changed?(current_settings, index_settings)
797
799
  replicas = index_settings.delete(:replicas) ||
798
800
  index_settings.delete('replicas')
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: 2.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Algolia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-09 00:00:00.000000000 Z
11
+ date: 2021-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json