wavefront-sdk 5.3.1 → 5.4.4
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 +4 -4
- data/.codeclimate.yml +1 -1
- data/.github/workflows/release.yml +37 -0
- data/.github/workflows/test.yml +23 -0
- data/.rubocop.yml +7 -5
- data/HISTORY.md +21 -0
- data/README.md +1 -1
- data/lib/wavefront-sdk/core/api_caller.rb +6 -5
- data/lib/wavefront-sdk/core/exception.rb +56 -0
- data/lib/wavefront-sdk/credentials.rb +7 -5
- data/lib/wavefront-sdk/defs/version.rb +1 -1
- data/lib/wavefront-sdk/derivedmetric.rb +1 -1
- data/lib/wavefront-sdk/event.rb +6 -2
- data/lib/wavefront-sdk/query.rb +2 -0
- data/lib/wavefront-sdk/search.rb +2 -0
- data/lib/wavefront-sdk/support/parse_time.rb +1 -1
- data/lib/wavefront-sdk/validators.rb +2 -2
- data/lib/wavefront-sdk/write.rb +1 -1
- data/lib/wavefront-sdk/writers/api.rb +2 -2
- data/lib/wavefront-sdk/writers/core.rb +1 -1
- data/lib/wavefront-sdk/writers/http.rb +2 -2
- data/lib/wavefront-sdk/writers/socket.rb +2 -2
- data/lib/wavefront-sdk/writers/unix.rb +6 -6
- data/spec/.rubocop.yml +3 -15
- data/spec/constants.rb +2 -2
- data/spec/support/mocket.rb +3 -1
- data/spec/wavefront-sdk/derivedmetric_spec.rb +1 -0
- data/spec/wavefront-sdk/metric_helper_spec.rb +4 -4
- data/spec/wavefront-sdk/validators_spec.rb +1 -1
- data/spec/wavefront-sdk/writers/api_spec.rb +4 -0
- data/spec/wavefront-sdk/writers/core_spec.rb +1 -3
- data/spec/wavefront-sdk/writers/http_spec.rb +24 -21
- data/spec/wavefront-sdk/writers/socket_spec.rb +27 -7
- data/spec/wavefront-sdk/writers/unix_spec.rb +131 -0
- data/wavefront-sdk.gemspec +4 -1
- metadata +53 -9
- data/.github/workflows/ruby.yml +0 -32
- data/.travis.yml +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f0aafb012ded5a99a13ee3553d686e0552f5c4cae8da39e70139f6882aadcc9
|
4
|
+
data.tar.gz: b033a54d99e7a8402d04fd3555d56c53c765b655f89c59c6b1b27e2880ec5945
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e647c51a97b626d080d7d666e17b81c6ead709b8780f0bb3f2897fc34d326df65d6c524359f4ea461520ef75cf7d29883f1f822feb774b06a3d822ce7717e882
|
7
|
+
data.tar.gz: c6602237acfdf5c18820e086071e1f06cc73199fc45ef02e689f091fec36208936b3618c5ec0d1464fff2773f4424bb49d0be3c9ba394da5d31143a14e2aed71
|
data/.codeclimate.yml
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- '[0-9]+.[0-9]+.[0-9]+'
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
name: Build + Publish
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v2
|
15
|
+
- name: Set env
|
16
|
+
run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV
|
17
|
+
|
18
|
+
- name: Set up Ruby 2.7
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: 2.7
|
22
|
+
- run: bundle install
|
23
|
+
|
24
|
+
- name: Run tests
|
25
|
+
run: bundle exec rake
|
26
|
+
|
27
|
+
- name: Build Gem
|
28
|
+
run: bundle exec rake build
|
29
|
+
|
30
|
+
- name: Publish to RubyGems
|
31
|
+
run: |
|
32
|
+
mkdir -p ${HOME}/.gem
|
33
|
+
echo -e "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}" >${HOME}/.gem/credentials
|
34
|
+
chmod 0600 ${HOME}/.gem/credentials
|
35
|
+
gem push pkg/*.gem
|
36
|
+
env:
|
37
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Test
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches-ignore: release
|
6
|
+
|
7
|
+
jobs:
|
8
|
+
test:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
ruby-version: [2.4.10, 2.5.8, 2.6.6, 2.7.2, 3.0.0]
|
13
|
+
steps:
|
14
|
+
- uses: actions/checkout@v2
|
15
|
+
- name: Set up Ruby
|
16
|
+
uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: ${{ matrix.ruby-version }}
|
19
|
+
bundler-cache: true
|
20
|
+
- name: Install dependencies
|
21
|
+
run: bundle install
|
22
|
+
- name: Run tests
|
23
|
+
run: bundle exec rake
|
data/.rubocop.yml
CHANGED
@@ -4,15 +4,17 @@ AllCops:
|
|
4
4
|
TargetRubyVersion: 2.4
|
5
5
|
NewCops: enable
|
6
6
|
|
7
|
-
|
8
|
-
|
7
|
+
require:
|
8
|
+
- rubocop-rake
|
9
|
+
- rubocop-minitest
|
10
|
+
- rubocop-performance
|
11
|
+
- rubocop-performance
|
9
12
|
|
10
|
-
# Is nothing sacred?
|
11
13
|
Layout/LineLength:
|
12
14
|
Max: 80
|
13
|
-
|
15
|
+
Metrics/ClassLength:
|
16
|
+
Max: 150
|
14
17
|
Style/StringConcatenation:
|
15
18
|
Enabled: false
|
16
|
-
|
17
19
|
Style/OptionalBooleanParameter:
|
18
20
|
Enabled: false
|
data/HISTORY.md
CHANGED
@@ -1,5 +1,26 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 5.4.4 (2021-02-01)
|
4
|
+
* Fix credential validation on writer classes.
|
5
|
+
* Improve tests for writer classes
|
6
|
+
* Change the level of "wire format" messages from `INFO` to `DEBUG`.
|
7
|
+
* Officially support Ruby 3.0.0.
|
8
|
+
* Move off Travis, and on to Github Actions.
|
9
|
+
* Modernise linting and use of linter.
|
10
|
+
|
11
|
+
## 5.4.3 (2021-01-28)
|
12
|
+
* Always pass through invalid timestamp on time-parsing error.
|
13
|
+
|
14
|
+
## 5.4.2 (2021-01-11)
|
15
|
+
* Fix bug which blocked event updates.
|
16
|
+
|
17
|
+
## 5.4.1 (2020-12-17)
|
18
|
+
* Fix error on derived metric modification.
|
19
|
+
|
20
|
+
## 5.4.0 (2020-12-16)
|
21
|
+
* Add `raw_response` option, which makes the SDK return the raw API response
|
22
|
+
as plain JSON text, rather than as a `Wavefront::Response` object.
|
23
|
+
|
3
24
|
## 5.3.1 (2020-12-11)
|
4
25
|
* Fix error when renaming ingestion policies, and improve testing which should
|
5
26
|
have caught the problem in the first place.
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# wavefront-sdk
|
2
|
-
|
2
|
+
  [](https://codeclimate.com/github/snltd/wavefront-sdk) [](https://codeclimate.com/github/snltd/wavefront-sdk) [](https://badge.fury.io/rb/wavefront-sdk) 
|
3
3
|
|
4
4
|
This is a Ruby SDK for v2 of
|
5
5
|
[Wavefront](https://www.wavefront.com/)'s public API. It aims to be
|
@@ -15,8 +15,7 @@ module Wavefront
|
|
15
15
|
class ApiCaller
|
16
16
|
include Wavefront::Mixins
|
17
17
|
|
18
|
-
attr_reader :opts, :noop, :debug, :verbose, :net, :logger,
|
19
|
-
:calling_class
|
18
|
+
attr_reader :opts, :noop, :debug, :verbose, :net, :logger, :calling_class
|
20
19
|
|
21
20
|
# @param calling_class [
|
22
21
|
# @param creds [Hash] Wavefront credentials
|
@@ -135,7 +134,7 @@ module Wavefront
|
|
135
134
|
def post(path, body = nil, ctype = 'text/plain')
|
136
135
|
body = body.to_json unless body.is_a?(String)
|
137
136
|
make_call(mk_conn(path, 'Content-Type': ctype,
|
138
|
-
|
137
|
+
Accept: 'application/json'),
|
139
138
|
:post, nil, body)
|
140
139
|
end
|
141
140
|
|
@@ -150,7 +149,7 @@ module Wavefront
|
|
150
149
|
#
|
151
150
|
def put(path, body = nil, ctype = 'application/json')
|
152
151
|
make_call(mk_conn(path, 'Content-Type': ctype,
|
153
|
-
|
152
|
+
Accept: 'application/json'),
|
154
153
|
:put, nil, body.to_json)
|
155
154
|
end
|
156
155
|
|
@@ -178,7 +177,9 @@ module Wavefront
|
|
178
177
|
resp.body
|
179
178
|
end
|
180
179
|
|
181
|
-
|
180
|
+
return body if opts[:raw_response]
|
181
|
+
|
182
|
+
Wavefront::Response.new(body, resp.status, opts)
|
182
183
|
end
|
183
184
|
|
184
185
|
# Try to describe the actual HTTP calls we make. There's a bit
|
@@ -6,61 +6,117 @@ module Wavefront
|
|
6
6
|
#
|
7
7
|
class Exception
|
8
8
|
class CredentialError < RuntimeError; end
|
9
|
+
|
9
10
|
class EmptyMetricName < RuntimeError; end
|
11
|
+
|
10
12
|
class EnumerableError < RuntimeError; end
|
13
|
+
|
11
14
|
class InvalidAccountId < RuntimeError; end
|
15
|
+
|
12
16
|
class InvalidAlertId < RuntimeError; end
|
17
|
+
|
13
18
|
class InvalidAlertSeverity < RuntimeError; end
|
19
|
+
|
14
20
|
class InvalidApiTokenId < RuntimeError; end
|
21
|
+
|
15
22
|
class InvalidAwsExternalId < RuntimeError; end
|
23
|
+
|
16
24
|
class InvalidConfigFile < RuntimeError; end
|
25
|
+
|
17
26
|
class InvalidCloudIntegrationId < RuntimeError; end
|
27
|
+
|
18
28
|
class InvalidDashboardId < RuntimeError; end
|
29
|
+
|
19
30
|
class InvalidDerivedMetricId < RuntimeError; end
|
31
|
+
|
20
32
|
class InvalidDistribution < RuntimeError; end
|
33
|
+
|
21
34
|
class InvalidDistributionInterval < RuntimeError; end
|
35
|
+
|
22
36
|
class InvalidDistributionCount < RuntimeError; end
|
37
|
+
|
23
38
|
class InvalidEndpoint < RuntimeError; end
|
39
|
+
|
24
40
|
class InvalidEventId < RuntimeError; end
|
41
|
+
|
25
42
|
class InvalidExternalLinkId < RuntimeError; end
|
43
|
+
|
26
44
|
class InvalidGranularity < RuntimeError; end
|
45
|
+
|
27
46
|
class InvalidHostname < RuntimeError; end
|
47
|
+
|
28
48
|
class InvalidIngestionPolicyId < RuntimeError; end
|
49
|
+
|
29
50
|
class InvalidIntegrationId < RuntimeError; end
|
51
|
+
|
30
52
|
class InvalidLinkTemplate < RuntimeError; end
|
53
|
+
|
31
54
|
class InvalidMaintenanceWindowId < RuntimeError; end
|
55
|
+
|
32
56
|
class InvalidMonitoredClusterId < RuntimeError; end
|
57
|
+
|
33
58
|
class InvalidMessageId < RuntimeError; end
|
59
|
+
|
34
60
|
class InvalidMetricName < RuntimeError; end
|
61
|
+
|
35
62
|
class InvalidMetricValue < RuntimeError; end
|
63
|
+
|
36
64
|
class InvalidName < RuntimeError; end
|
65
|
+
|
37
66
|
class InvalidNotificantId < RuntimeError; end
|
67
|
+
|
38
68
|
class InvalidPermission < RuntimeError; end
|
69
|
+
|
39
70
|
class InvalidPoint < RuntimeError; end
|
71
|
+
|
40
72
|
class InvalidPrefixLength < RuntimeError; end
|
73
|
+
|
41
74
|
class InvalidProxyId < RuntimeError; end
|
75
|
+
|
42
76
|
class InvalidRoleId < RuntimeError; end
|
77
|
+
|
43
78
|
class InvalidRelativeTime < RuntimeError; end
|
79
|
+
|
44
80
|
class InvalidSamplingValue < RuntimeError; end
|
81
|
+
|
45
82
|
class InvalidSavedSearchEntity < RuntimeError; end
|
83
|
+
|
46
84
|
class InvalidSavedSearchId < RuntimeError; end
|
85
|
+
|
47
86
|
class InvalidServiceAccountId < RuntimeError; end
|
87
|
+
|
48
88
|
class InvalidSourceId < RuntimeError; end
|
89
|
+
|
49
90
|
class InvalidString < RuntimeError; end
|
91
|
+
|
50
92
|
class InvalidTag < RuntimeError; end
|
93
|
+
|
51
94
|
class InvalidTimeFormat < RuntimeError; end
|
95
|
+
|
52
96
|
class InvalidTimeUnit < RuntimeError; end
|
97
|
+
|
53
98
|
class InvalidTimestamp < RuntimeError; end
|
99
|
+
|
54
100
|
class InvalidUserId < RuntimeError; end
|
101
|
+
|
55
102
|
class InvalidUserGroupId < RuntimeError; end
|
103
|
+
|
56
104
|
class InvalidVersion < RuntimeError; end
|
105
|
+
|
57
106
|
class InvalidWebhookId < RuntimeError; end
|
107
|
+
|
58
108
|
class MissingConfigProfile < RuntimeError; end
|
109
|
+
|
59
110
|
class NetworkTimeout < RuntimeError; end
|
111
|
+
|
60
112
|
class NotImplemented < RuntimeError; end
|
113
|
+
|
61
114
|
class SocketError < RuntimeError; end
|
115
|
+
|
62
116
|
class UnparseableResponse < RuntimeError; end
|
117
|
+
|
63
118
|
class UnsupportedWriter < RuntimeError; end
|
119
|
+
|
64
120
|
class ValueOutOfRange < RuntimeError; end
|
65
121
|
end
|
66
122
|
end
|
@@ -65,12 +65,14 @@ module Wavefront
|
|
65
65
|
# @return void
|
66
66
|
#
|
67
67
|
def populate(raw)
|
68
|
+
creds_keys = %i[endpoint token]
|
69
|
+
proxy_keys = %i[proxy port]
|
70
|
+
all_keys = creds_keys + proxy_keys
|
71
|
+
|
68
72
|
@config = Map(raw)
|
69
|
-
@creds = Map(raw.select { |k, _v|
|
70
|
-
@proxy = Map(raw.select { |k, _v|
|
71
|
-
@all = Map(raw.select
|
72
|
-
%i[proxy port endpoint token].include?(k)
|
73
|
-
end)
|
73
|
+
@creds = Map(raw.select { |k, _v| creds_keys.include?(k) })
|
74
|
+
@proxy = Map(raw.select { |k, _v| proxy_keys.include?(k) })
|
75
|
+
@all = Map(raw.select { |k, _v| all_keys.include?(k) })
|
74
76
|
end
|
75
77
|
|
76
78
|
# @return [Array] a list of possible credential files
|
data/lib/wavefront-sdk/event.rb
CHANGED
@@ -12,7 +12,7 @@ module Wavefront
|
|
12
12
|
include Wavefront::Mixin::Tag
|
13
13
|
|
14
14
|
def update_keys
|
15
|
-
%i[
|
15
|
+
%i[id name]
|
16
16
|
end
|
17
17
|
|
18
18
|
# GET /api/v2/event
|
@@ -28,6 +28,7 @@ module Wavefront
|
|
28
28
|
# @param limit [Integer] the number of events to return
|
29
29
|
# @return [Wavefront::Response]
|
30
30
|
#
|
31
|
+
# rubocop:disable Metrics/ParameterLists
|
31
32
|
def list(from = nil, to = Time.now, limit = 100, cursor = nil)
|
32
33
|
raise ArgumentError unless from && to
|
33
34
|
|
@@ -37,6 +38,7 @@ module Wavefront
|
|
37
38
|
wf_ms_ts?(body[:latestStartTimeEpochMillis])
|
38
39
|
api.get('', body.cleanse)
|
39
40
|
end
|
41
|
+
# rubocop:enable Metrics/ParameterLists
|
40
42
|
|
41
43
|
# POST /api/v2/event
|
42
44
|
# Create a specific event.
|
@@ -100,7 +102,9 @@ module Wavefront
|
|
100
102
|
|
101
103
|
return api.put(id, body, 'application/json') unless modify
|
102
104
|
|
103
|
-
api.put(id,
|
105
|
+
api.put(id,
|
106
|
+
hash_for_update(describe(id).response, body),
|
107
|
+
'application/json')
|
104
108
|
end
|
105
109
|
|
106
110
|
# POST /api/v2/event/id/close
|
data/lib/wavefront-sdk/query.rb
CHANGED
@@ -30,6 +30,7 @@ module Wavefront
|
|
30
30
|
# @raise [ArgumentError] if query is not a string
|
31
31
|
# @return [Wavefront::Response]
|
32
32
|
#
|
33
|
+
# rubocop:disable Metrics/ParameterLists
|
33
34
|
def query(query, granularity = nil, t_start = nil, t_end = nil,
|
34
35
|
options = {})
|
35
36
|
|
@@ -45,6 +46,7 @@ module Wavefront
|
|
45
46
|
|
46
47
|
api.get('api', options)
|
47
48
|
end
|
49
|
+
# rubocop:enable Metrics/ParameterLists
|
48
50
|
|
49
51
|
# GET /api/v2/chart/raw
|
50
52
|
# Perform a raw data query against Wavefront servers that
|
data/lib/wavefront-sdk/search.rb
CHANGED
@@ -113,6 +113,7 @@ module Wavefront
|
|
113
113
|
# specified in the body. See the Swagger docs for more
|
114
114
|
# information.
|
115
115
|
#
|
116
|
+
# rubocop:disable Metrics/ParameterLists
|
116
117
|
def raw_facet_search(entity = nil, body = nil, deleted = false,
|
117
118
|
facet = false)
|
118
119
|
raise ArgumentError unless entity.is_a?(String) && body.is_a?(Hash)
|
@@ -122,5 +123,6 @@ module Wavefront
|
|
122
123
|
path.<< facet || 'facets'
|
123
124
|
api.post(path, body, 'application/json')
|
124
125
|
end
|
126
|
+
# rubocop:enable Metrics/ParameterLists
|
125
127
|
end
|
126
128
|
end
|
@@ -48,8 +48,8 @@ module Wavefront
|
|
48
48
|
#
|
49
49
|
def wf_metric_name?(metric)
|
50
50
|
if metric.is_a?(String) && metric.size < 1024 &&
|
51
|
-
(metric.match(/^#{DELTA}?[\w\-.]+$/) ||
|
52
|
-
metric.match(%r{^"#{DELTA}?[\w\-./,]+"$}))
|
51
|
+
(metric.match(/^#{DELTA}?[\w\-.]+$/o) ||
|
52
|
+
metric.match(%r{^"#{DELTA}?[\w\-./,]+"$}o))
|
53
53
|
return true
|
54
54
|
end
|
55
55
|
|
data/lib/wavefront-sdk/write.rb
CHANGED
@@ -118,7 +118,7 @@ module Wavefront
|
|
118
118
|
summary = { sent: 0, rejected: 0, unsent: 0 }
|
119
119
|
|
120
120
|
%i[sent rejected unsent].each do |k|
|
121
|
-
summary[k] = responses.
|
121
|
+
summary[k] = responses.sum { |r| r.response[k] }
|
122
122
|
end
|
123
123
|
|
124
124
|
Wavefront::Response.new(
|
@@ -19,12 +19,12 @@ module Wavefront
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def validate_credentials(creds)
|
22
|
-
unless creds.key?(:endpoint)
|
22
|
+
unless creds.key?(:endpoint) && creds[:endpoint]
|
23
23
|
raise(Wavefront::Exception::CredentialError,
|
24
24
|
'credentials must contain API endpoint')
|
25
25
|
end
|
26
26
|
|
27
|
-
return
|
27
|
+
return if creds.key?(:token) && creds[:token]
|
28
28
|
|
29
29
|
raise(Wavefront::Exception::CredentialError,
|
30
30
|
'credentials must contain API token')
|
@@ -29,10 +29,10 @@ module Wavefront
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def validate_credentials(creds)
|
32
|
-
return true if creds.key?(:proxy)
|
32
|
+
return true if creds.key?(:proxy) && creds[:proxy]
|
33
33
|
|
34
34
|
raise(Wavefront::Exception::CredentialError,
|
35
|
-
'credentials must contain proxy')
|
35
|
+
'credentials must contain proxy address')
|
36
36
|
end
|
37
37
|
|
38
38
|
def chunk_size
|
@@ -35,10 +35,10 @@ module Wavefront
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def validate_credentials(creds)
|
38
|
-
return
|
38
|
+
return if creds.key?(:proxy) && creds[:proxy]
|
39
39
|
|
40
40
|
raise(Wavefront::Exception::CredentialError,
|
41
|
-
'
|
41
|
+
'credentials must contain proxy address')
|
42
42
|
end
|
43
43
|
|
44
44
|
private
|
@@ -6,8 +6,7 @@ require_relative 'core'
|
|
6
6
|
module Wavefront
|
7
7
|
module Writer
|
8
8
|
#
|
9
|
-
# Everything specific to writing points to a Unix datagram
|
10
|
-
# socket.
|
9
|
+
# Everything specific to writing points to a Unix datagram socket.
|
11
10
|
#
|
12
11
|
class Unix < Core
|
13
12
|
# Make a connection to a Unix datagram socket, putting the
|
@@ -33,10 +32,10 @@ module Wavefront
|
|
33
32
|
end
|
34
33
|
|
35
34
|
def validate_credentials(creds)
|
36
|
-
return
|
35
|
+
return if creds.key?(:socket) && creds[:socket]
|
37
36
|
|
38
37
|
raise(Wavefront::Exception::CredentialError,
|
39
|
-
'
|
38
|
+
'credentials must contain socket file path')
|
40
39
|
end
|
41
40
|
|
42
41
|
private
|
@@ -48,10 +47,11 @@ module Wavefront
|
|
48
47
|
raise Wavefront::Exception::InvalidEndpoint
|
49
48
|
end
|
50
49
|
|
51
|
-
# @param point [String] point or points in native Wavefront
|
52
|
-
# format.
|
50
|
+
# @param point [String] point or points in native Wavefront format.
|
53
51
|
#
|
54
52
|
def _send_point(point)
|
53
|
+
return if opts[:noop]
|
54
|
+
|
55
55
|
conn.write(point)
|
56
56
|
end
|
57
57
|
end
|
data/spec/.rubocop.yml
CHANGED
@@ -1,23 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
inherit_from:
|
2
|
+
- ../.rubocop.yml
|
3
3
|
|
4
4
|
Metrics/AbcSize:
|
5
5
|
Max: 64
|
6
|
-
|
7
|
-
# Configuration parameters: CountComments.
|
8
6
|
Metrics/ClassLength:
|
9
7
|
Max: 400
|
10
|
-
|
11
|
-
# Configuration parameters: CountComments, ExcludedMethods.
|
12
8
|
Metrics/MethodLength:
|
13
9
|
Max: 39
|
14
|
-
|
15
|
-
# Is nothing sacred?
|
16
|
-
Layout/LineLength:
|
17
|
-
Max: 80
|
18
|
-
|
19
|
-
Style/StringConcatenation:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
Style/OptionalBooleanParameter:
|
10
|
+
Naming/VariableNumber:
|
23
11
|
Enabled: false
|
data/spec/constants.rb
CHANGED
@@ -26,7 +26,7 @@ U_ACL_1 = 'someone@example.com'
|
|
26
26
|
U_ACL_2 = 'other@elsewhere.com'
|
27
27
|
GRP_ACL = 'f8dc0c14-91a0-4ca9-8a2a-7d47f4db4672'
|
28
28
|
|
29
|
-
DEFAULT_HEADERS = {
|
29
|
+
DEFAULT_HEADERS = { Accept: /.*/,
|
30
30
|
'Accept-Encoding': /.*/,
|
31
|
-
|
31
|
+
Authorization: 'Bearer 0123456789-ABCDEF',
|
32
32
|
'User-Agent': /wavefront-sdk \d+\.\d+\.\d+/ }.freeze
|
data/spec/support/mocket.rb
CHANGED
@@ -115,12 +115,12 @@ class WavefrontMetricHelperTest < MiniTest::Test
|
|
115
115
|
out = wfd.dists_to_wf(input)
|
116
116
|
assert_instance_of(Array, out)
|
117
117
|
assert_equal(3, out.size)
|
118
|
-
assert_equal(1, out.
|
118
|
+
assert_equal(1, out.count do |o|
|
119
119
|
o[:value] == [[2, 10.0], [1, 11.0],
|
120
120
|
[1, 12.0]]
|
121
|
-
end
|
122
|
-
assert_equal(1, out.
|
123
|
-
assert_equal(3, out.
|
121
|
+
end)
|
122
|
+
assert_equal(1, out.count { |o| o[:tags] == WH_TAGS })
|
123
|
+
assert_equal(3, out.count { |o| o[:path] == 'test.dist1' })
|
124
124
|
end
|
125
125
|
|
126
126
|
def test_flush_gauges
|
@@ -84,7 +84,7 @@ class WavefrontValidatorsTest < MiniTest::Test
|
|
84
84
|
{ tag1: 'val 1', tag2: 'val 2' },
|
85
85
|
{ TAG1: 'val 1', tag2: 'val 2' },
|
86
86
|
{ 'TAG-1': 'val 1', tag2: 'val 2' },
|
87
|
-
{
|
87
|
+
{ TAG_1: 'val 1', tag_2: 'val 2' },
|
88
88
|
{ 'TAG.1': 'val 1', tag_2: 'val 2' },
|
89
89
|
{ 'TAG-1': 'val 1', tag2: 'val 2' },
|
90
90
|
{ tag1: '(>_<)', tag2: '^_^' }]
|
@@ -42,5 +42,9 @@ class WavefrontWriterApiTest < MiniTest::Test
|
|
42
42
|
assert_raises(Wavefront::Exception::CredentialError) do
|
43
43
|
Wavefront::Write.new({ token: 'abcdef' }, writer: :api)
|
44
44
|
end
|
45
|
+
|
46
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
47
|
+
Wavefront::Write.new({ token: 'abcdef', endpoint: nil }, writer: :api)
|
48
|
+
end
|
45
49
|
end
|
46
50
|
end
|
@@ -6,9 +6,7 @@ require_relative '../../spec_helper'
|
|
6
6
|
require_relative '../../../lib/wavefront-sdk/writers/core'
|
7
7
|
require_relative '../resources/dummy_points'
|
8
8
|
|
9
|
-
|
10
|
-
WBWT_CREDS = { endpoint: 'stub.wavefront.com', token: 'tkn' }
|
11
|
-
# rubocop:enable Style/MutableConstant
|
9
|
+
WBWT_CREDS = { endpoint: 'stub.wavefront.com', token: 'tkn' }.freeze
|
12
10
|
|
13
11
|
# Fake class for testing
|
14
12
|
#
|
@@ -6,6 +6,7 @@ require_relative '../resources/dummy_points'
|
|
6
6
|
require_relative '../../../lib/wavefront-sdk/write'
|
7
7
|
|
8
8
|
BODY = 'test.metric 123456 1469987572 source=testhost t1="v1" t2="v2"'
|
9
|
+
WH_CREDS = { proxy: 'wavefront-proxy' }.freeze
|
9
10
|
|
10
11
|
# Test HTTP transport
|
11
12
|
#
|
@@ -20,27 +21,6 @@ class WavefrontWriterSocketTest < MiniTest::Test
|
|
20
21
|
assert_instance_of(Wavefront::Writer::Http, wf.writer)
|
21
22
|
end
|
22
23
|
|
23
|
-
def test_validate_credentials
|
24
|
-
assert Wavefront::Write.new({ proxy: 'wavefront' }, writer: :http)
|
25
|
-
assert_instance_of(Wavefront::Write, wf)
|
26
|
-
|
27
|
-
assert_raises(Wavefront::Exception::CredentialError) do
|
28
|
-
Wavefront::Write.new(CREDS, writer: :http)
|
29
|
-
end
|
30
|
-
|
31
|
-
assert_raises(Wavefront::Exception::CredentialError) do
|
32
|
-
Wavefront::Write.new({}, writer: :http)
|
33
|
-
end
|
34
|
-
|
35
|
-
assert_raises(Wavefront::Exception::CredentialError) do
|
36
|
-
Wavefront::Write.new({ endpoint: 'wavefront.com' }, writer: :http)
|
37
|
-
end
|
38
|
-
|
39
|
-
assert_raises(Wavefront::Exception::CredentialError) do
|
40
|
-
Wavefront::Write.new({ token: 'abcdef' }, writer: :http)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
24
|
def test_write_2878
|
45
25
|
wf1 = Wavefront::Write.new({ proxy: 'wavefront' }, writer: :http)
|
46
26
|
|
@@ -67,4 +47,27 @@ class WavefrontWriterSocketTest < MiniTest::Test
|
|
67
47
|
assert_requested(:post, 'http://wavefront:1234', headers: POST_HEADERS)
|
68
48
|
WebMock.reset!
|
69
49
|
end
|
50
|
+
|
51
|
+
def test_validate_credentials
|
52
|
+
assert(Wavefront::Write.new(WH_CREDS, writer: :http))
|
53
|
+
|
54
|
+
assert_instance_of(Wavefront::Write,
|
55
|
+
Wavefront::Write.new(WH_CREDS, writer: :http))
|
56
|
+
|
57
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
58
|
+
Wavefront::Write.new({}, writer: :http)
|
59
|
+
end
|
60
|
+
|
61
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
62
|
+
Wavefront::Write.new({ endpoint: 'wavefront.com' }, writer: :http)
|
63
|
+
end
|
64
|
+
|
65
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
66
|
+
Wavefront::Write.new({ token: 'abcdef' }, writer: :http)
|
67
|
+
end
|
68
|
+
|
69
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
70
|
+
Wavefront::Write.new({ proxy: nil }, writer: :http)
|
71
|
+
end
|
72
|
+
end
|
70
73
|
end
|
@@ -6,17 +6,14 @@ require 'spy'
|
|
6
6
|
require 'spy/integration'
|
7
7
|
require 'socket'
|
8
8
|
require 'logger'
|
9
|
+
require_relative '../resources/dummy_points'
|
9
10
|
require_relative '../../spec_helper'
|
10
11
|
require_relative '../../../lib/wavefront-sdk/write'
|
11
|
-
require_relative '
|
12
|
+
require_relative '../../../spec/support/mocket'
|
12
13
|
|
13
|
-
|
14
|
-
WS_CREDS = { proxy: 'wavefront-proxy' }
|
15
|
-
# rubocop:enable Style/MutableConstant
|
14
|
+
WS_CREDS = { proxy: 'wavefront-proxy' }.freeze
|
16
15
|
|
17
|
-
#
|
18
|
-
# own. It makes far more sense to test the Write interface which
|
19
|
-
# calls it.
|
16
|
+
# The Socket class writes to a proxy
|
20
17
|
#
|
21
18
|
class WavefrontWriterSocketTest < MiniTest::Test
|
22
19
|
attr_reader :wf, :wf_noop
|
@@ -106,4 +103,27 @@ class WavefrontWriterSocketTest < MiniTest::Test
|
|
106
103
|
refute tcp_spy.has_been_called?
|
107
104
|
refute log_spy.has_been_called?
|
108
105
|
end
|
106
|
+
|
107
|
+
def test_validate_credentials
|
108
|
+
assert(Wavefront::Write.new(WS_CREDS, writer: :socket))
|
109
|
+
|
110
|
+
assert_instance_of(Wavefront::Write,
|
111
|
+
Wavefront::Write.new(WS_CREDS, writer: :socket))
|
112
|
+
|
113
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
114
|
+
Wavefront::Write.new({}, writer: :socket)
|
115
|
+
end
|
116
|
+
|
117
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
118
|
+
Wavefront::Write.new({ endpoint: 'wavefront.com' }, writer: :socket)
|
119
|
+
end
|
120
|
+
|
121
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
122
|
+
Wavefront::Write.new({ token: 'abcdef' }, writer: :socket)
|
123
|
+
end
|
124
|
+
|
125
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
126
|
+
Wavefront::Write.new({ proxy: nil }, writer: :socket)
|
127
|
+
end
|
128
|
+
end
|
109
129
|
end
|
@@ -0,0 +1,131 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'webmock/minitest'
|
5
|
+
require 'spy'
|
6
|
+
require 'spy/integration'
|
7
|
+
require 'socket'
|
8
|
+
require 'logger'
|
9
|
+
require_relative '../resources/dummy_points'
|
10
|
+
require_relative '../../spec_helper'
|
11
|
+
require_relative '../../../lib/wavefront-sdk/write'
|
12
|
+
require_relative '../../../spec/support/mocket'
|
13
|
+
|
14
|
+
UNIX_SOCK = '/tmp/testsock'
|
15
|
+
|
16
|
+
WU_CREDS = { socket: UNIX_SOCK }.freeze
|
17
|
+
|
18
|
+
# Test UNIX Datagram socket writing
|
19
|
+
#
|
20
|
+
class WavefrontWriterUnixTest < MiniTest::Test
|
21
|
+
attr_reader :wf, :wf_noop
|
22
|
+
|
23
|
+
def setup
|
24
|
+
@wf = Wavefront::Write.new(WU_CREDS, writer: :unix)
|
25
|
+
@wf_noop = Wavefront::Write.new(WU_CREDS, writer: :unix, noop: true)
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_writer_class
|
29
|
+
assert_instance_of(Wavefront::Writer::Unix, wf.writer)
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_write_openclose
|
33
|
+
mocket = Mocket.new
|
34
|
+
Spy.on(UNIXSocket, :new).and_return(mocket)
|
35
|
+
mocket_spy = Spy.on(mocket, :write)
|
36
|
+
wf.write(POINT)
|
37
|
+
assert mocket_spy.has_been_called?
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_write_noop
|
41
|
+
mocket = Mocket.new
|
42
|
+
Spy.on(UNIXSocket, :new).and_return(mocket)
|
43
|
+
mocket_spy = Spy.on(mocket, :write)
|
44
|
+
wf_noop.open
|
45
|
+
wf_noop.write(POINT, false)
|
46
|
+
refute mocket_spy.has_been_called?
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_write_noop_openclose
|
50
|
+
mocket = Mocket.new
|
51
|
+
Spy.on(UNIXSocket, :new).and_return(mocket)
|
52
|
+
mocket_spy = Spy.on(mocket, :write)
|
53
|
+
wf_noop.write(POINT)
|
54
|
+
refute mocket_spy.has_been_called?
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_write
|
58
|
+
mocket = Mocket.new
|
59
|
+
Spy.on(UNIXSocket, :new).and_return(mocket)
|
60
|
+
mocket_spy = Spy.on(mocket, :write)
|
61
|
+
wf.open
|
62
|
+
wf.write(POINT, false)
|
63
|
+
assert mocket_spy.has_been_called?
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_write_array
|
67
|
+
mocket = Mocket.new
|
68
|
+
Spy.on(UNIXSocket, :new).and_return(mocket)
|
69
|
+
mocket_spy = Spy.on(mocket, :write)
|
70
|
+
wf.open
|
71
|
+
wf.write(POINT_A, false)
|
72
|
+
assert mocket_spy.has_been_called?
|
73
|
+
end
|
74
|
+
|
75
|
+
def test_noop_send_point
|
76
|
+
mocket = Mocket.new
|
77
|
+
Spy.on(UNIXSocket, :new).and_return(mocket)
|
78
|
+
mocket_spy = Spy.on(mocket, :write)
|
79
|
+
wf_noop.open
|
80
|
+
wf_noop.send_point(POINT_L)
|
81
|
+
refute mocket_spy.has_been_called?
|
82
|
+
end
|
83
|
+
|
84
|
+
def test_open
|
85
|
+
tcp_spy = Spy.on(UNIXSocket, :new)
|
86
|
+
wf.open
|
87
|
+
assert tcp_spy.has_been_called?
|
88
|
+
assert_equal([UNIX_SOCK], tcp_spy.calls.first.args)
|
89
|
+
end
|
90
|
+
|
91
|
+
def test_noop_open
|
92
|
+
tcp_spy = Spy.on(UNIXSocket, :new)
|
93
|
+
log_spy = Spy.on(wf_noop.logger, :log)
|
94
|
+
wf_noop.open
|
95
|
+
refute tcp_spy.has_been_called?
|
96
|
+
assert_equal(['No-op requested. Not opening socket connection.'],
|
97
|
+
log_spy.calls.last.args)
|
98
|
+
assert_equal(1, log_spy.calls.size)
|
99
|
+
end
|
100
|
+
|
101
|
+
def test_noop_close
|
102
|
+
tcp_spy = Spy.on(UNIXSocket, :new)
|
103
|
+
log_spy = Spy.on(wf_noop.logger, :log)
|
104
|
+
wf_noop.close
|
105
|
+
refute tcp_spy.has_been_called?
|
106
|
+
refute log_spy.has_been_called?
|
107
|
+
end
|
108
|
+
|
109
|
+
def test_validate_credentials
|
110
|
+
assert(Wavefront::Write.new(WU_CREDS, writer: :unix))
|
111
|
+
|
112
|
+
assert_instance_of(Wavefront::Write,
|
113
|
+
Wavefront::Write.new(WU_CREDS, writer: :unix))
|
114
|
+
|
115
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
116
|
+
Wavefront::Write.new({}, writer: :unix)
|
117
|
+
end
|
118
|
+
|
119
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
120
|
+
Wavefront::Write.new({ endpoint: 'wavefront.com' }, writer: :unix)
|
121
|
+
end
|
122
|
+
|
123
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
124
|
+
Wavefront::Write.new({ token: 'abcdef' }, writer: :unix)
|
125
|
+
end
|
126
|
+
|
127
|
+
assert_raises(Wavefront::Exception::CredentialError) do
|
128
|
+
Wavefront::Write.new({ proxy: nil }, writer: :unix)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
data/wavefront-sdk.gemspec
CHANGED
@@ -29,7 +29,10 @@ Gem::Specification.new do |gem|
|
|
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', '1.
|
32
|
+
gem.add_development_dependency 'rubocop', '~> 1.9'
|
33
|
+
gem.add_development_dependency 'rubocop-minitest', '~> 0.10'
|
34
|
+
gem.add_development_dependency 'rubocop-performance', '~> 1.3'
|
35
|
+
gem.add_development_dependency 'rubocop-rake', '~> 0.5'
|
33
36
|
gem.add_development_dependency 'simplecov', '~> 0.18'
|
34
37
|
gem.add_development_dependency 'spy', '1.0.0'
|
35
38
|
gem.add_development_dependency 'webmock', '~> 3.9'
|
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.4.4
|
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: 2021-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -98,16 +98,58 @@ dependencies:
|
|
98
98
|
name: rubocop
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1.
|
103
|
+
version: '1.9'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.9'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop-minitest
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0.10'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0.10'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-performance
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1.3'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1.3'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rubocop-rake
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.5'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
109
151
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
152
|
+
version: '0.5'
|
111
153
|
- !ruby/object:Gem::Dependency
|
112
154
|
name: simplecov
|
113
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,10 +213,10 @@ extensions: []
|
|
171
213
|
extra_rdoc_files: []
|
172
214
|
files:
|
173
215
|
- ".codeclimate.yml"
|
174
|
-
- ".github/workflows/
|
216
|
+
- ".github/workflows/release.yml"
|
217
|
+
- ".github/workflows/test.yml"
|
175
218
|
- ".gitignore"
|
176
219
|
- ".rubocop.yml"
|
177
|
-
- ".travis.yml"
|
178
220
|
- Gemfile
|
179
221
|
- HISTORY.md
|
180
222
|
- LICENSE.txt
|
@@ -317,6 +359,7 @@ files:
|
|
317
359
|
- spec/wavefront-sdk/writers/http_spec.rb
|
318
360
|
- spec/wavefront-sdk/writers/socket_spec.rb
|
319
361
|
- spec/wavefront-sdk/writers/summary_spec.rb
|
362
|
+
- spec/wavefront-sdk/writers/unix_spec.rb
|
320
363
|
- wavefront-sdk.gemspec
|
321
364
|
homepage: https://github.com/snltd/wavefront-sdk
|
322
365
|
licenses:
|
@@ -337,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
337
380
|
- !ruby/object:Gem::Version
|
338
381
|
version: '0'
|
339
382
|
requirements: []
|
340
|
-
rubygems_version: 3.
|
383
|
+
rubygems_version: 3.1.4
|
341
384
|
signing_key:
|
342
385
|
specification_version: 4
|
343
386
|
summary: SDK for Wavefront API v2
|
@@ -414,3 +457,4 @@ test_files:
|
|
414
457
|
- spec/wavefront-sdk/writers/http_spec.rb
|
415
458
|
- spec/wavefront-sdk/writers/socket_spec.rb
|
416
459
|
- spec/wavefront-sdk/writers/summary_spec.rb
|
460
|
+
- spec/wavefront-sdk/writers/unix_spec.rb
|
data/.github/workflows/ruby.yml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# This workflow uses actions that are not certified by GitHub.
|
2
|
-
# They are provided by a third-party and are governed by
|
3
|
-
# separate terms of service, privacy policy, and support
|
4
|
-
# documentation.
|
5
|
-
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
-
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
-
|
8
|
-
name: Ruby
|
9
|
-
|
10
|
-
on:
|
11
|
-
push:
|
12
|
-
branches: [ master ]
|
13
|
-
pull_request:
|
14
|
-
branches: [ master ]
|
15
|
-
|
16
|
-
jobs:
|
17
|
-
test:
|
18
|
-
runs-on: ubuntu-latest
|
19
|
-
strategy:
|
20
|
-
matrix:
|
21
|
-
ruby-version: [2.4.10, 2.5.8, 2.6.6, 2.7.2]
|
22
|
-
steps:
|
23
|
-
- uses: actions/checkout@v2
|
24
|
-
- name: Set up Ruby
|
25
|
-
uses: ruby/setup-ruby@v1
|
26
|
-
with:
|
27
|
-
ruby-version: ${{ matrix.ruby-version }}
|
28
|
-
bundler-cache: true
|
29
|
-
- name: Install dependencies
|
30
|
-
run: bundle install
|
31
|
-
- name: Run tests
|
32
|
-
run: bundle exec rake
|
data/.travis.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
cache: bundler
|
3
|
-
rvm:
|
4
|
-
- 2.4.9
|
5
|
-
- 2.5.8
|
6
|
-
- 2.6.6
|
7
|
-
- 2.7.2
|
8
|
-
before_install: gem install bundler --no-document
|
9
|
-
deploy:
|
10
|
-
provider: rubygems
|
11
|
-
api_key:
|
12
|
-
secure: dfmL5JwBn+u3cUmyAaDsApDa7ljGajGNz3GDcKd2J8FOt7+a758/lmL8EQ34sDT1ZFotrxn/y1RbgXlaDxAE1XDfrZbjckmx7a6wa2sqR3kBraJ2tx7CiXodbw3Z8XZf9WLb0kYGmlLtI73GNcuunMt/9f1cobqWISRLHw6b7amlO7GW2ZBZgzRS+N8TSS2dicIvKMo5HoMYU+uWLM4zDFBPnGNcMiWxh8ysLzJoKqA9kbBUyCVEZ03MlV7G71ObvWCLasKnZ3W5U+K1NbgU7mgMYfl9KIcA4y9hQ9hUCijk40SmT7ffy3P2gq8zblC/4x5Eefpau9X/bdLwXoRCIzqk05t4f45wstj2auHGK0HJwOYRtx8apdaLSgyJ5lQpGcbCRu40WR9mDkaM8m9n3u2o6GJmftCg3AN1QtsourmQB84x67LEbHzValMaokrbCol4XeWqlC+dCNLPixemQRBvcNfI3V9C6RqVGfjpoGlSTI+RkQqwm01PcxpeqIVfdMd1wnfUuAOywUO6UpvtK9TZaxg0NnVElXpPseQbtzulLwZ7R5Y3A4Ss8Z7w43c1KHxTkg54FWUOp065ItjAc4lmyORXq/2+F7sMvRN6dtCLaXTUlkYuU3cjFLIPlLGFYgqq4T4xQa+e5NEK1XW7nghv+IRfKfyVeZsB0WpY+uc=
|
13
|
-
gem: wavefront-sdk
|
14
|
-
on:
|
15
|
-
tags: true
|
16
|
-
repo: snltd/wavefront-sdk
|
17
|
-
ruby: 2.6.6
|
18
|
-
notifications:
|
19
|
-
email: false
|
20
|
-
slack:
|
21
|
-
secure: cTG5e5NsnfZCNF6mUbnz8rdxmiPvrihJJN/7vEltO6rSCR4ew+9dfga9n7N5wCu7nae3lEysbRw7vPw605VVkZrfA4gn+HUsoHbKzaKNOB6AV9a8kkbjC4y6MH7EWSD2qsUWeeINP7dNs80cqvEwU2tgtIiBWNAP+e/eCjTEQCq4UIXnEB0f0UIP4bvl3w7/fSd0iFykBiVTiXvGBWKkqbetSAcAvsV5wxbPGqrhBp5AQQ9izm0Uh/P/hv8gaqMariFYA6rIpunWmwxPCHf3B87CTdl6T8uC5bi4bfgb3mFbQUiP9TTblz2XTI3Q9tRDbcFcr4BGpjB1Lyfdy1puRi3QzP5VME5AXvDTr9GVgi9TS6EWqy7P4HC//qZziWllTLlst6R9r/NlagTsiDB/mcnxkJBvOBYAvmzXS5ID6DfNxx/xCfCZuQzp5ISoWawGCvuGHBSOlzZZXKD4AAT8/69SIVybM23Hj/YBPKVvR9brpCmIlK4YXi14SA5sInjD4zn20u/p22vlEybjlnM8td7ryuhmCYm1ptk8y0tZ4oRoK2fBNo2VTD73aXq6P2q3AKuT6A9hRbypEJgawNgOAKJEWDHdu29LfeJIUnm25MzaFzx145it2hDU2/hOUlpFq9QKsmR2pAiI17sAMgHJ15cgaeOv1soWaYJsMOZil74=
|