elastic_record 0.7.0 → 0.7.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'elastic_record'
5
- s.version = '0.7.0'
5
+ s.version = '0.7.1'
6
6
  s.summary = 'Use Elastic Search with your objects'
7
7
  s.description = 'Find your records with elastic search'
8
8
 
@@ -37,7 +37,7 @@ module ElasticRecord
37
37
  }
38
38
  ]
39
39
 
40
- aliased_names.each do |index_to_remove|
40
+ (aliased_names - [index_name]).each do |index_to_remove|
41
41
  actions << {
42
42
  remove: {
43
43
  "index" => index_to_remove,
@@ -31,6 +31,15 @@ class ElasticRecord::Index::ManageTest < MiniTest::Spec
31
31
  assert_equal ['widgets_foo'], index.aliased_names
32
32
  end
33
33
 
34
+ def test_deploy_when_already_deployed
35
+ index.create 'widgets_foo'
36
+ index.deploy 'widgets_foo'
37
+
38
+ index.deploy 'widgets_foo'
39
+
40
+ assert_equal ['widgets_foo'], index.aliased_names
41
+ end
42
+
34
43
  private
35
44
  def index
36
45
  @index ||= Widget.elastic_index
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: 0.7.0
4
+ version: 0.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-01 00:00:00.000000000 Z
12
+ date: 2012-10-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: arelastic