wavefront-cli 4.5.0 → 4.5.1

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: cd7ffbaafe591ad3a7882420452454129ef74a3fbceda80051976086061c5a36
4
- data.tar.gz: f0710e4b9d7ca877e4d8233d82e3bf4436ed2862ac3b9cc05c003fa8f74afbe2
3
+ metadata.gz: ce9312443c0ff77418976599a8d4f55169e8e1ef313a33e27bc9b0703784dc0e
4
+ data.tar.gz: af50e07353671fb6b7025a704fc88855283482fdd7b0bebec38274577a923e74
5
5
  SHA512:
6
- metadata.gz: 9db901c23aa227d5549effb4dcea631a48f1336ce896e6d9bee23909ad84da959381b44623332d178a1805ffde305c5b08e81b8999014a4265bea1a1cefd910f
7
- data.tar.gz: 25b4f71209418fb6c914046c1a4e09453089ba17dd42ef09b6a8933e7af099838564fdf2bedbaca4b654f624edb8c0f3478786aa8dc9c8ceaa70b233d79dfb85
6
+ metadata.gz: aebe780241b377d2a7d85f97640cfacadb07fff838bd3246e37fb5adfa78caab0a9ef7deaebddb25102b40872cb55a92d6f2634f32d391cd197abd7a60387057
7
+ data.tar.gz: 315e47df863daae58362e416a4b9b0ff8422c3fb342db0cf521f4dbe2ee9ada167821ea6940886c5db7269e064b99a362280e4c79b6309b4754344e48d01de68
data/.travis.yml CHANGED
@@ -2,9 +2,9 @@ language: ruby
2
2
  cache: bundler
3
3
  rvm:
4
4
  - 2.3.8
5
- - 2.4.7
6
- - 2.5.6
7
- - 2.6.4
5
+ - 2.4.9
6
+ - 2.5.7
7
+ - 2.6.5
8
8
  before_install: gem install bundler --no-document
9
9
  deploy:
10
10
  provider: rubygems
@@ -14,7 +14,7 @@ deploy:
14
14
  on:
15
15
  tags: true
16
16
  repo: snltd/wavefront-cli
17
- ruby: 2.6.4
17
+ ruby: 2.6.5
18
18
  notifications:
19
19
  email: false
20
20
  slack:
data/HISTORY.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.5.1 (2020-01-14)
4
+ * Bugfix. CSV query output errored on metrics without tags.
5
+
3
6
  ## 4.5.0 (2019-11-12)
4
7
  * Add `user business functions` command.
5
8
 
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative '../../exception'
4
+
3
5
  module WavefrontCsvOutput
4
6
  #
5
7
  # Standard output template
@@ -110,6 +110,8 @@ module WavefrontCsvOutput
110
110
  timestamp: timestamp,
111
111
  source: source }
112
112
 
113
+ return ret if tags.nil?
114
+
113
115
  ret.tap { |r| tags.each { |k, v| r[k.to_sym] = tag_val(k, v) } }
114
116
  end
115
117
 
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- WF_CLI_VERSION = '4.5.0'
3
+ WF_CLI_VERSION = '4.5.1'
@@ -8,7 +8,7 @@ require_relative '../../../../lib/wavefront-cli/output/csv/query'
8
8
  # Test CSV output
9
9
  #
10
10
  class WavefrontOutputCsvTest < MiniTest::Test
11
- attr_reader :wfq, :wfr, :wfqq, :wfh, :wft
11
+ attr_reader :wfq, :wfr, :wfqq, :wfh, :wft, :wftl
12
12
 
13
13
  def setup
14
14
  @wfq = WavefrontCsvOutput::Query.new(load_query_response, {})
@@ -24,6 +24,17 @@ class WavefrontOutputCsvTest < MiniTest::Test
24
24
  formatopts: 'headers')
25
25
  @wft = WavefrontCsvOutput::Query.new(load_query_response,
26
26
  formatopts: 'tagkeys')
27
+ @wftl = WavefrontCsvOutput::Query.new(response_without_tags,
28
+ formatopts: 'tagkeys')
29
+ end
30
+
31
+ def response_without_tags
32
+ load_query_response.tap do |q|
33
+ q[:timeseries].map do |r|
34
+ r[:tags] = nil
35
+ r
36
+ end
37
+ end
27
38
  end
28
39
 
29
40
  def test_all_keys
@@ -74,6 +85,14 @@ class WavefrontOutputCsvTest < MiniTest::Test
74
85
  environment: 'unit test'))
75
86
  end
76
87
 
88
+ def test_map_row_to_csv_without_tags
89
+ assert_equal('test.path,1,1544529523,testsource',
90
+ wftl.map_row_to_csv(path: 'test.path',
91
+ value: 1,
92
+ timestamp: 1_544_529_523,
93
+ source: 'testsource'))
94
+ end
95
+
77
96
  def test_csv_format
78
97
  assert_equal({ path: 'test.path',
79
98
  value: 1,
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: 4.5.0
4
+ version: 4.5.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: 2019-11-12 00:00:00.000000000 Z
11
+ date: 2020-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docopt