wavefront-sdk 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wavefront-sdk/event.rb +1 -1
- data/lib/wavefront-sdk/source.rb +8 -4
- data/lib/wavefront-sdk/version.rb +1 -1
- data/spec/spec_helper.rb +0 -1
- data/spec/wavefront-sdk/source_spec.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff8c467f5b0500ea1052bbbfb024585e1b124e3a
|
4
|
+
data.tar.gz: 7db790c982150218b285232b6fba145e687a5f18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b83f2c2348f9bbeb3c740cfbfe652f46114e8d39a01462467189ddb4fd58bac093e39c9d8701308754cbb48ead1d693dc7d402db015823a7f529f8f601e17fe7
|
7
|
+
data.tar.gz: 6d6f034907ce032483bf8c4d461ab944968e0b20d6b6c72b2398f211bc937bdeb4a5a31061ab081c52de4ce097f8e6cd8218da1ecec9a42caa01bdaf22a71eac
|
data/lib/wavefront-sdk/event.rb
CHANGED
@@ -19,7 +19,7 @@ module Wavefront
|
|
19
19
|
# @param to [Time, Integer] end ot time range. Can be epoch
|
20
20
|
# millisecods or a Ruby time. If not supplied, defaults to the
|
21
21
|
# current time.
|
22
|
-
# @param cursor [String]
|
22
|
+
# @param cursor [String] event from which to start listing
|
23
23
|
# @param limit [Integer] the number of events to return
|
24
24
|
# @return [Wavefront::Response]
|
25
25
|
#
|
data/lib/wavefront-sdk/source.rb
CHANGED
@@ -12,12 +12,16 @@ module Wavefront
|
|
12
12
|
# GET /api/v2/source
|
13
13
|
# Get all sources for a customer
|
14
14
|
#
|
15
|
-
# @param
|
16
|
-
# @param
|
15
|
+
# @param limit [Integer] the number of sources to return
|
16
|
+
# @param cursor [String] source at which the list begins
|
17
17
|
# @return [Wavefront::Response]
|
18
18
|
#
|
19
|
-
def list(
|
20
|
-
|
19
|
+
def list(limit = nil, cursor = nil)
|
20
|
+
qs = {}
|
21
|
+
qs[:limit] = limit if limit
|
22
|
+
qs[:cursor] = cursor if cursor
|
23
|
+
|
24
|
+
api_get('', qs)
|
21
25
|
end
|
22
26
|
|
23
27
|
# POST /api/v2/source
|
@@ -1 +1 @@
|
|
1
|
-
WF_SDK_VERSION = '0.2.
|
1
|
+
WF_SDK_VERSION = '0.2.2'.freeze
|
data/spec/spec_helper.rb
CHANGED
@@ -15,7 +15,10 @@ SOURCE_BODY = {
|
|
15
15
|
#
|
16
16
|
class WavefrontSourceTest < WavefrontTestBase
|
17
17
|
def test_list
|
18
|
-
should_work(:list,
|
18
|
+
should_work(:list, [], '')
|
19
|
+
should_work(:list, 10, '?limit=10')
|
20
|
+
should_work(:list, [10, 'mysource'], '?limit=10&cursor=mysource')
|
21
|
+
should_work(:list, [nil, 'mysource'], '?cursor=mysource')
|
19
22
|
end
|
20
23
|
|
21
24
|
def test_create
|