elastomer-cli 0.3.2 → 0.3.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64e98a9d878459f9d8477cf8451557dcbbc77aa4
|
4
|
+
data.tar.gz: 25367062a2626564c53c671327cc140b6cd047fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e37f1b581854a6d9d3551674d912ffaeef8b667dac961e684a820bb8420d996272e065ce5660cdaf9eaa218e06a7e91c0813c06a8448183880c6919a3090b081
|
7
|
+
data.tar.gz: 5589afcaa5c83a5531f16d7ce4ae36e7c6038d2c7d5ea599da17ba8625caeb4ce6505c4a8020cfe6c28dc617fe3f6467b9fe17fb89f2754f2b6064ce942cf60c
|
data/CHANGELOG.md
CHANGED
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/
|
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 "
|
21
|
-
|
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
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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
|
-
|
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,10 +1,10 @@
|
|
1
1
|
require File.expand_path('../test_helper', __FILE__)
|
2
2
|
|
3
|
-
describe Elastomer::CLI::
|
4
|
-
describe '
|
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 '
|
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.
|
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/
|
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/
|
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/
|
210
|
+
- test/shard_test.rb
|
211
211
|
- test/snapshot_test.rb
|
212
212
|
- test/test_helper.rb
|
213
213
|
has_rdoc:
|