wavefront-sdk 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -0
- data/.rubocop.yml +62 -72
- data/.travis.yml +5 -4
- data/README.md +10 -0
- data/lib/wavefront-sdk/base.rb +28 -8
- data/lib/wavefront-sdk/constants.rb +3 -0
- data/lib/wavefront-sdk/credentials.rb +36 -17
- data/lib/wavefront-sdk/mixins.rb +3 -22
- data/lib/wavefront-sdk/notificant.rb +1 -1
- data/lib/wavefront-sdk/parse_time.rb +58 -0
- data/lib/wavefront-sdk/response.rb +7 -6
- data/lib/wavefront-sdk/search.rb +5 -2
- data/lib/wavefront-sdk/user.rb +7 -0
- data/lib/wavefront-sdk/validators.rb +15 -7
- data/lib/wavefront-sdk/version.rb +1 -1
- data/lib/wavefront-sdk/write.rb +29 -3
- data/spec/.rubocop.yml +3 -0
- data/spec/spec_helper.rb +24 -18
- data/spec/wavefront-sdk/alert_spec.rb +5 -0
- data/spec/wavefront-sdk/base_spec.rb +9 -9
- data/spec/wavefront-sdk/credentials_spec.rb +123 -4
- data/spec/wavefront-sdk/event_spec.rb +4 -5
- data/spec/wavefront-sdk/externallink_spec.rb +1 -1
- data/spec/wavefront-sdk/maintenancewindow_spec.rb +2 -2
- data/spec/wavefront-sdk/metric_spec.rb +2 -2
- data/spec/wavefront-sdk/mixins_spec.rb +1 -1
- data/spec/wavefront-sdk/parse_time_spec.rb +65 -0
- data/spec/wavefront-sdk/resources/test2.conf +4 -0
- data/spec/wavefront-sdk/response_spec.rb +3 -5
- data/spec/wavefront-sdk/savedsearch_spec.rb +1 -1
- data/spec/wavefront-sdk/source_spec.rb +1 -1
- data/spec/wavefront-sdk/user_spec.rb +5 -3
- data/spec/wavefront-sdk/validators_spec.rb +65 -62
- data/spec/wavefront-sdk/webhook_spec.rb +1 -1
- data/spec/wavefront-sdk/write_spec.rb +19 -1
- data/wavefront-sdk.gemspec +4 -3
- metadata +29 -15
@@ -6,12 +6,11 @@ require_relative '../../lib/wavefront-sdk/response'
|
|
6
6
|
|
7
7
|
WF_JSON = '{"status":{"result":"OK","message":"","code":200},' \
|
8
8
|
'"response":{"items":[{"name":"test agent"}],"offset":0,' \
|
9
|
-
'"limit":100,"totalItems":3,"moreItems":false}}'
|
9
|
+
'"limit":100,"totalItems":3,"moreItems":false}}'.freeze
|
10
10
|
|
11
11
|
# Unit tests for Response class
|
12
12
|
|
13
13
|
class WavefrontResponseTest < MiniTest::Test
|
14
|
-
|
15
14
|
def test_initialize_good_data
|
16
15
|
wf = Wavefront::Response.new(WF_JSON, 200)
|
17
16
|
assert_instance_of(Wavefront::Response, wf)
|
@@ -19,11 +18,10 @@ class WavefrontResponseTest < MiniTest::Test
|
|
19
18
|
assert_respond_to(wf, :response)
|
20
19
|
assert_respond_to(wf.response, :items)
|
21
20
|
refute_respond_to(wf, :to_a)
|
22
|
-
[
|
21
|
+
%i[code message result].each { |m| assert_respond_to(wf.status, m) }
|
23
22
|
assert_equal(wf.status.code, 200)
|
24
23
|
assert_instance_of(Array, wf.response.items)
|
25
24
|
end
|
26
25
|
|
27
|
-
def test_initialize_bad_data
|
28
|
-
end
|
26
|
+
def test_initialize_bad_data; end
|
29
27
|
end
|
@@ -45,7 +45,7 @@ class WavefrontSavedSearchTest < WavefrontTestBase
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def test_entity
|
48
|
-
%w
|
48
|
+
%w[ALERT EVENT MAINTENANCE_WINDOW DASHBOARD SOURCE AGENT].each do |e|
|
49
49
|
should_work(:entity, e, "type/#{e}?offset=0&limit=100")
|
50
50
|
should_work(:entity, [e, 20], "type/#{e}?offset=20&limit=100")
|
51
51
|
should_work(:entity, [e, 20, 50], "type/#{e}?offset=20&limit=50")
|
@@ -7,7 +7,7 @@ GROUP = 'agent_management'.freeze
|
|
7
7
|
|
8
8
|
USER_BODY = {
|
9
9
|
emailAddress: USER,
|
10
|
-
groups: %w
|
10
|
+
groups: %w[browse]
|
11
11
|
}.freeze
|
12
12
|
|
13
13
|
# Unit tests for User class
|
@@ -39,7 +39,8 @@ class WavefrontUserTest < WavefrontTestBase
|
|
39
39
|
def test_grant
|
40
40
|
should_work(:grant, [USER, GROUP], 'user%40example.com/grant',
|
41
41
|
:post, JSON_POST_HEADERS.merge(
|
42
|
-
|
42
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
43
|
+
),
|
43
44
|
"group=#{GROUP}")
|
44
45
|
should_be_invalid(:grant, ['abcde', GROUP])
|
45
46
|
assert_raises(ArgumentError) { wf.grant }
|
@@ -48,7 +49,8 @@ class WavefrontUserTest < WavefrontTestBase
|
|
48
49
|
def test_revoke
|
49
50
|
should_work(:revoke, [USER, GROUP], 'user%40example.com/revoke',
|
50
51
|
:post, JSON_POST_HEADERS.merge(
|
51
|
-
|
52
|
+
'Content-Type': 'application/x-www-form-urlencoded'
|
53
|
+
),
|
52
54
|
"group=#{GROUP}")
|
53
55
|
should_be_invalid(:revoke, ['abcde', GROUP])
|
54
56
|
assert_raises(ArgumentError) { wf.revoke }
|
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'date'
|
4
4
|
require 'minitest/autorun'
|
5
5
|
require_relative '../spec_helper'
|
6
|
+
require_relative '../../lib/wavefront-sdk/constants'
|
6
7
|
require_relative '../../lib/wavefront-sdk/validators'
|
7
8
|
|
8
9
|
class WavefrontValidatorsTest < MiniTest::Test
|
@@ -17,28 +18,30 @@ class WavefrontValidatorsTest < MiniTest::Test
|
|
17
18
|
|
18
19
|
def test_wf_metric_name?
|
19
20
|
good = ['a.l33t.metric_path-passes', 'NO.NEED.TO.SHOUT',
|
20
|
-
|
21
|
-
|
21
|
+
'"slash/allowed_in_quotes"', '"comma,allowed_in_quotes"',
|
22
|
+
"#{DELTA}deltas.must.pass", "\"#{DELTA}quoted.delta\""]
|
23
|
+
bad = ['metric.is.(>_<)', { key: 'val' }, 'no/slash', 'no,comma',
|
24
|
+
[] , "not.a.#{DELTA}"]
|
22
25
|
good_and_bad('wf_metric_name?', 'InvalidMetricName', good, bad)
|
23
26
|
end
|
24
27
|
|
25
28
|
def test_wf_string?
|
26
29
|
good = ['string', 'valid string', 'valid, valid string.',
|
27
|
-
|
28
|
-
bad = ['a' * 1024, '(>_<)', { key: 'val' }, [],
|
30
|
+
'valid-string', ' VALID_string']
|
31
|
+
bad = ['a' * 1024, '(>_<)', { key: 'val' }, [], 123_456]
|
29
32
|
good_and_bad('wf_string?', 'InvalidString', good, bad)
|
30
33
|
end
|
31
34
|
|
32
35
|
def test_wf_name?
|
33
|
-
good = %w
|
34
|
-
bad = ['a' * 1024, '(>_<)', { key: 'val' }, [],
|
36
|
+
good = %w[name name123]
|
37
|
+
bad = ['a' * 1024, '(>_<)', { key: 'val' }, [], 123_456, '']
|
35
38
|
good_and_bad('wf_name?', 'InvalidName', good, bad)
|
36
39
|
end
|
37
40
|
|
38
41
|
def test_wf_source_id?
|
39
42
|
good = ['validsource1', 'valid-source', 'valid_source',
|
40
|
-
|
41
|
-
bad = ['a' * 1024, '(>_<)', { key: 'val' }, [],
|
43
|
+
'valid.source', 'Valid_Source', 'a' * 1023, '123456']
|
44
|
+
bad = ['a' * 1024, '(>_<)', { key: 'val' }, [], 123_456]
|
42
45
|
good_and_bad('wf_source_id?', 'InvalidSourceId', good, bad)
|
43
46
|
end
|
44
47
|
|
@@ -50,7 +53,7 @@ class WavefrontValidatorsTest < MiniTest::Test
|
|
50
53
|
|
51
54
|
def test_wf_ts?
|
52
55
|
good = [Time.now, Date.today, DateTime.now]
|
53
|
-
bad = ['2017-03-25 23:52:22 +0000',
|
56
|
+
bad = ['2017-03-25 23:52:22 +0000', 1_490_485_946,
|
54
57
|
'#<Date: 2017-03-25 ((2457838j,0s,0n),+0s,2299161j)>']
|
55
58
|
good_and_bad('wf_ts?', 'InvalidTimestamp', good, bad)
|
56
59
|
end
|
@@ -68,63 +71,63 @@ class WavefrontValidatorsTest < MiniTest::Test
|
|
68
71
|
end
|
69
72
|
|
70
73
|
def test_wf_tag?
|
71
|
-
good = ['abc', 'abc123', '__tag__', 'my:tag', [
|
74
|
+
good = ['abc', 'abc123', '__tag__', 'my:tag', %w[abc abc123]]
|
72
75
|
bad = ['^^^', Time.now, 'bad tag', ['abc', '!BAD!']]
|
73
76
|
good_and_bad('wf_tag?', 'InvalidTag', good, bad)
|
74
77
|
end
|
75
78
|
|
76
79
|
def test_wf_point_tags?
|
77
80
|
good = [{},
|
78
|
-
{tag1: 'val1', tag2: 'val2'},
|
79
|
-
{tag1: 'val 1', tag2: 'val 2'},
|
80
|
-
{TAG1: 'val 1', tag2: 'val 2'},
|
81
|
-
{'TAG-1': 'val 1', tag2: 'val 2'},
|
82
|
-
{'TAG_1': 'val 1', tag_2: 'val 2'},
|
83
|
-
{'TAG.1': 'val 1', tag_2: 'val 2'},
|
84
|
-
{'TAG-1': 'val 1', tag2: 'val 2'},
|
85
|
-
{tag1: '(>_<)', tag2: '^_^'}]
|
81
|
+
{ tag1: 'val1', tag2: 'val2' },
|
82
|
+
{ tag1: 'val 1', tag2: 'val 2' },
|
83
|
+
{ TAG1: 'val 1', tag2: 'val 2' },
|
84
|
+
{ 'TAG-1': 'val 1', tag2: 'val 2' },
|
85
|
+
{ 'TAG_1': 'val 1', tag_2: 'val 2' },
|
86
|
+
{ 'TAG.1': 'val 1', tag_2: 'val 2' },
|
87
|
+
{ 'TAG-1': 'val 1', tag2: 'val 2' },
|
88
|
+
{ tag1: '(>_<)', tag2: '^_^' }]
|
86
89
|
bad = ['key=value',
|
87
|
-
{'tag 1': 'val1', 'tag 2': 'val2'},
|
88
|
-
{'TAG*1': 'val 1', tag_2: 'val 2'},
|
89
|
-
{'(>_<)': 'val1', '^_^': 'val2'},
|
90
|
-
{tag: nil},
|
91
|
-
{tag: false},
|
92
|
-
{tag1: 'v' * 255},
|
93
|
-
{'k' * 255 => 'val1'},
|
94
|
-
{'k' * 130 => 'v' * 130}]
|
90
|
+
{ 'tag 1': 'val1', 'tag 2': 'val2' },
|
91
|
+
{ 'TAG*1': 'val 1', tag_2: 'val 2' },
|
92
|
+
{ '(>_<)': 'val1', '^_^': 'val2' },
|
93
|
+
{ tag: nil },
|
94
|
+
{ tag: false },
|
95
|
+
{ tag1: 'v' * 255 },
|
96
|
+
{ 'k' * 255 => 'val1' },
|
97
|
+
{ 'k' * 130 => 'v' * 130 }]
|
95
98
|
good_and_bad('wf_point_tags?', 'InvalidTag', good, bad)
|
96
99
|
end
|
97
100
|
|
98
101
|
def test_wf_proxy_id?
|
99
|
-
good = %w
|
100
|
-
917102d1-a10e-497b-ba63-95058f98d4fb
|
101
|
-
bad = %w
|
102
|
+
good = %w[fd248f53-378e-4fbe-bbd3-efabace8d724
|
103
|
+
917102d1-a10e-497b-ba63-95058f98d4fb]
|
104
|
+
bad = %w[proxy 17102d1-a10e-497b-ba63-95058f98d4fb]
|
102
105
|
good_and_bad('wf_proxy_id?', 'InvalidProxyId', good, bad)
|
103
106
|
end
|
104
107
|
|
105
108
|
def test_wf_cloudintegration_id?
|
106
|
-
good = %w
|
107
|
-
71e435ca-3d8c-43ab-bc1e-d072a335cbe6
|
108
|
-
bad = %w
|
109
|
+
good = %w[3b56f61d-ba79-47f6-905c-d75a0f613d10
|
110
|
+
71e435ca-3d8c-43ab-bc1e-d072a335cbe6]
|
111
|
+
bad = %w[proxy 71e43dca-3d8c-41ab-bc1e-d072a335Xbe6]
|
109
112
|
good_and_bad('wf_cloudintegration_id?', 'InvalidCloudIntegrationId',
|
110
113
|
good, bad)
|
111
114
|
end
|
112
115
|
|
113
116
|
def test_wf_alert_id?
|
114
|
-
good = [
|
115
|
-
bad = [
|
117
|
+
good = [1_481_553_823_153, '1481553823153']
|
118
|
+
bad = [481_553_823_153, '481553823153', [], {}, 'alert']
|
116
119
|
good_and_bad('wf_alert_id?', 'InvalidAlertId', good, bad)
|
117
120
|
end
|
118
121
|
|
119
122
|
def test_wf_dashboard_id?
|
120
|
-
good = %w
|
123
|
+
good = %w[my_dash my-dashboard S3 123]
|
121
124
|
bad = ['a' * 260, 'A Dashboard Name', 'and_1_more!', {}, [], 1234]
|
122
125
|
good_and_bad('wf_dashboard_id?', 'InvalidDashboardId', good, bad)
|
123
126
|
end
|
124
127
|
|
125
128
|
def test_wf_event_id?
|
126
|
-
good = %w
|
127
|
-
bad = %w
|
129
|
+
good = %w[1493370839062:test1]
|
130
|
+
bad = %w[1493370839062 1493370839062test!]
|
128
131
|
good_and_bad('wf_event_id?', 'InvalidEventId', good, bad)
|
129
132
|
end
|
130
133
|
|
@@ -135,33 +138,33 @@ class WavefrontValidatorsTest < MiniTest::Test
|
|
135
138
|
end
|
136
139
|
|
137
140
|
def test_wf_link_id?
|
138
|
-
good = %w
|
139
|
-
bad = %w
|
141
|
+
good = %w[lq6rPlSg2CFMSrg6]
|
142
|
+
bad = %w[lq%rPlSg2CFMSrg6 lq6rPlSg2CFMSrg]
|
140
143
|
good_and_bad('wf_link_id?', 'InvalidExternalLinkId', good, bad)
|
141
144
|
end
|
142
145
|
|
143
146
|
def test_wf_link_template?
|
144
|
-
good = %w
|
145
|
-
bad = %w
|
147
|
+
good = %w[http://link.xyz https://link.xyz/{{holder}}]
|
148
|
+
bad = %w[link.xyz https:/link.xyz/{{holder}}]
|
146
149
|
good_and_bad('wf_link_template?', 'InvalidLinkTemplate', good, bad)
|
147
150
|
end
|
148
151
|
|
149
152
|
def test_wf_maintenance_window_id?
|
150
|
-
good = ['1493324005091',
|
151
|
-
bad = [
|
153
|
+
good = ['1493324005091', 1_493_324_005_091, Time.now.to_i * 1000]
|
154
|
+
bad = [149_332_400_509, '14933240050', Time.now, [], 'abcdef']
|
152
155
|
good_and_bad('wf_maintenance_window_id?', 'InvalidMaintenanceWindowId',
|
153
156
|
good, bad)
|
154
157
|
end
|
155
158
|
|
156
159
|
def test_wf_message_id?
|
157
|
-
good = %w
|
158
|
-
bad = %w
|
160
|
+
good = %w[CLUSTER::IHjNaHM9]
|
161
|
+
bad = %w[4OfsEM8RcvkM7n 4OfsEM8Rcvk-7nw]
|
159
162
|
good_and_bad('wf_message_id?', 'InvalidMessageId', good, bad)
|
160
163
|
end
|
161
164
|
|
162
165
|
def test_wf_alert_severity?
|
163
|
-
good = %w
|
164
|
-
bad = %w
|
166
|
+
good = %w[INFO SMOKE WARN SEVERE]
|
167
|
+
bad = %w[any THING else]
|
165
168
|
good_and_bad('wf_alert_severity?', 'InvalidAlertSeverity', good, bad)
|
166
169
|
end
|
167
170
|
|
@@ -172,37 +175,37 @@ class WavefrontValidatorsTest < MiniTest::Test
|
|
172
175
|
end
|
173
176
|
|
174
177
|
def test_wf_savedsearch_id?
|
175
|
-
good = %w
|
176
|
-
bad = %w
|
178
|
+
good = %w[e2hLH2FR]
|
179
|
+
bad = %w[e2hLH2F e2hLH2FRz]
|
177
180
|
good_and_bad('wf_savedsearch_id?', 'InvalidSavedSearchId', good, bad)
|
178
181
|
end
|
179
182
|
|
180
183
|
def test_wf_savedsearch_entity?
|
181
|
-
good = %w
|
182
|
-
bad = %w
|
184
|
+
good = %w[EVENT MAINTENANCE_WINDOW DASHBOARD ALERT]
|
185
|
+
bad = %w[1 a day hour]
|
183
186
|
good_and_bad('wf_savedsearch_entity?',
|
184
187
|
'InvalidSavedSearchEntity', good, bad)
|
185
188
|
end
|
186
189
|
|
187
190
|
def test_wf_user_id?
|
188
|
-
good = %w
|
189
|
-
bad = %w
|
191
|
+
good = %w[Some.User@example.com general99+specific@somewhere.net someone@somewhere.com]
|
192
|
+
bad = %w[word Name]
|
190
193
|
good_and_bad('wf_user_id?', 'InvalidUserId', good, bad)
|
191
194
|
end
|
192
195
|
|
193
196
|
def test_wf_webhook_id?
|
194
|
-
good = %w
|
195
|
-
bad = %w
|
197
|
+
good = %w[4OfsEM8RcvkM7nwG]
|
198
|
+
bad = %w[4OfsEM8RcvkM7n 4OfsEM8Rcvk-7nw]
|
196
199
|
good_and_bad('wf_webhook_id?', 'InvalidWebhookId', good, bad)
|
197
200
|
end
|
198
201
|
|
199
202
|
def test_wf_point?
|
200
|
-
good = { path: 'test.metric', value:
|
203
|
+
good = { path: 'test.metric', value: 123_456, ts: Time.now.to_i,
|
201
204
|
source: 'testhost', tags: { t1: 'v 1', t2: 'v2' } }
|
202
205
|
|
203
206
|
assert(wf_point?(good))
|
204
207
|
|
205
|
-
%w
|
208
|
+
%w[tags source ts].each do |t|
|
206
209
|
p = good.dup
|
207
210
|
p.delete(t)
|
208
211
|
assert(wf_point?(p))
|
@@ -237,7 +240,7 @@ class WavefrontValidatorsTest < MiniTest::Test
|
|
237
240
|
end
|
238
241
|
|
239
242
|
bad = good.dup
|
240
|
-
bad[:tags] = {'<------>': 45}
|
243
|
+
bad[:tags] = { '<------>': 45 }
|
241
244
|
|
242
245
|
assert_raises(Wavefront::Exception::InvalidTag) do
|
243
246
|
wf_point?(bad)
|
@@ -245,12 +248,12 @@ class WavefrontValidatorsTest < MiniTest::Test
|
|
245
248
|
end
|
246
249
|
|
247
250
|
def test_notificant_id
|
248
|
-
good = %w
|
249
|
-
bad = ['CTo47HvsPzSaGhh',
|
251
|
+
good = %w[CHTo47HvsPzSaGhh]
|
252
|
+
bad = ['CTo47HvsPzSaGhh', [], {}, nil, 'bad id']
|
250
253
|
end
|
251
254
|
|
252
255
|
def test_integration_id
|
253
|
-
good = %w
|
254
|
-
bad = ['CTo47HvsPzSaGhh',
|
256
|
+
good = %w[aws tutorial elasticsearch cassandra go]
|
257
|
+
bad = ['CTo47HvsPzSaGhh', [], {}, nil, 'bad id']
|
255
258
|
end
|
256
259
|
end
|
@@ -8,7 +8,7 @@ WEBHOOK_BODY = {
|
|
8
8
|
description: 'WebHook Description',
|
9
9
|
template: 'POST Body -- Mustache syntax',
|
10
10
|
title: 'WebHook Title',
|
11
|
-
triggers: %w
|
11
|
+
triggers: %w[ALERT_OPENED],
|
12
12
|
recipient: 'http://example.com',
|
13
13
|
customHttpHeaders: {},
|
14
14
|
contentType: 'text/plain'
|
@@ -23,6 +23,14 @@ POINT_A = [
|
|
23
23
|
POINT, POINT.dup.update(ts: 1_469_987_588, value: 54_321)
|
24
24
|
].freeze
|
25
25
|
|
26
|
+
POINTS = [POINT.dup,
|
27
|
+
{ path: 'test.other_metric',
|
28
|
+
value: 89,
|
29
|
+
ts: 1_469_987_572,
|
30
|
+
source: 'otherhost'}]
|
31
|
+
|
32
|
+
POINT_L = 'test.metric 123456 1469987572 source=testhost t1="v1" t2="v2"'.freeze
|
33
|
+
|
26
34
|
# This class is sufficiently different to the API calling classes
|
27
35
|
# that it doesn't use spec helper or inherit anything.
|
28
36
|
#
|
@@ -88,6 +96,16 @@ class WavefrontWriteTest < MiniTest::Test
|
|
88
96
|
assert mocket_spy.has_been_called?
|
89
97
|
end
|
90
98
|
|
99
|
+
def test_paths_to_deltas
|
100
|
+
x = wf.paths_to_deltas(POINTS.dup)
|
101
|
+
assert_equal(x.size, 2)
|
102
|
+
|
103
|
+
x.each do |p|
|
104
|
+
assert_instance_of(Hash, p)
|
105
|
+
assert(p[:path].start_with?(DELTA))
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
91
109
|
def test_hash_to_wf
|
92
110
|
assert_equal(wf.hash_to_wf(POINT),
|
93
111
|
'test.metric 123456 1469987572 ' \
|
@@ -107,7 +125,7 @@ class WavefrontWriteTest < MiniTest::Test
|
|
107
125
|
assert_equal(wf.hash_to_wf(p2),
|
108
126
|
'test.metric 123456 1469987572 source=testhost')
|
109
127
|
|
110
|
-
[
|
128
|
+
%i[value path].each do |k|
|
111
129
|
p3 = POINT.dup
|
112
130
|
p3.delete(k)
|
113
131
|
|
data/wavefront-sdk.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.require_paths = %w(lib)
|
21
21
|
gem.bindir = 'bin'
|
22
22
|
|
23
|
-
gem.add_dependency 'faraday', '~> 0.
|
23
|
+
gem.add_dependency 'faraday', '~> 0.14.0'
|
24
24
|
gem.add_dependency 'inifile', '~> 3.0'
|
25
25
|
gem.add_dependency 'addressable', '~> 2.4'
|
26
26
|
gem.add_dependency 'map', '~> 6.6'
|
@@ -28,10 +28,11 @@ Gem::Specification.new do |gem|
|
|
28
28
|
gem.add_development_dependency 'bundler', '~> 1.3'
|
29
29
|
gem.add_development_dependency 'rake', '~> 12.0'
|
30
30
|
gem.add_development_dependency 'yard', '~> 0.9.5'
|
31
|
-
gem.add_development_dependency 'rubocop', '~> 0.
|
31
|
+
gem.add_development_dependency 'rubocop', '~> 0.54.0'
|
32
32
|
gem.add_development_dependency 'webmock', '~> 3.0'
|
33
|
-
gem.add_development_dependency 'minitest', '~> 5.
|
33
|
+
gem.add_development_dependency 'minitest', '~> 5.11'
|
34
34
|
gem.add_development_dependency 'spy', '~> 0.4.0'
|
35
|
+
gem.add_development_dependency 'simplecov', '~> 0.16.0'
|
35
36
|
|
36
37
|
gem.required_ruby_version = Gem::Requirement.new('>= 2.2.0')
|
37
38
|
end
|
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: 1.
|
4
|
+
version: 1.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:
|
11
|
+
date: 2018-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.14.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.14.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: inifile
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.54.0
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.54.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: webmock
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,20 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '5.
|
146
|
-
- - ">="
|
147
|
-
- !ruby/object:Gem::Version
|
148
|
-
version: 5.8.0
|
145
|
+
version: '5.11'
|
149
146
|
type: :development
|
150
147
|
prerelease: false
|
151
148
|
version_requirements: !ruby/object:Gem::Requirement
|
152
149
|
requirements:
|
153
150
|
- - "~>"
|
154
151
|
- !ruby/object:Gem::Version
|
155
|
-
version: '5.
|
156
|
-
- - ">="
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: 5.8.0
|
152
|
+
version: '5.11'
|
159
153
|
- !ruby/object:Gem::Dependency
|
160
154
|
name: spy
|
161
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,6 +164,20 @@ dependencies:
|
|
170
164
|
- - "~>"
|
171
165
|
- !ruby/object:Gem::Version
|
172
166
|
version: 0.4.0
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: simplecov
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 0.16.0
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 0.16.0
|
173
181
|
description: 'SDK for Wavefront (wavefront.com) API v2 '
|
174
182
|
email: slackboy@gmail.com
|
175
183
|
executables: []
|
@@ -187,6 +195,7 @@ files:
|
|
187
195
|
- lib/wavefront-sdk/alert.rb
|
188
196
|
- lib/wavefront-sdk/base.rb
|
189
197
|
- lib/wavefront-sdk/cloudintegration.rb
|
198
|
+
- lib/wavefront-sdk/constants.rb
|
190
199
|
- lib/wavefront-sdk/credentials.rb
|
191
200
|
- lib/wavefront-sdk/dashboard.rb
|
192
201
|
- lib/wavefront-sdk/event.rb
|
@@ -198,6 +207,7 @@ files:
|
|
198
207
|
- lib/wavefront-sdk/metric.rb
|
199
208
|
- lib/wavefront-sdk/mixins.rb
|
200
209
|
- lib/wavefront-sdk/notificant.rb
|
210
|
+
- lib/wavefront-sdk/parse_time.rb
|
201
211
|
- lib/wavefront-sdk/proxy.rb
|
202
212
|
- lib/wavefront-sdk/query.rb
|
203
213
|
- lib/wavefront-sdk/response.rb
|
@@ -225,9 +235,11 @@ files:
|
|
225
235
|
- spec/wavefront-sdk/metric_spec.rb
|
226
236
|
- spec/wavefront-sdk/mixins_spec.rb
|
227
237
|
- spec/wavefront-sdk/notificant_spec.rb
|
238
|
+
- spec/wavefront-sdk/parse_time_spec.rb
|
228
239
|
- spec/wavefront-sdk/proxy_spec.rb
|
229
240
|
- spec/wavefront-sdk/query_spec.rb
|
230
241
|
- spec/wavefront-sdk/resources/test.conf
|
242
|
+
- spec/wavefront-sdk/resources/test2.conf
|
231
243
|
- spec/wavefront-sdk/response_spec.rb
|
232
244
|
- spec/wavefront-sdk/savedsearch_spec.rb
|
233
245
|
- spec/wavefront-sdk/search_spec.rb
|
@@ -257,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
257
269
|
version: '0'
|
258
270
|
requirements: []
|
259
271
|
rubyforge_project:
|
260
|
-
rubygems_version: 2.6
|
272
|
+
rubygems_version: 2.7.6
|
261
273
|
signing_key:
|
262
274
|
specification_version: 4
|
263
275
|
summary: SDK for Wavefront API v2
|
@@ -277,9 +289,11 @@ test_files:
|
|
277
289
|
- spec/wavefront-sdk/metric_spec.rb
|
278
290
|
- spec/wavefront-sdk/mixins_spec.rb
|
279
291
|
- spec/wavefront-sdk/notificant_spec.rb
|
292
|
+
- spec/wavefront-sdk/parse_time_spec.rb
|
280
293
|
- spec/wavefront-sdk/proxy_spec.rb
|
281
294
|
- spec/wavefront-sdk/query_spec.rb
|
282
295
|
- spec/wavefront-sdk/resources/test.conf
|
296
|
+
- spec/wavefront-sdk/resources/test2.conf
|
283
297
|
- spec/wavefront-sdk/response_spec.rb
|
284
298
|
- spec/wavefront-sdk/savedsearch_spec.rb
|
285
299
|
- spec/wavefront-sdk/search_spec.rb
|