elastomer-cli 0.3.2 → 0.3.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
  SHA1:
3
- metadata.gz: 772a6ed6f013c952c66223437cd17fc820cacbe4
4
- data.tar.gz: c8f8346f6209a636e714652792d2679f9c29debb
3
+ metadata.gz: 64e98a9d878459f9d8477cf8451557dcbbc77aa4
4
+ data.tar.gz: 25367062a2626564c53c671327cc140b6cd047fb
5
5
  SHA512:
6
- metadata.gz: 6c2ff9ada4ac6515f836f36415a61e9316bdc9785a6827f67ca42f09e6399a72659cb026b534e3b91f05c67b1eddf2a1360dcbfbf6c290a2e843fac71152fba0
7
- data.tar.gz: fb7ed301f832fea0378f085945c986102886ce0fa5af4215a16fe9c3df82559a6d301d1ef57abb0331037790868af71c8b2448ae1d0bff2cab0a01cbae82a2ca
6
+ metadata.gz: e37f1b581854a6d9d3551674d912ffaeef8b667dac961e684a820bb8420d996272e065ce5660cdaf9eaa218e06a7e91c0813c06a8448183880c6919a3090b081
7
+ data.tar.gz: 5589afcaa5c83a5531f16d7ce4ae36e7c6038d2c7d5ea599da17ba8625caeb4ce6505c4a8020cfe6c28dc617fe3f6467b9fe17fb89f2754f2b6064ce942cf60c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.3.3 (2015-10-27)
2
+ - Moved `shard_stats` to subcommand `shard stats`
3
+
1
4
  ## 0.3.2 (2015-10-27)
2
5
  - New command `shard_stats`
3
6
 
data/lib/elastomer/cli.rb CHANGED
@@ -8,7 +8,7 @@ require 'elastomer/cli/base'
8
8
  require 'elastomer/cli/cluster'
9
9
  require 'elastomer/cli/node'
10
10
  require 'elastomer/cli/index'
11
- require 'elastomer/cli/shard_stats'
11
+ require 'elastomer/cli/shard'
12
12
  require 'elastomer/cli/repository'
13
13
  require 'elastomer/cli/snapshot'
14
14
 
@@ -17,10 +17,8 @@ module Elastomer
17
17
  desc "snapshot SUBCOMMAND ...ARGS", "execute snapshot commands"
18
18
  subcommand "snapshot", Snapshot
19
19
 
20
- desc "shard_stats", "show shard count and disk usage for all indices across all nodes"
21
- def shard_stats
22
- puts ShardStats.table
23
- end
20
+ desc "shard SUBCOMMAND ...ARGS", "execute shard commands"
21
+ subcommand "shard", Shard
24
22
 
25
23
  desc "cat [COMMAND] [SCOPE] ...ARGS", "access the ES cat api"
26
24
  long_desc <<-LONGDESC
@@ -1,12 +1,13 @@
1
1
  module Elastomer
2
2
  module CLI
3
- class ShardStats < Base
4
- no_commands do
5
- def self.table
6
- self.new.table
7
- end
3
+ class Shard < Base
4
+ desc "stats", "show shard count and disk usage for all indices across all nodes"
5
+ def stats
6
+ puts stats_table
7
+ end
8
8
 
9
- def table
9
+ no_commands do
10
+ def stats_table
10
11
  Terminal::Table.new do |table|
11
12
  table << node_names.dup.unshift(nil)
12
13
  table << generate_row("total", node_data)
@@ -1,5 +1,5 @@
1
1
  module Elastomer
2
2
  module CLI
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
@@ -1,10 +1,10 @@
1
1
  require File.expand_path('../test_helper', __FILE__)
2
2
 
3
- describe Elastomer::CLI::ShardStats do
4
- describe 'shard_stats' do
3
+ describe Elastomer::CLI::Shard do
4
+ describe 'shard stats' do
5
5
  it 'should show shard stats' do
6
6
  VCR.use_cassette('default') do
7
- elastomer 'shard_stats'
7
+ elastomer 'shard stats'
8
8
  @out.must_match /total.*12/m
9
9
  @out.must_match /audit_log/m
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastomer-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Rodgers
@@ -146,7 +146,7 @@ files:
146
146
  - lib/elastomer/cli/index.rb
147
147
  - lib/elastomer/cli/node.rb
148
148
  - lib/elastomer/cli/repository.rb
149
- - lib/elastomer/cli/shard_stats.rb
149
+ - lib/elastomer/cli/shard.rb
150
150
  - lib/elastomer/cli/snapshot.rb
151
151
  - lib/elastomer/cli/version.rb
152
152
  - script/bootstrap
@@ -166,7 +166,7 @@ files:
166
166
  - test/index_test.rb
167
167
  - test/node_test.rb
168
168
  - test/repository_test.rb
169
- - test/shard_stats_test.rb
169
+ - test/shard_test.rb
170
170
  - test/snapshot_test.rb
171
171
  - test/test_helper.rb
172
172
  homepage: https://github.com/github/elastomer-cli
@@ -207,7 +207,7 @@ test_files:
207
207
  - test/index_test.rb
208
208
  - test/node_test.rb
209
209
  - test/repository_test.rb
210
- - test/shard_stats_test.rb
210
+ - test/shard_test.rb
211
211
  - test/snapshot_test.rb
212
212
  - test/test_helper.rb
213
213
  has_rdoc: