elastomer-cli 0.3.4 → 0.3.6

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
  SHA1:
3
- metadata.gz: e1fbcdfaa586df444cfc13d9fd1e5f86ec16fb3e
4
- data.tar.gz: a2daa64a35ec3d963b593227fe8219ca6a56351e
3
+ metadata.gz: 05a6d24e04fbf47b151bd04a4b05d32ed5a7a0b6
4
+ data.tar.gz: 08510d4265249bba05e5c11a40982d7a3a71862b
5
5
  SHA512:
6
- metadata.gz: bccc903e4970134e2b7e99a9f25c0842a985a038075ff9a197cabf5810ab714d02ad227964e234d3a9c541dec2306c3629b32a0711940042c1bcf92de9fff0c2
7
- data.tar.gz: 297fd892c58f723129f4698a9c577df2277850f04857e1dfbfc54d60af8661596b39f4509cc8d677d5ad505d00773a198b086f33415b9bbbfd86b8edcd6d5925
6
+ metadata.gz: c1239543d8aee2e7819461ab3931d547c45ed1dcdece4babaefe81d1105668e4dddef004a550ec7f2f56f31ad9b53b8415f15832887a269577d774a4cad0006e
7
+ data.tar.gz: b239e43405a661cb19a8e7ed27782eb62d283f838532ec8426124a0eff1779065d33ece36c932d41dd524b431cc06f72485441cba85bb8b7003d18b497ff55dc
@@ -1 +1 @@
1
- 2.1.0-github
1
+ 2.3.0
@@ -1,3 +1,9 @@
1
+ ## 0.3.6 (2016-09-26)
2
+ - Support allocation commands for ES 2
3
+
4
+ ## 0.3.5 (2015-10-28)
5
+ - Default host names for `shard stats`
6
+
1
7
  ## 0.3.4 (2015-10-28)
2
8
  - Make host name columns shorter for `shard stats`
3
9
 
@@ -83,7 +83,7 @@ module Elastomer
83
83
  else
84
84
  raise Thor::Error, "ERROR: Unknown allocation command: #{command}"
85
85
  end
86
- elsif client.version =~ /^1./
86
+ elsif client.version =~ /^1./ || client.version =~ /^2./
87
87
  setting = "cluster.routing.allocation.enable"
88
88
  value = case command
89
89
  when 'enable'
@@ -173,9 +173,10 @@ module Elastomer
173
173
  # ["storage1", "storage2"]
174
174
  #
175
175
  def normalized_node_names
176
- ary = node_names.map {|name| name.split("-")}
176
+ names = node_names
177
+ return names if node_names.length == 1
177
178
 
178
- names = []
179
+ ary = node_names.map {|name| name.split("-")}
179
180
 
180
181
  ary.first.length.times do |col|
181
182
  name_part = ary.map {|row| row[col]}
@@ -1,5 +1,5 @@
1
1
  module Elastomer
2
2
  module CLI
3
- VERSION = "0.3.4"
3
+ VERSION = "0.3.6"
4
4
  end
5
5
  end
@@ -13,9 +13,12 @@ describe Elastomer::CLI::Shard do
13
13
  it 'should normalize node names' do
14
14
  names = (1..4).map {|n| "githubsearch4-storage%d-cp1-prd" % n}
15
15
  @shard_stats = Elastomer::CLI::Shard.new
16
- @shard_stats.instance_variable_set(:@node_names, names)
17
16
 
17
+ @shard_stats.instance_variable_set(:@node_names, names)
18
18
  @shard_stats.normalized_node_names.must_equal %w[storage1 storage2 storage3 storage4]
19
+
20
+ @shard_stats.instance_variable_set(:@node_names, [names.at(2)])
21
+ @shard_stats.normalized_node_names.must_equal %w[githubsearch4-storage3-cp1-prd]
19
22
  end
20
23
  end
21
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastomer-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Rodgers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-28 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  version: '0'
190
190
  requirements: []
191
191
  rubyforge_project:
192
- rubygems_version: 2.2.3
192
+ rubygems_version: 2.5.1
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: Command line interface for elastomer
@@ -210,4 +210,3 @@ test_files:
210
210
  - test/shard_test.rb
211
211
  - test/snapshot_test.rb
212
212
  - test/test_helper.rb
213
- has_rdoc: