rubberband 0.9.1 → 0.9.2

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.
@@ -51,9 +51,9 @@ module ElasticSearch
51
51
  execute(:alias_index, alias_ops, options)
52
52
  end
53
53
 
54
- def get_aliases(index=default_index, options={})
55
- index, type, options = extract_scope(options)
56
- execute(:get_aliases, index, options)
54
+ def get_aliases(index=nil, options={})
55
+ scope_index, type, options = extract_scope(options)
56
+ execute(:get_aliases, index || scope_index, options)
57
57
  end
58
58
 
59
59
  # options: ignore_conflicts
@@ -1,3 +1,3 @@
1
1
  module ElasticSearch
2
- VERSION = "0.9.1"
2
+ VERSION = "0.9.2"
3
3
  end
@@ -40,4 +40,12 @@ describe "basic ops" do
40
40
  result[@first_index]["aliases"].keys.should_not include("#{@first_index}-alias")
41
41
  result[@first_index]["aliases"].keys.should include("#{@first_index}-alias2")
42
42
  end
43
+
44
+ it 'should get aliases for non-default index' do
45
+ second_index = 'second-' + Time.now.to_i.to_s
46
+ @client.create_index(second_index)
47
+ @client.alias_index(:add => { second_index => "#{second_index}-alias" })
48
+ result = @client.get_aliases(second_index)
49
+ result[second_index]["aliases"].keys.should include("#{second_index}-alias")
50
+ end
43
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubberband
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
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-07-26 00:00:00.000000000 Z
12
+ date: 2012-08-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday