wavefront-sdk 5.2.1 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -4
- data/HISTORY.md +3 -0
- data/lib/wavefront-sdk/defs/version.rb +1 -1
- data/lib/wavefront-sdk/paginator/post.rb +1 -1
- data/lib/wavefront-sdk/proxy.rb +10 -0
- data/lib/wavefront-sdk/support/mixins.rb +1 -1
- data/lib/wavefront-sdk/support/parse_time.rb +1 -1
- data/spec/wavefront-sdk/misc_spec.rb +18 -0
- data/spec/wavefront-sdk/proxy_spec.rb +6 -0
- data/wavefront-sdk.gemspec +3 -3
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9589c220f3c1cb86c7e3c4e3f051315508358580656e61e61d716a756568e9a4
|
4
|
+
data.tar.gz: 03b24e65b9617170af9b03eadae0d7cbd9d78cea99f1be60f8452ef79989d81d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ea8ef64251bb430053390d991a16024f1d1545524fe36479a5369c94dcf87669bb77a1cfab92395e2cdd6e23d10fa6c38738fe7227a6e572e0630f35830afca
|
7
|
+
data.tar.gz: b85aa3b9a03e338b4db8fc702bb0b03532d1eaa7618e044f10a7dbc9a973ffebdeaa4891f4a02c717e7c59db280cee551b8765d6cf8dee2f8fe630f6d5bb4201
|
data/.travis.yml
CHANGED
@@ -2,9 +2,9 @@ language: ruby
|
|
2
2
|
cache: bundler
|
3
3
|
rvm:
|
4
4
|
- 2.4.9
|
5
|
-
- 2.5.
|
6
|
-
- 2.6.
|
7
|
-
- 2.7.
|
5
|
+
- 2.5.8
|
6
|
+
- 2.6.6
|
7
|
+
- 2.7.2
|
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-sdk
|
17
|
-
ruby: 2.6.
|
17
|
+
ruby: 2.6.6
|
18
18
|
notifications:
|
19
19
|
email: false
|
20
20
|
slack:
|
data/HISTORY.md
CHANGED
data/lib/wavefront-sdk/proxy.rb
CHANGED
@@ -86,5 +86,15 @@ module Wavefront
|
|
86
86
|
wf_proxy_id?(id)
|
87
87
|
api.put(id, payload)
|
88
88
|
end
|
89
|
+
|
90
|
+
# Shutdown a proxy. Requires proxy >=5.x. Might not be effective if you
|
91
|
+
# have something like systemd or SMF restarting a failed proxy.
|
92
|
+
# @param id [String] ID of the proxy
|
93
|
+
# @return [Wavefront::Response]
|
94
|
+
#
|
95
|
+
def shutdown(id)
|
96
|
+
wf_proxy_id?(id)
|
97
|
+
api.put(id, { shutdown: true }, 'application/json')
|
98
|
+
end
|
89
99
|
end
|
90
100
|
end
|
@@ -23,7 +23,7 @@ module Wavefront
|
|
23
23
|
# @raise Wavefront::InvalidTimestamp
|
24
24
|
#
|
25
25
|
def parse_time(time, in_ms = false)
|
26
|
-
return relative_time(time, in_ms) if time.to_s
|
26
|
+
return relative_time(time, in_ms) if time.to_s.match?(/^[\-+]/)
|
27
27
|
|
28
28
|
ParseTime.new(time, in_ms).parse!
|
29
29
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require_relative '../spec_helper'
|
5
|
+
require_relative '../../lib/wavefront-sdk/defs/version'
|
6
|
+
|
7
|
+
# Tests for things that aren't in the SDK itself.
|
8
|
+
#
|
9
|
+
class WavefrontMiscTest < MiniTest::Test
|
10
|
+
# Check the latest version mentioned in the changelog is the version the SDK
|
11
|
+
# defines itself as.
|
12
|
+
#
|
13
|
+
def test_version_vs_history
|
14
|
+
history_file = WF_SDK_LOCATION + 'HISTORY.md'
|
15
|
+
history_vers = IO.read(history_file).match(/^## (\d+\.\d+\.\d+) \(/)
|
16
|
+
assert_equal(WF_SDK_VERSION, history_vers.captures.first)
|
17
|
+
end
|
18
|
+
end
|
@@ -21,6 +21,12 @@ class WavefrontProxyTest < WavefrontTestBase
|
|
21
21
|
assert_raises(ArgumentError) { wf.rename }
|
22
22
|
end
|
23
23
|
|
24
|
+
def test_shutdown
|
25
|
+
assert_puts("/api/v2/proxy/#{id}", { shutdown: true }.to_json, :json) do
|
26
|
+
wf.shutdown(id)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
24
30
|
private
|
25
31
|
|
26
32
|
def api_class
|
data/wavefront-sdk.gemspec
CHANGED
@@ -23,16 +23,16 @@ Gem::Specification.new do |gem|
|
|
23
23
|
gem.bindir = 'bin'
|
24
24
|
|
25
25
|
gem.add_dependency 'addressable', '~> 2.7'
|
26
|
-
gem.add_dependency 'faraday', '~> 1.
|
26
|
+
gem.add_dependency 'faraday', '~> 1.1'
|
27
27
|
gem.add_dependency 'inifile', '~> 3.0'
|
28
28
|
gem.add_dependency 'map', '~> 6.6'
|
29
29
|
|
30
30
|
gem.add_development_dependency 'minitest', '~> 5.14'
|
31
31
|
gem.add_development_dependency 'rake', '~> 13.0'
|
32
|
-
gem.add_development_dependency 'rubocop', '
|
32
|
+
gem.add_development_dependency 'rubocop', '1.0'
|
33
33
|
gem.add_development_dependency 'simplecov', '~> 0.18'
|
34
34
|
gem.add_development_dependency 'spy', '1.0.0'
|
35
|
-
gem.add_development_dependency 'webmock', '~> 3.
|
35
|
+
gem.add_development_dependency 'webmock', '~> 3.9'
|
36
36
|
gem.add_development_dependency 'yard', '~> 0.9'
|
37
37
|
|
38
38
|
gem.required_ruby_version = Gem::Requirement.new('>= 2.4.0')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wavefront-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.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-
|
11
|
+
date: 2020-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: inifile
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: '1.0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: '1.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: simplecov
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '3.
|
145
|
+
version: '3.9'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '3.
|
152
|
+
version: '3.9'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: yard
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -276,6 +276,7 @@ files:
|
|
276
276
|
- spec/wavefront-sdk/message_spec.rb
|
277
277
|
- spec/wavefront-sdk/metric_helper_spec.rb
|
278
278
|
- spec/wavefront-sdk/metric_spec.rb
|
279
|
+
- spec/wavefront-sdk/misc_spec.rb
|
279
280
|
- spec/wavefront-sdk/notificant_spec.rb
|
280
281
|
- spec/wavefront-sdk/paginator/base_spec.rb
|
281
282
|
- spec/wavefront-sdk/paginator/post_spec.rb
|
@@ -373,6 +374,7 @@ test_files:
|
|
373
374
|
- spec/wavefront-sdk/message_spec.rb
|
374
375
|
- spec/wavefront-sdk/metric_helper_spec.rb
|
375
376
|
- spec/wavefront-sdk/metric_spec.rb
|
377
|
+
- spec/wavefront-sdk/misc_spec.rb
|
376
378
|
- spec/wavefront-sdk/notificant_spec.rb
|
377
379
|
- spec/wavefront-sdk/paginator/base_spec.rb
|
378
380
|
- spec/wavefront-sdk/paginator/post_spec.rb
|