elastic_record 2.0.0 → 2.0.1

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: 6e7ce3ca4166690dfd09ab6072e1cb1d84e5efda
4
- data.tar.gz: 61c4da83fe674d7c95a63e475ff3ba39daedde11
3
+ metadata.gz: a714ff20d541076d35d98b247d8c17ba209e3457
4
+ data.tar.gz: da6686b3b17d505b6feee40df4e5d2117a2b5d4d
5
5
  SHA512:
6
- metadata.gz: 9e463040d4d6ca0393b8ebdd54bf6df62366e6d65664ad8a46c1fc2eae4d51e805f21e643ba2f2b245cfe2637d95ad48fda1b12a5a8a306139399db660e3ed0d
7
- data.tar.gz: 1078110a75c4837be1e422fecb8a05efcaf8a953198435baeb0ebf8988c75d32b9eb5370dd930f06a8c19768ae16d2d6f5bbb003a403cc23a45df2e1b0213a2f
6
+ metadata.gz: 4fb0d680f0fe4d5e6a04a36d7db82ddb4973b11affa10da5507c4c4dc6c8d35cacf536809003591d1a98d64b3d5b38f299e0b5954c169e7a77b2aca7312bacaa
7
+ data.tar.gz: 42d4f1e6f844186ec743818c983936d32cd95d8d7de3eddfce780bab94c1f267c95762b5aa108ec34f4c90e052eeffab4ff523caae9bacc3c4c9fd3cbf6bbbaf
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'elastic_record'
5
- s.version = '2.0.0'
5
+ s.version = '2.0.1'
6
6
  s.summary = 'Use Elastic Search with your objects'
7
7
  s.description = 'Find your records with elastic search'
8
8
 
@@ -2,6 +2,9 @@ module ElasticRecord
2
2
  class Index
3
3
  module Percolator
4
4
  def create_percolator(name, elastic_query)
5
+ unless exists? percolator_name
6
+ create percolator_name
7
+ end
5
8
  connection.json_put "/#{percolator_name}/.percolator/#{name}", elastic_query
6
9
  end
7
10
 
@@ -13,7 +13,7 @@ module ElasticRecord
13
13
  if config = config[Rails.env]
14
14
  ElasticRecord::Config.settings = config
15
15
  else
16
- raise "Missing environment #{Rails.env} in superstore.yml"
16
+ raise "Missing environment #{Rails.env} in elasticsearch.yml"
17
17
  end
18
18
  end
19
19
  end
@@ -7,7 +7,7 @@ class ElasticRecord::ModelTest < MiniTest::Test
7
7
  def test_elastic_connection
8
8
  connection = Widget.elastic_connection
9
9
 
10
- assert_equal [ElasticRecord::Config.servers], connection.servers
10
+ assert_equal ElasticRecord::Config.servers, connection.servers
11
11
  assert_equal ElasticRecord::Config.connection_options, connection.options
12
12
  end
13
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Infogroup