wavefront-cli 9.0.0 → 10.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/release.yml +2 -2
  3. data/.github/workflows/test.yml +1 -1
  4. data/.rubocop.yml +1 -1
  5. data/Gemfile +10 -0
  6. data/HISTORY.md +9 -1
  7. data/README.md +2 -2
  8. data/lib/wavefront-cli/base.rb +3 -3
  9. data/lib/wavefront-cli/commands/base.rb +3 -1
  10. data/lib/wavefront-cli/commands/config.rb +3 -7
  11. data/lib/wavefront-cli/config.rb +28 -32
  12. data/lib/wavefront-cli/constants.rb +1 -1
  13. data/lib/wavefront-cli/display/base.rb +2 -2
  14. data/lib/wavefront-cli/display/cluster.rb +21 -0
  15. data/lib/wavefront-cli/display/printer/long.rb +0 -4
  16. data/lib/wavefront-cli/exception_handler.rb +4 -0
  17. data/lib/wavefront-cli/maintenancewindow.rb +1 -1
  18. data/lib/wavefront-cli/output/csv/query.rb +1 -1
  19. data/lib/wavefront-cli/output/hcl/base.rb +4 -4
  20. data/lib/wavefront-cli/output/hcl/dashboard.rb +1 -1
  21. data/lib/wavefront-cli/stdlib/array.rb +1 -1
  22. data/lib/wavefront-cli/stdlib/string.rb +1 -1
  23. data/lib/wavefront-cli/version.rb +1 -1
  24. data/lib/wavefront-cli/write.rb +6 -3
  25. data/spec/constants.rb +1 -1
  26. data/spec/support/command_base.rb +1 -1
  27. data/spec/wavefront-cli/base_spec.rb +1 -1
  28. data/spec/wavefront-cli/commands/base_spec.rb +1 -1
  29. data/spec/wavefront-cli/commands/config_spec.rb +4 -4
  30. data/spec/wavefront-cli/config_spec.rb +81 -41
  31. data/spec/wavefront-cli/controller_spec.rb +2 -2
  32. data/spec/wavefront-cli/display/base_spec.rb +1 -1
  33. data/spec/wavefront-cli/display/printer/long_spec.rb +1 -1
  34. data/spec/wavefront-cli/display/printer/terse_spec.rb +1 -1
  35. data/spec/wavefront-cli/event_store_spec.rb +1 -1
  36. data/spec/wavefront-cli/opt_handler_spec.rb +1 -1
  37. data/spec/wavefront-cli/output/csv/query_spec.rb +1 -1
  38. data/spec/wavefront-cli/output/csv_spec.rb +1 -1
  39. data/spec/wavefront-cli/output/hcl_spec.rb +1 -1
  40. data/spec/wavefront-cli/output/json_spec.rb +1 -1
  41. data/spec/wavefront-cli/output/ruby_spec.rb +1 -1
  42. data/spec/wavefront-cli/output/wavefront/query_spec.rb +1 -1
  43. data/spec/wavefront-cli/output/wavefront_spec.rb +1 -1
  44. data/spec/wavefront-cli/output/yaml_spec.rb +1 -1
  45. data/spec/wavefront-cli/query_spec.rb +1 -1
  46. data/spec/wavefront-cli/stdlib/array_spec.rb +1 -1
  47. data/spec/wavefront-cli/stdlib/string_spec.rb +1 -1
  48. data/spec/wavefront-cli/usage_spec.rb +1 -1
  49. data/spec/wavefront-cli/write_class_spec.rb +1 -1
  50. data/wavefront-cli.gemspec +2 -12
  51. metadata +7 -132
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1040d65b6cf4352d960ff941f05f3bd5e924a4ebc13d1a0cff48c8920f1b426a
4
- data.tar.gz: 841d25680790e0c8cf8623d09fc6bc6720c725f7b415f7342263d9e66501eb02
3
+ metadata.gz: e3cc375202509fd2afb294abeb754c14be541d80595995ccea9f0ac3a2a2c2b5
4
+ data.tar.gz: 6161a91e6dc4bce5c5581ddeb272f104d57049d2b230ecb2d3edad9975eae7e6
5
5
  SHA512:
6
- metadata.gz: 120360b39776bd3711df4bd455cc4785d880447fc33c625ce5b30d9a69f29f51717f5133be78af65657f424d31188fc69afe8183d72cf8d88717cd20825922aa
7
- data.tar.gz: 452d2d4e951dfeb02ca1a104fab5401feaaf8a9f3c7b1e649afb3eaebe3e5307f47fb0273cefc947de0e0fd655c761eee0e25bea5289279b7132458f071f6cf6
6
+ metadata.gz: e2f3cb2a9492934c12e18784b79551ccbb33d4b5adb0991b75eab1cd0a3e84031574449894dc465f93d390faf069d8b1851beaee92be778431cb168c2aa01e82
7
+ data.tar.gz: b4b4f79d6d866b223551cffbab943cd059fd54270d66148ff1932bc45bb80e1a85a3c2557446268f384a4ffaa4cfe67a7ad23b2d6886b539978e0c5cd540ab03
@@ -15,10 +15,10 @@ jobs:
15
15
  - name: Set env
16
16
  run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
17
17
 
18
- - name: Set up Ruby 3.0
18
+ - name: Set up Ruby 3.2
19
19
  uses: ruby/setup-ruby@v1
20
20
  with:
21
- ruby-version: 3.0
21
+ ruby-version: 3.2
22
22
  - run: bundle install
23
23
 
24
24
  - name: Run tests
@@ -9,7 +9,7 @@ jobs:
9
9
  runs-on: ubuntu-latest
10
10
  strategy:
11
11
  matrix:
12
- ruby-version: [2.7.7, 3.1.3, 3.2.0]
12
+ ruby-version: [3.0, 3.1, 3.2, 3.3]
13
13
  steps:
14
14
  - uses: actions/checkout@v3
15
15
  - name: Set up Ruby
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  AllCops:
3
- TargetRubyVersion: 2.7
3
+ TargetRubyVersion: 3.0
4
4
  NewCops: enable
5
5
 
6
6
  require:
data/Gemfile CHANGED
@@ -2,3 +2,13 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
  gemspec
5
+
6
+ gem 'minitest', '~> 5.21', group: :development
7
+ gem 'rake', '~> 13.0', group: :development
8
+ gem 'rubocop', '~> 1.60', group: :development
9
+ gem 'rubocop-minitest', '~> 0.26', group: :development
10
+ gem 'rubocop-performance', '~> 1.15', group: :development
11
+ gem 'rubocop-rake', '~> 0.6', group: :development
12
+ gem 'spy', '~> 1.0', group: :development
13
+ gem 'webmock', '~> 3.20.0', group: :development
14
+ gem 'yard', '~> 0.9', group: :development
data/HISTORY.md CHANGED
@@ -1,7 +1,15 @@
1
1
  # Changelog
2
2
 
3
- ## 9.0.0 (2023-01-20)
3
+ ## 10.0.1 (2024-04-07)
4
+ * Fix "no status in API response" bug when sending stdin data to API.
5
+
6
+ ## 10.0.0 (2024-01-19)
7
+ * Remove support for Ruby < 3.0 (Breaking change.)
8
+ * Fix HTTP proxy write bug by bumping SDK dependency.
9
+ * Add `config cluster` command.
10
+ * Revamp `config` command internals and improve tests.
4
11
 
12
+ ## 9.0.0 (2023-01-20)
5
13
  * Drop support for Ruby 2.5. (Breaking change.)
6
14
  * Drop support for Ruby 2.6. (Breaking change.)
7
15
  * Add `metricspolicy` command.
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Wavefront CLI
2
- [![Test](https://github.com/snltd/wavefront-cli/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/snltd/wavefront-cli/actions/workflows/test.yml) ![Release](https://github.com/snltd/wavefront-sdk/workflows/Release/badge.svg) [![Maintainability](https://api.codeclimate.com/v1/badges/9b712047af0b2dafc146/maintainability)](https://codeclimate.com/github/snltd/wavefront-cli/maintainability) [![Gem Version](https://badge.fury.io/rb/wavefront-cli.svg)](https://badge.fury.io/rb/wavefront-cli) ![](http://ruby-gem-downloads-badge.herokuapp.com/wavefront-cli?type=total)
2
+ [![Test](https://github.com/snltd/wavefront-cli/actions/workflows/test.yml/badge.svg)](https://github.com/snltd/wavefront-cli/actions/workflows/test.yml) ![Release](https://github.com/snltd/wavefront-sdk/workflows/Release/badge.svg) [![Gem Version](https://badge.fury.io/rb/wavefront-cli.svg)](https://badge.fury.io/rb/wavefront-cli) ![](http://ruby-gem-downloads-badge.herokuapp.com/wavefront-cli?type=total)
3
3
 
4
4
  This is a complete command-line interface to
5
5
  [Wavefront](https://www.wavefront.com/)'s API. It also provides easy
@@ -15,7 +15,7 @@ $ gem install wavefront-cli
15
15
 
16
16
  It is built on [our Wavefront Ruby
17
17
  SDK](https://github.com/snltd/wavefront-sdk) and requires Ruby >=
18
- 2.7. It has no "native extension" dependencies.
18
+ 3.0. It has no "native extension" dependencies.
19
19
 
20
20
  For a far more comprehensive overview/tutorial, please read [this
21
21
  article](https://sysdef.xyz/article/wavefront-cli).
@@ -49,7 +49,7 @@ module WavefrontCli
49
49
  # Overriding this method lets you map to something else.
50
50
  #
51
51
  def _sdk_class
52
- self.class.name.sub(/Cli/, '')
52
+ self.class.name.sub('Cli', '')
53
53
  end
54
54
 
55
55
  # Some subcommands don't make an API call, so they don't return
@@ -85,7 +85,7 @@ module WavefrontCli
85
85
  # that, override this method.
86
86
  #
87
87
  def validator_method
88
- "wf_#{klass_word}_id?".to_sym
88
+ :"wf_#{klass_word}_id?"
89
89
  end
90
90
 
91
91
  def validator_exception
@@ -246,7 +246,7 @@ module WavefrontCli
246
246
 
247
247
  def check_response_blocks(data)
248
248
  %i[status response].each do |b|
249
- abort "no #{b} block in API response" unless data.respond_to?(b)
249
+ abort "No #{b} block in API response" unless data.respond_to?(b)
250
250
  end
251
251
  end
252
252
 
@@ -72,7 +72,7 @@ class WavefrontCommandBase
72
72
  # @return [String] the command keyword
73
73
  #
74
74
  def word
75
- self.class.name.sub(/WavefrontCommand/, '').downcase
75
+ self.class.name.sub('WavefrontCommand', '').downcase
76
76
  end
77
77
 
78
78
  def thing
@@ -143,10 +143,12 @@ class WavefrontCommandBase
143
143
  # columns. This is used to indent following lines
144
144
  # @param term_width [Integer] the width of the user's terminal
145
145
  #
146
+ # rubocop:disable Lint/FormatParameterMismatch
146
147
  def opt_row(opt_str, width, term_width = TW)
147
148
  format(" %s %-#{width}s %s",
148
149
  *opt_str.split(/\s+/, 3)).opt_fold(term_width, width + 5)
149
150
  end
151
+ # rubocop:enable Lint/FormatParameterMismatch
150
152
 
151
153
  # @return [Integer] the width of the column containing short and
152
154
  # long options
@@ -6,7 +6,7 @@ require_relative 'base'
6
6
  #
7
7
  class WavefrontCommandConfig < WavefrontCommandBase
8
8
  def description
9
- 'create and manage local configuration'
9
+ 'create and manage local configuration, and display debug info'
10
10
  end
11
11
 
12
12
  def _commands
@@ -16,15 +16,11 @@ class WavefrontCommandConfig < WavefrontCommandBase
16
16
  'setup [-D] [-c file] [<profile>]',
17
17
  'delete [-D] [-c file] <profile>',
18
18
  'envvars',
19
+ "cluster #{CMN}",
19
20
  'about']
20
21
  end
21
22
 
22
23
  def _options
23
- ['-c, --config=FILE path to configuration file',
24
- '-D, --debug enable debug mode']
25
- end
26
-
27
- def global_options
28
- []
24
+ [common_options]
29
25
  end
30
26
  end
@@ -6,11 +6,7 @@ require_relative 'base'
6
6
 
7
7
  module WavefrontCli
8
8
  #
9
- # Create and manage a local configuration file. This class doesn't
10
- # fit many of the assumptions made by the Base class. (Primarily,
11
- # that it will consume the SDK.) Rather than split everything up,
12
- # we're going to do some bad programming and override a couple of
13
- # methods in the parent class to force different behaviour.
9
+ # Create and manage a local configuration file.
14
10
  #
15
11
  class Config < WavefrontCli::Base
16
12
  attr_reader :config_file, :profile
@@ -34,41 +30,39 @@ module WavefrontCli
34
30
  test: proc { |v| %w[human json yaml].include?(v) } }
35
31
  ].freeze
36
32
 
37
- RX = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/.freeze
33
+ RX = /^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/
38
34
 
39
- # rubocop:disable Lint/MissingSuper
40
- def initialize(options)
41
- @options = options
35
+ def post_initialize(options)
42
36
  @config_file = _config_file
43
37
  @profile = options[:'<profile>'] || 'default'
44
38
  end
45
- # rubocop:enable Lint/MissingSuper
39
+
40
+ def _sdk_class
41
+ 'Wavefront::Cluster'
42
+ end
46
43
 
47
44
  def do_location
48
- puts config_file
45
+ config_file
49
46
  end
50
47
 
51
48
  def do_profiles
52
- read_config.sections.each { |s| puts s }
49
+ read_config.sections.sort
53
50
  end
54
51
 
55
52
  def do_show
56
53
  present?
57
- puts File.read(config_file)
54
+ File.read(config_file)
58
55
  end
59
56
 
60
57
  def do_about
61
58
  require 'wavefront-sdk/defs/version'
62
- require_relative 'display/base'
63
59
 
64
- info = { 'wf version': WF_CLI_VERSION,
65
- 'wf path': CMD_PATH.realpath.to_s,
66
- 'SDK version': WF_SDK_VERSION,
67
- 'SDK location': WF_SDK_LOCATION.to_s,
68
- 'Ruby version': RUBY_VERSION,
69
- 'Ruby platform': Gem::Platform.local.os.capitalize }
70
-
71
- WavefrontDisplay::Base.new(info).long_output
60
+ { 'wf version': WF_CLI_VERSION,
61
+ 'wf path': CMD_PATH.realpath.to_s,
62
+ 'SDK version': WF_SDK_VERSION,
63
+ 'SDK location': WF_SDK_LOCATION.to_s,
64
+ 'Ruby version': RUBY_VERSION,
65
+ 'Ruby platform': Gem::Platform.local.os.capitalize }
72
66
  end
73
67
 
74
68
  def base_config
@@ -121,21 +115,23 @@ module WavefrontCli
121
115
  end
122
116
 
123
117
  def do_envvars
124
- %w[WAVEFRONT_ENDPOINT WAVEFRONT_TOKEN WAVEFRONT_PROXY].each do |v|
125
- puts format('%-20<var>s %<value>s',
126
- var: v,
127
- value: ENV[v] || 'unset')
118
+ %w[WAVEFRONT_ENDPOINT WAVEFRONT_TOKEN WAVEFRONT_PROXY].map do |v|
119
+ format('%-20<var>s %<value>s', var: v, value: ENV[v] || 'unset')
128
120
  end
129
121
  end
130
122
 
131
- def validate_opts; end
123
+ def do_cluster
124
+ wf.describe
125
+ end
132
126
 
133
- def display(_data, _method); end
127
+ def validate_opts; end
134
128
 
135
- def run
136
- dispatch
129
+ def no_api_response
130
+ %w[do_location do_profiles do_show do_envvars do_about]
137
131
  end
138
132
 
133
+ # def display(_data, _method); end
134
+
139
135
  def input_prompt(label, default)
140
136
  ret = format(' %<label>s', label: label)
141
137
  ret << format(' [%<value>s]', value: default) unless default.nil?
@@ -156,10 +152,10 @@ module WavefrontCli
156
152
  #
157
153
  def read_thing(thing)
158
154
  print input_prompt(thing[:text], thing[:default])
159
- validate_input(read_input, thing[:default], thing[:test])
155
+ validate_thing_input(read_input, thing[:default], thing[:test])
160
156
  end
161
157
 
162
- def validate_input(input, default, test)
158
+ def validate_thing_input(input, default, test)
163
159
  if input.empty?
164
160
  raise WavefrontCli::Exception::MandatoryValue if default.nil?
165
161
 
@@ -29,7 +29,7 @@ module WavefrontCli
29
29
 
30
30
  # Split regex for searches
31
31
  #
32
- SEARCH_SPLIT = /\^|!\^|=|!=|~|!~/.freeze
32
+ SEARCH_SPLIT = /\^|!\^|=|!=|~|!~/
33
33
 
34
34
  # Where we store local event information
35
35
  #
@@ -45,8 +45,8 @@ module WavefrontDisplay
45
45
  run_list
46
46
  elsif method == 'do_search'
47
47
  run_search
48
- elsif respond_to?("#{method}_brief") && !options[:long]
49
- send("#{method}_brief")
48
+ elsif respond_to?(:"#{method}_brief") && !options[:long]
49
+ send(:"#{method}_brief")
50
50
  elsif respond_to?(method)
51
51
  send(method)
52
52
  else
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'base'
4
+
5
+ module WavefrontDisplay
6
+ #
7
+ # Format human-readable output for config commands.
8
+ #
9
+ class Cluster < Base
10
+ def do_location
11
+ puts data
12
+ end
13
+ alias do_profiles do_location
14
+ alias do_show do_location
15
+ alias do_envvars do_location
16
+
17
+ def do_about
18
+ long_output
19
+ end
20
+ end
21
+ end
@@ -77,7 +77,6 @@ module WavefrontDisplayPrinter
77
77
  #
78
78
  # Make an array of hashes: { key, value, depth }
79
79
  #
80
- # rubocop:disable Style/CaseLikeIf
81
80
  def make_list(data, aggr = [], depth = 0, last_key = nil)
82
81
  if data.is_a?(Hash)
83
82
  append_hash(data, aggr, depth)
@@ -87,7 +86,6 @@ module WavefrontDisplayPrinter
87
86
  aggr << ['', preened_value(data), depth]
88
87
  end
89
88
  end
90
- # rubocop:enable Style/CaseLikeIf
91
89
 
92
90
  def smart_value(val)
93
91
  val.to_s.empty? && opts[:none] ? '<none>' : preened_value(val)
@@ -152,7 +150,6 @@ module WavefrontDisplayPrinter
152
150
  # @param depth [Integer]
153
151
  # @return [Array[Array]]
154
152
  #
155
- # rubocop:disable Style/CaseLikeIf
156
153
  def append_hash(data, aggr, depth)
157
154
  data.each_pair do |k, v|
158
155
  if v.is_a?(Hash)
@@ -166,7 +163,6 @@ module WavefrontDisplayPrinter
166
163
 
167
164
  aggr
168
165
  end
169
- # rubocop:enable Style/CaseLikeIf
170
166
 
171
167
  # Part of the #make_list recursion. Deals with arrays.
172
168
  #
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'faraday'
4
+
3
5
  module WavefrontCli
4
6
  #
5
7
  # Handle fatal errors.
@@ -80,6 +82,8 @@ module WavefrontCli
80
82
  abort 'Search on non-existent key. Please use a top-level field.'
81
83
  when Wavefront::Exception::InvalidSamplingValue
82
84
  abort 'Sampling rates must be between 0 and 0.05.'
85
+ when Faraday::ConnectionFailed
86
+ abort 'Error connecting to remote host.'
83
87
  else
84
88
  warn "general error: #{exception}"
85
89
  backtrace_message(exception)
@@ -27,7 +27,7 @@ module WavefrontCli
27
27
 
28
28
  [%i[CustomerTags atag], %i[HostTags htag],
29
29
  %i[HostNames host]].each do |key, opt|
30
- k = "relevant#{key}".to_sym
30
+ k = :"relevant#{key}"
31
31
  body[k] = options[opt] unless options[opt].empty?
32
32
  end
33
33
 
@@ -92,7 +92,7 @@ module WavefrontCsvOutput
92
92
  end
93
93
 
94
94
  def quote_value(value)
95
- format('"%<value>s"', value: value.to_s.gsub(/"/, '\"'))
95
+ format('"%<value>s"', value: value.to_s.gsub('"', '\"'))
96
96
  end
97
97
 
98
98
  # Turn a string of output options into an easy-to-query array
@@ -61,9 +61,9 @@ module WavefrontHclOutput
61
61
  # @return [String]
62
62
  #
63
63
  def handler(key, val)
64
- key_handler = "khandle_#{key}".to_sym
65
- value_handler = "vhandle_#{key}".to_sym
66
- quote_handler = "qhandle_#{key}".to_sym
64
+ key_handler = :"khandle_#{key}"
65
+ value_handler = :"vhandle_#{key}"
66
+ quote_handler = :"qhandle_#{key}"
67
67
  key = send(key_handler) if respond_to?(key_handler)
68
68
  val = send(value_handler, val) if respond_to?(value_handler)
69
69
 
@@ -92,7 +92,7 @@ module WavefrontHclOutput
92
92
  def quote_value(val)
93
93
  case val.class.to_s.to_sym
94
94
  when :String
95
- format('"%<value>s"', value: val.gsub(/"/, '\"'))
95
+ format('"%<value>s"', value: val.gsub('"', '\"'))
96
96
  else
97
97
  val
98
98
  end
@@ -91,7 +91,7 @@ module WavefrontHclOutput
91
91
  end
92
92
 
93
93
  def quote_value(val)
94
- val.gsub!(/\$/, '$$') if val.is_a?(String)
94
+ val.gsub!('$', '$$') if val.is_a?(String)
95
95
  super
96
96
  end
97
97
  end
@@ -9,7 +9,7 @@ class Array
9
9
  def max_length
10
10
  return 0 if empty?
11
11
 
12
- map(&:to_s).map(&:length).max
12
+ map { |x| x.to_s.length }.max
13
13
  end
14
14
 
15
15
  # @return [Integer] the length of the longest value in an array of
@@ -35,7 +35,7 @@ class String
35
35
  # @return [String] the folded line
36
36
  #
37
37
  def fold(twidth = TW, indent = 10, prefix = '')
38
- chunks = gsub(/default: /, 'default:^').scan_line(twidth - 8)
38
+ chunks = gsub('default: ', 'default:^').scan_line(twidth - 8)
39
39
  first_line = format("%<padding>s%<text>s\n",
40
40
  padding: prefix,
41
41
  text: chunks.shift)
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- WF_CLI_VERSION = '9.0.0'
3
+ WF_CLI_VERSION = '10.0.1'
@@ -11,7 +11,7 @@ module WavefrontCli
11
11
  attr_reader :fmt
12
12
 
13
13
  include Wavefront::Mixins
14
- SPLIT_PATTERN = /\s(?=(?:[^"]|"[^"]*")*$)/.freeze
14
+ SPLIT_PATTERN = /\s(?=(?:[^"]|"[^"]*")*$)/
15
15
 
16
16
  # rubocop:disable Metrics/AbcSize
17
17
  def do_point(value = options[:'<value>'])
@@ -187,8 +187,11 @@ module WavefrontCli
187
187
  #
188
188
  def read_stdin
189
189
  open_connection
190
- $stdin.each_line { |l| call_write(process_line(l.strip), false) }
190
+ ret = $stdin.each_line.map do |l|
191
+ call_write(process_line(l.strip), false)
192
+ end
191
193
  close_connection
194
+ ret.last
192
195
  rescue SystemExit, Interrupt
193
196
  puts 'ctrl-c. Exiting.'
194
197
  wf.close
@@ -235,7 +238,7 @@ module WavefrontCli
235
238
  #
236
239
  def extract_ts(chunks)
237
240
  ts = chunks[fmt.index('t')]
238
- return parse_time(ts) if valid_timestamp?(ts)
241
+ parse_time(ts) if valid_timestamp?(ts)
239
242
  rescue TypeError
240
243
  Time.now.utc.to_i
241
244
  end
data/spec/constants.rb CHANGED
@@ -14,7 +14,7 @@ ENDPOINT = 'metrics.wavefront.com'
14
14
  TOKEN = '0123456789-ABCDEF'
15
15
  RES_DIR = ROOT.join('spec', 'wavefront-cli', 'resources')
16
16
  CF = RES_DIR.join('wavefront.conf')
17
- CF_VAL = IniFile.load(CF)
17
+ CF_VAL = IniFile.load(CF)
18
18
  JSON_POST_HEADERS = { 'Content-Type': 'application/json',
19
19
  Accept: 'application/json' }.freeze
20
20
  TEE_ZERO = Time.now.freeze
@@ -8,7 +8,7 @@ require_relative '../../lib/wavefront-cli/controller'
8
8
  # An abstract class which facilitates "end-to-end" testing of
9
9
  # commands.
10
10
  #
11
- class EndToEndTest < MiniTest::Test
11
+ class EndToEndTest < Minitest::Test
12
12
  attr_accessor :single_perm
13
13
  attr_reader :wf
14
14
 
@@ -12,7 +12,7 @@ require_relative '../../lib/wavefront-cli/version'
12
12
  # class via an instantiation of a concrete class. I don't think any
13
13
  # of this matters.
14
14
  #
15
- class WavefrontCliBaseTest < MiniTest::Test
15
+ class WavefrontCliBaseTest < Minitest::Test
16
16
  attr_reader :wf, :wf_cmd
17
17
 
18
18
  def setup
@@ -8,7 +8,7 @@ require_relative '../../../lib/wavefront-cli/commands/base'
8
8
 
9
9
  # Abstract class for testing commands
10
10
  #
11
- class WavefrontCommmandBaseTest < MiniTest::Test
11
+ class WavefrontCommmandBaseTest < Minitest::Test
12
12
  attr_reader :wf, :col_width, :skip_cmd
13
13
 
14
14
  def setup
@@ -13,11 +13,11 @@ require_relative 'base_spec'
13
13
  class WavefrontCommmandConfigTest < WavefrontCommmandBaseTest
14
14
  def setup
15
15
  @wf = WavefrontCommandConfig.new
16
- @col_width = 17
16
+ @col_width = 19
17
17
  end
18
18
 
19
19
  def test_options
20
- refute wf.options(600).start_with?("Global options:\n")
20
+ assert wf.options(600).start_with?("Global options:\n")
21
21
  assert_match(/Options:\n/, wf.options)
22
22
 
23
23
  wf.options(600).split("\n")[1..].each do |o|
@@ -28,7 +28,7 @@ class WavefrontCommmandConfigTest < WavefrontCommmandBaseTest
28
28
  refute o.end_with?('.')
29
29
  end
30
30
 
31
- assert_equal(wf.options.split("\n").count(&:empty?), 0)
31
+ assert_equal(wf.options.split("\n").count(&:empty?), 1)
32
32
  end
33
33
 
34
34
  def test_commands
@@ -45,7 +45,7 @@ class WavefrontCommmandConfigTest < WavefrontCommmandBaseTest
45
45
  def test_docopt
46
46
  x = wf.docopt
47
47
  assert x.start_with?("Usage:\n")
48
- refute_match("\nGlobal options:\n", x)
48
+ assert_match("\nGlobal options:\n", x)
49
49
  assert_match("--help\n", x)
50
50
  assert_instance_of(String, x)
51
51
  end
@@ -5,29 +5,32 @@ require 'pathname'
5
5
  require 'minitest/autorun'
6
6
  require_relative '../constants'
7
7
  require_relative '../../lib/wavefront-cli/config'
8
+ require_relative '../support/command_base'
8
9
 
9
10
  DEF_CF = Pathname.new(Dir.home).join('.wavefront')
10
11
  CONF_TMP = Pathname.new('/tmp/outfile')
12
+ CMD_PATH = Pathname.new(__FILE__)
11
13
 
12
14
  # Test CLI configuration command
13
15
  #
14
- class WavefrontCliConfigTest < MiniTest::Test
16
+ class WavefrontCliConfigTest < Minitest::Test
15
17
  attr_reader :wf, :wfo, :wfn
16
18
 
17
19
  def setup
20
+ blank_envvars
18
21
  @wf = WavefrontCli::Config.new({})
19
22
  @wfo = WavefrontCli::Config.new(config: CF)
20
23
  @wfn = WavefrontCli::Config.new(config: '/no/file')
21
24
  end
22
25
 
23
26
  def test_do_location
24
- assert_output(format("%<file>s\n", file: CF)) { wfo.do_location }
25
- assert_output("/no/file\n") { wfn.do_location }
26
- assert_output(format("%<file>s\n", file: DEF_CF)) { wf.do_location }
27
+ assert_equal(DEF_CF, wf.do_location)
28
+ assert_equal(Pathname('/no/file'), wfn.do_location)
29
+ assert_equal(CF, wfo.do_location)
27
30
  end
28
31
 
29
32
  def test_do_profiles
30
- assert_output("default\nother\n") { wfo.do_profiles }
33
+ assert_equal(%w[default other], wfo.do_profiles)
31
34
 
32
35
  assert_raises(WavefrontCli::Exception::ConfigFileNotFound) do
33
36
  wfn.do_profiles
@@ -35,10 +38,10 @@ class WavefrontCliConfigTest < MiniTest::Test
35
38
  end
36
39
 
37
40
  def test_do_show
38
- out, err = capture_io { wfo.do_show }
39
- assert_empty(err)
40
- assert out.start_with?("[default]\n")
41
- assert_equal(10, out.split("\n").size)
41
+ assert_equal(File.read(CF), wfo.do_show)
42
+ # assert_empty(err)
43
+ # assert out.start_with?("[default]\n")
44
+ # assert_equal(10, out.split("\n").size)
42
45
  end
43
46
 
44
47
  def test_input_prompt
@@ -72,23 +75,25 @@ class WavefrontCliConfigTest < MiniTest::Test
72
75
  end
73
76
  end
74
77
 
75
- def test_validate_input
76
- assert_equal('str', wf.validate_input('str', nil,
77
- proc { |v| v.is_a?(String) }))
78
+ def test_validate_thing_input
79
+ assert_equal('str', wf.validate_thing_input('str', nil,
80
+ proc { |v| v.is_a?(String) }))
78
81
 
79
- assert_equal('defval', wf.validate_input('', 'defval',
80
- proc { |v| v.is_a?(String) }))
82
+ assert_equal('defval', wf.validate_thing_input('', 'defval',
83
+ proc { |v|
84
+ v.is_a?(String)
85
+ }))
81
86
 
82
87
  assert_raises(WavefrontCli::Exception::MandatoryValue) do
83
- wf.validate_input('', nil, proc { |v| v.is_a?(String) })
88
+ wf.validate_thing_input('', nil, proc { |v| v.is_a?(String) })
84
89
  end
85
90
 
86
91
  assert_raises(WavefrontCli::Exception::InvalidValue) do
87
- wf.validate_input(:symbol, nil, proc { |v| v.is_a?(String) })
92
+ wf.validate_thing_input(:symbol, nil, proc { |v| v.is_a?(String) })
88
93
  end
89
94
 
90
95
  assert_raises(WavefrontCli::Exception::InvalidValue) do
91
- wf.validate_input('', 123, proc { |v| v.is_a?(String) })
96
+ wf.validate_thing_input('', 123, proc { |v| v.is_a?(String) })
92
97
  end
93
98
  end
94
99
 
@@ -204,41 +209,29 @@ class WavefrontCliConfigTest < MiniTest::Test
204
209
  end
205
210
  end
206
211
 
207
- def test_do_envvars_1
208
- blank_envvars
209
- out, err = capture_io { wfo.do_envvars }
210
- assert_empty(err)
211
- out.each_line { |l| assert_match(/WAVEFRONT_[A-Z]+\s+unset$/, l) }
212
- blank_envvars
212
+ def test_do_envvars_all_unset
213
+ assert_equal(['WAVEFRONT_ENDPOINT unset',
214
+ 'WAVEFRONT_TOKEN unset',
215
+ 'WAVEFRONT_PROXY unset'], wfo.do_envvars)
213
216
  end
214
217
 
215
- def test_do_envvars_2
216
- blank_envvars
218
+ def test_do_envvars_proxy_set
217
219
  ENV['WAVEFRONT_PROXY'] = 'myproxy'
218
220
 
219
- out, err = capture_io { wfo.do_envvars }
220
- assert_empty(err)
221
- assert_match(/WAVEFRONT_ENDPOINT+\s+unset$/, out)
222
- assert_match(/WAVEFRONT_TOKEN+\s+unset$/, out)
223
- assert_match(/WAVEFRONT_PROXY+\s+myproxy$/, out)
224
- blank_envvars
221
+ assert_equal(['WAVEFRONT_ENDPOINT unset',
222
+ 'WAVEFRONT_TOKEN unset',
223
+ 'WAVEFRONT_PROXY myproxy'], wfo.do_envvars)
225
224
  end
226
225
 
227
- def test_do_envvars_3
228
- blank_envvars
226
+ def test_do_envvars_proxy_and_token_set
229
227
  ENV['WAVEFRONT_PROXY'] = 'myproxy'
230
228
  ENV['WAVEFRONT_TOKEN'] = 'token'
231
229
 
232
- out, err = capture_io { wfo.do_envvars }
233
- assert_empty(err)
234
- assert_match(/WAVEFRONT_ENDPOINT+\s+unset$/, out)
235
- assert_match(/WAVEFRONT_TOKEN+\s+token$/, out)
236
- assert_match(/WAVEFRONT_PROXY+\s+myproxy$/, out)
237
- blank_envvars
230
+ assert_equal(['WAVEFRONT_ENDPOINT unset',
231
+ 'WAVEFRONT_TOKEN token',
232
+ 'WAVEFRONT_PROXY myproxy'], wfo.do_envvars)
238
233
  end
239
234
 
240
- def test_read_thing; end
241
-
242
235
  def test_present?
243
236
  assert wfo.present?
244
237
  assert_raises(WavefrontCli::Exception::ConfigFileNotFound) do
@@ -261,3 +254,50 @@ class WavefrontCliConfigTest < MiniTest::Test
261
254
  end
262
255
  end
263
256
  end
257
+
258
+ class ConfigEndToEndTest < EndToEndTest
259
+ def test_location
260
+ assert_output("#{Pathname.new(Dir.home).join('.wavefront')}\n", '') do
261
+ wf.new('config location'.split)
262
+ end
263
+ end
264
+
265
+ def test_profiles
266
+ assert_output("default\nother\n", '') do
267
+ wf.new("config profiles -c #{CF}".split)
268
+ end
269
+ end
270
+
271
+ def test_envvars
272
+ out, err = capture_io { wf.new('config envvars'.split) }
273
+ assert_equal(3, out.lines.count)
274
+ assert_empty err
275
+ assert_match(/^WAVEFRONT_ENDPOINT /, out)
276
+ assert_match(/^WAVEFRONT_TOKEN /, out)
277
+ assert_match(/^WAVEFRONT_PROXY /, out)
278
+ end
279
+
280
+ def test_cluster
281
+ assert_abort_on_missing_creds('cluster')
282
+ quietly { assert_cmd_gets('cluster', '/api/v2/cluster/info') }
283
+ end
284
+
285
+ def test_about
286
+ out, err = capture_io { wf.new('config about'.split) }
287
+ lines = out.lines
288
+
289
+ assert_match(/^wf version *#{WF_CLI_VERSION}$/o, lines[0])
290
+ assert lines[1].start_with?('wf path')
291
+ assert lines[2].start_with?('SDK version')
292
+ assert lines[3].start_with?('SDK location')
293
+ assert lines[4].start_with?('Ruby version')
294
+ assert lines[5].start_with?('Ruby platform')
295
+ assert_empty err
296
+ end
297
+
298
+ private
299
+
300
+ def cmd_word
301
+ 'config'
302
+ end
303
+ end
@@ -8,7 +8,7 @@ require_relative '../../lib/wavefront-cli/controller'
8
8
 
9
9
  # Be sure the CLI behaves properly when people ask for help
10
10
  #
11
- class WavefrontCliHelpTest < MiniTest::Test
11
+ class WavefrontCliHelpTest < Minitest::Test
12
12
  def test_development_mode
13
13
  refute defined?(DEVELOPMENT) if ENV['CI']
14
14
  end
@@ -103,7 +103,7 @@ end
103
103
 
104
104
  # Here's the subclass
105
105
  #
106
- class GibletsTest < MiniTest::Test
106
+ class GibletsTest < Minitest::Test
107
107
  attr_reader :wfc
108
108
 
109
109
  def setup
@@ -12,7 +12,7 @@ S_OPTIONS = { '<id>': 'abc123' }.freeze
12
12
 
13
13
  # Test base class for display methods
14
14
  #
15
- class WavefrontDisplayBaseTest < MiniTest::Test
15
+ class WavefrontDisplayBaseTest < Minitest::Test
16
16
  attr_reader :wf, :wff
17
17
 
18
18
  def setup
@@ -7,7 +7,7 @@ require_relative '../../../../lib/wavefront-cli/display/printer/long'
7
7
 
8
8
  # Test verbose printing stuff
9
9
  #
10
- class TestWavefrontDisplayPrinterLong < MiniTest::Test
10
+ class TestWavefrontDisplayPrinterLong < Minitest::Test
11
11
  attr_reader :wf
12
12
 
13
13
  def setup
@@ -10,7 +10,7 @@ TERSE_DATA = [{ id: 'id1', name: 'name1', fa: 1, fb: 2, fc: 3 },
10
10
 
11
11
  # Test terse printer
12
12
  #
13
- class WavefrontDisplayPrinterTerse < MiniTest::Test
13
+ class WavefrontDisplayPrinterTerse < Minitest::Test
14
14
  attr_reader :wf, :out
15
15
 
16
16
  def setup
@@ -11,7 +11,7 @@ TEST_EVENT_STORE_DIR = Pathname.new(Dir.mktmpdir)
11
11
  # Tests for event store class. This is tested well via the interface of the
12
12
  # events CLI class.
13
13
  #
14
- class Test < MiniTest::Test
14
+ class Test < Minitest::Test
15
15
  attr_reader :wf
16
16
 
17
17
  include WavefrontCli::Constants
@@ -14,7 +14,7 @@ INTERFERING_FILE = Pathname.new(Dir.home).join('.wavefront')
14
14
  # Test option handler class. End to end tests because the work is
15
15
  # always done in the constructor
16
16
  #
17
- class OptHandlerTest < MiniTest::Test
17
+ class OptHandlerTest < Minitest::Test
18
18
  def test_no_opts
19
19
  x = WavefrontCli::OptHandler.new
20
20
  assert x.is_a?(WavefrontCli::OptHandler)
@@ -7,7 +7,7 @@ require_relative '../../../../lib/wavefront-cli/output/csv/query'
7
7
 
8
8
  # Test CSV output
9
9
  #
10
- class WavefrontOutputCsvTest < MiniTest::Test
10
+ class WavefrontOutputCsvTest < Minitest::Test
11
11
  attr_reader :wfq, :wfr, :wfqq, :wfh, :wft, :wftl
12
12
 
13
13
  def setup
@@ -8,7 +8,7 @@ require_relative '../../../lib/wavefront-cli/output/csv'
8
8
 
9
9
  # Test the CSV instantiation of the base class
10
10
  #
11
- class CsvOutputBaseTest < MiniTest::Test
11
+ class CsvOutputBaseTest < Minitest::Test
12
12
  attr_reader :wfo
13
13
 
14
14
  def setup
@@ -8,7 +8,7 @@ require_relative '../../../lib/wavefront-cli/output/hcl'
8
8
 
9
9
  # Test HCL stuff
10
10
  #
11
- class WavefrontOutputBaseTest < MiniTest::Test
11
+ class WavefrontOutputBaseTest < Minitest::Test
12
12
  attr_reader :wfo
13
13
 
14
14
  def setup
@@ -8,7 +8,7 @@ require_relative '../../../lib/wavefront-cli/output/json'
8
8
 
9
9
  # Test JSON output
10
10
  #
11
- class WavefrontOutputJsonTest < MiniTest::Test
11
+ class WavefrontOutputJsonTest < Minitest::Test
12
12
  attr_reader :wfo
13
13
 
14
14
  def setup
@@ -10,7 +10,7 @@ require_relative '../../../lib/wavefront-cli/output/ruby'
10
10
  # controlled an environment as this, I'm not going to bother. We
11
11
  # only p() an objecty anyway.
12
12
  #
13
- class WavefrontOutputJsonTest < MiniTest::Test
13
+ class WavefrontOutputJsonTest < Minitest::Test
14
14
  attr_reader :wfo
15
15
 
16
16
  def setup
@@ -7,7 +7,7 @@ require_relative '../../../../lib/wavefront-cli/output/wavefront/query'
7
7
 
8
8
  # Test Wavefront wire-format output
9
9
  #
10
- class WavefrontOutputWavefrontTest < MiniTest::Test
10
+ class WavefrontOutputWavefrontTest < Minitest::Test
11
11
  attr_reader :wfq, :wfr
12
12
 
13
13
  def setup
@@ -8,7 +8,7 @@ require_relative '../../../lib/wavefront-cli/output/wavefront'
8
8
 
9
9
  # Test the Wavefront instantiation of the base class
10
10
  #
11
- class WavefrontOutputBaseTest < MiniTest::Test
11
+ class WavefrontOutputBaseTest < Minitest::Test
12
12
  attr_reader :wfo
13
13
 
14
14
  def setup
@@ -8,7 +8,7 @@ require_relative '../../../lib/wavefront-cli/output/yaml'
8
8
 
9
9
  # Test YAML output
10
10
  #
11
- class WavefrontOutputYamlTest < MiniTest::Test
11
+ class WavefrontOutputYamlTest < Minitest::Test
12
12
  attr_reader :wfo
13
13
 
14
14
  def setup
@@ -199,7 +199,7 @@ end
199
199
 
200
200
  # Query tests
201
201
  #
202
- class QueryTest < MiniTest::Test
202
+ class QueryTest < Minitest::Test
203
203
  attr_reader :wf
204
204
 
205
205
  def setup
@@ -6,7 +6,7 @@ require_relative '../../../lib/wavefront-cli/stdlib/array'
6
6
 
7
7
  # Test extensions to stlib Array
8
8
  #
9
- class TestArray < MiniTest::Test
9
+ class TestArray < Minitest::Test
10
10
  def test_max_length
11
11
  assert_equal(7, %w[short longer longest].max_length)
12
12
  assert_equal(7, %i[short longer longest].max_length)
@@ -8,7 +8,7 @@ require_relative '../../../lib/wavefront-cli/commands/base'
8
8
 
9
9
  # Test extensions to string class
10
10
  #
11
- class StringTest < MiniTest::Test
11
+ class StringTest < Minitest::Test
12
12
  def test_cmd_fold
13
13
  cmn = '[-DnV] [-c file] [-P profile] [-E endpoint] [-t token]'
14
14
  str = "command subcommand #{cmn} [-a alpha] [-b beta] [-c gamma] <id>"
@@ -55,7 +55,7 @@ end
55
55
 
56
56
  # test class methods
57
57
  #
58
- class UsageTest < MiniTest::Test
58
+ class UsageTest < Minitest::Test
59
59
  attr_reader :wf
60
60
 
61
61
  def setup
@@ -6,7 +6,7 @@ require_relative '../../lib/wavefront-cli/write'
6
6
 
7
7
  # Test base writer
8
8
  #
9
- class WavefrontCliWriteTest < MiniTest::Test
9
+ class WavefrontCliWriteTest < Minitest::Test
10
10
  attr_reader :wf
11
11
 
12
12
  def setup
@@ -23,18 +23,8 @@ Gem::Specification.new do |gem|
23
23
 
24
24
  gem.add_runtime_dependency 'docopt', '~> 0.6'
25
25
  gem.add_runtime_dependency 'inifile', '~> 3.0'
26
- gem.add_runtime_dependency 'wavefront-sdk', '~> 7.0'
26
+ gem.add_runtime_dependency 'wavefront-sdk', '~> 8.0'
27
27
 
28
- gem.add_development_dependency 'minitest', '~> 5.17'
29
- gem.add_development_dependency 'rake', '~> 13.0'
30
- gem.add_development_dependency 'rubocop', '~> 1.43'
31
- gem.add_development_dependency 'rubocop-minitest', '~> 0.26'
32
- gem.add_development_dependency 'rubocop-performance', '~> 1.15'
33
- gem.add_development_dependency 'rubocop-rake', '~> 0.6'
34
- gem.add_development_dependency 'spy', '~> 1.0'
35
- gem.add_development_dependency 'webmock', '~> 3.18'
36
- gem.add_development_dependency 'yard', '~> 0.9'
37
-
38
- gem.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
28
+ gem.required_ruby_version = Gem::Requirement.new('>= 3.0.0')
39
29
  gem.metadata['rubygems_mfa_required'] = 'true'
40
30
  end
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: 9.0.0
4
+ version: 10.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Fisher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-23 00:00:00.000000000 Z
11
+ date: 2024-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt
@@ -44,140 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '7.0'
47
+ version: '8.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '7.0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '5.17'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '5.17'
69
- - !ruby/object:Gem::Dependency
70
- name: rake
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '13.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '13.0'
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '1.43'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '1.43'
97
- - !ruby/object:Gem::Dependency
98
- name: rubocop-minitest
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '0.26'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '0.26'
111
- - !ruby/object:Gem::Dependency
112
- name: rubocop-performance
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '1.15'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '1.15'
125
- - !ruby/object:Gem::Dependency
126
- name: rubocop-rake
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '0.6'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - "~>"
137
- - !ruby/object:Gem::Version
138
- version: '0.6'
139
- - !ruby/object:Gem::Dependency
140
- name: spy
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '1.0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '1.0'
153
- - !ruby/object:Gem::Dependency
154
- name: webmock
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '3.18'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - "~>"
165
- - !ruby/object:Gem::Version
166
- version: '3.18'
167
- - !ruby/object:Gem::Dependency
168
- name: yard
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - "~>"
172
- - !ruby/object:Gem::Version
173
- version: '0.9'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - "~>"
179
- - !ruby/object:Gem::Version
180
- version: '0.9'
54
+ version: '8.0'
181
55
  description: 'CLI for Wavefront (wavefront.com) API v2 '
182
56
  email: services@id264.net
183
57
  executables:
@@ -243,6 +117,7 @@ files:
243
117
  - lib/wavefront-cli/display/apitoken.rb
244
118
  - lib/wavefront-cli/display/base.rb
245
119
  - lib/wavefront-cli/display/cloudintegration.rb
120
+ - lib/wavefront-cli/display/cluster.rb
246
121
  - lib/wavefront-cli/display/dashboard.rb
247
122
  - lib/wavefront-cli/display/derivedmetric.rb
248
123
  - lib/wavefront-cli/display/distribution.rb
@@ -445,14 +320,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
445
320
  requirements:
446
321
  - - ">="
447
322
  - !ruby/object:Gem::Version
448
- version: 2.7.0
323
+ version: 3.0.0
449
324
  required_rubygems_version: !ruby/object:Gem::Requirement
450
325
  requirements:
451
326
  - - ">="
452
327
  - !ruby/object:Gem::Version
453
328
  version: '0'
454
329
  requirements: []
455
- rubygems_version: 3.4.1
330
+ rubygems_version: 3.4.19
456
331
  signing_key:
457
332
  specification_version: 4
458
333
  summary: CLI for Wavefront API v2