wavefront-cli 6.0.0 → 6.1.0

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
  SHA256:
3
- metadata.gz: 99fe3332878acc67af828d3ab48a10f585c6166c6a350357a22d732695ff5b93
4
- data.tar.gz: bc3fc9708705d8bf4a8706daf8d24a8dd6882b71d3690843b3a58bb1d3772b65
3
+ metadata.gz: 1d0fa52b33cb79a4b67bcb7054e9a998584630efc8318962b85e929029391af5
4
+ data.tar.gz: 9c5151b963d5cb5931b3c8d868e568f951a56de590a72d9277048ae36de3b086
5
5
  SHA512:
6
- metadata.gz: a56fdece8a0122f64e076cdfa7846b698777a77528810d3ea6dc7d6b24febed750340fa8d717ae939af936f371de13a64fba3b076992e6b69403c75c1f32f841
7
- data.tar.gz: 2a3eeb43b52d61315e4ef6bbf6e6d80c0995a625b5d9a7233628011cbd4599dfc3602106e2d1e6bc628c571147d3e330fe3dc4819faa223e46d2943f732049f6
6
+ metadata.gz: dd09d2f689141ab55e41cc8ec2e234b5e06c7e79f497587026f43acee11b624c8b06d436004d27fcb861c0b89731fa9f736c0c0490ca60e8ef20ec3de7612b40
7
+ data.tar.gz: f76f25fe45d6042e0800c658c482115658a122f56781c2b37835da1b2529a602c4f932f60fefd4f79fc1a91305619bfc82b0cf7c750986e7968ec823a69e6025
@@ -1,11 +1,14 @@
1
1
  ---
2
2
 
3
3
  AllCops:
4
- TargetRubyVersion: 2.3
4
+ TargetRubyVersion: 2.4
5
5
 
6
6
  Metrics/ClassLength:
7
7
  Max: 400
8
8
 
9
+ Style/IfUnlessModifier:
10
+ Enabled: false # because it wants to make lines >80 chars
11
+
9
12
  Style/HashEachMethods:
10
13
  Enabled: true
11
14
  Style/HashTransformKeys:
data/HISTORY.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.1.0 (2020-06-02)
4
+ * Add `-A` flag to `proxy list` command, to only list active proxies
5
+
3
6
  ## 6.0.0 (2020-04-07)
4
7
  * Remove `cluster` command. (Breaking change.)
5
8
 
@@ -10,7 +10,7 @@ class WavefrontCommandProxy < WavefrontCommandBase
10
10
  end
11
11
 
12
12
  def _commands
13
- ["list #{CMN} [-al] [-O fields] [-o offset] [-L limit]",
13
+ ["list #{CMN} [-laA] [-O fields] [-o offset] [-L limit]",
14
14
  "describe #{CMN} <id>",
15
15
  "delete #{CMN} <id>",
16
16
  "undelete #{CMN} <id>",
@@ -23,6 +23,7 @@ class WavefrontCommandProxy < WavefrontCommandBase
23
23
  [common_options,
24
24
  "-l, --long list #{things} in detail",
25
25
  "-a, --all list all #{things}",
26
+ "-A, --active only show active #{things}",
26
27
  "-o, --offset=n start from nth #{thing}",
27
28
  '-O, --fields=F1,F2,... only show given fields',
28
29
  "-L, --limit=COUNT number of #{things} to list"]
@@ -7,6 +7,16 @@ module WavefrontDisplay
7
7
  # Format human-readable output for proxies.
8
8
  #
9
9
  class Proxy < Base
10
+ def do_list
11
+ filter_inactive_proxies! if options[:active]
12
+ super
13
+ end
14
+
15
+ def do_list_brief
16
+ filter_inactive_proxies! if options[:active]
17
+ super
18
+ end
19
+
10
20
  def do_describe
11
21
  readable_time(:lastCheckInTime)
12
22
  long_output
@@ -15,5 +25,11 @@ module WavefrontDisplay
15
25
  def do_versions
16
26
  multicolumn(:id, :version, :name)
17
27
  end
28
+
29
+ private
30
+
31
+ def filter_inactive_proxies!
32
+ data.delete_if { |p| p[:status] != 'ACTIVE' }
33
+ end
18
34
  end
19
35
  end
@@ -7,6 +7,11 @@ module WavefrontCli
7
7
  # CLI coverage for the v2 'proxy' API.
8
8
  #
9
9
  class Proxy < WavefrontCli::Base
10
+ def do_list
11
+ options[:all] = true if options[:active]
12
+ super
13
+ end
14
+
10
15
  def no_api_response
11
16
  %w[do_versions]
12
17
  end
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- WF_CLI_VERSION = '6.0.0'
3
+ WF_CLI_VERSION = '6.1.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wavefront-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Fisher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-07 00:00:00.000000000 Z
11
+ date: 2020-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt