wavefront-sdk 3.2.0 → 3.3.0
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/HISTORY.md +3 -0
- data/lib/wavefront-sdk/api_mixins/acl.rb +16 -6
- data/lib/wavefront-sdk/defs/version.rb +1 -1
- data/spec/spec_helper.rb +3 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c8e79cd1093418262ff15a58819de1cadedcc6a98c0450199e7b40b14424dc8
|
4
|
+
data.tar.gz: 6feebdd5b6169d943ca38277f1a37af9cd596da15537f1ae3fb0d9946c32673d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68f31929e91bd8bf2cc49127b4e2d77d4fc901eaa945941d359b7e4a8ecfe198082f455619c2bf5f8d2baead9738f6caf55373529167c8e4201e786dc5239b91
|
7
|
+
data.tar.gz: 525ec79d3c53ffa102c6298ea2e041ef0666c0c21ce275ecd0ca24fa9e863c0984fea09e1a34d3bde16700539db987e0615bfff5e2c26282e8e6a1bc61f86247
|
data/HISTORY.md
CHANGED
@@ -20,11 +20,9 @@ module Wavefront
|
|
20
20
|
# POST /api/v2/{entity}/acl/add
|
21
21
|
# Adds the specified ids to the given object's ACL
|
22
22
|
# @param id [String] ID of object
|
23
|
-
# @param view [Array[
|
24
|
-
# the object. Entities may be users or groups
|
25
|
-
#
|
26
|
-
# will be the same, for groups, not.
|
27
|
-
# @param modify [Array[Hash]] array of entities allowed to
|
23
|
+
# @param view [Array[String]] array of entities allowed to view
|
24
|
+
# the object. Entities may be users or groups
|
25
|
+
# @param modify [Array[String]] array of entities allowed to
|
28
26
|
# view and modify the object. Same rules as @view.
|
29
27
|
# @return [Wavefront::Response]
|
30
28
|
#
|
@@ -41,6 +39,12 @@ module Wavefront
|
|
41
39
|
#
|
42
40
|
# Though the API method is 'remove', the acl method names have
|
43
41
|
# been chosen to correspond with the tag methods.
|
42
|
+
# @param id [String] ID of object
|
43
|
+
# @param view [Array[String]] array of entities allowed to view
|
44
|
+
# the object. Entities may be users or groups
|
45
|
+
# @param modify [Array[String]] array of entities allowed to
|
46
|
+
# view and modify the object. Same rules as @view.
|
47
|
+
# @return [Wavefront::Response]
|
44
48
|
#
|
45
49
|
def acl_delete(id, view = [], modify = [])
|
46
50
|
valid_id?(id)
|
@@ -52,6 +56,12 @@ module Wavefront
|
|
52
56
|
|
53
57
|
# PUT /api/v2/{entity}/acl/set
|
54
58
|
# Set ACL for the specified object
|
59
|
+
# @param id [String] ID of object
|
60
|
+
# @param view [Array[String]] array of entities allowed to view
|
61
|
+
# the object. Entities may be users or groups
|
62
|
+
# @param modify [Array[String]] array of entities allowed to
|
63
|
+
# view and modify the object. Same rules as @view.
|
64
|
+
# @return [Wavefront::Response]
|
55
65
|
#
|
56
66
|
def acl_set(id, view = [], modify = [])
|
57
67
|
api.put(%w[acl set].uri_concat, acl_body(id, view, modify))
|
@@ -68,7 +78,7 @@ module Wavefront
|
|
68
78
|
end
|
69
79
|
|
70
80
|
def valid_acl_body?(list)
|
71
|
-
return true if list.is_a?(Array) && list.all? { |h| h.is_a?(
|
81
|
+
return true if list.is_a?(Array) && list.all? { |h| h.is_a?(String) }
|
72
82
|
raise ArgumentError
|
73
83
|
end
|
74
84
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -32,10 +32,9 @@ DUMMY_RESPONSE = '{"status":{"result":"OK","message":"","code":200},' \
|
|
32
32
|
RESOURCE_DIR = (Pathname.new(__FILE__).dirname +
|
33
33
|
'wavefront-sdk' + 'resources').freeze
|
34
34
|
|
35
|
-
U_ACL_1 =
|
36
|
-
U_ACL_2 =
|
37
|
-
GRP_ACL =
|
38
|
-
id: 'f8dc0c14-91a0-4ca9-8a2a-7d47f4db4672' }.freeze
|
35
|
+
U_ACL_1 = 'someone@example.com'.freeze
|
36
|
+
U_ACL_2 = 'other@elsewhere.com'.freeze
|
37
|
+
GRP_ACL = 'f8dc0c14-91a0-4ca9-8a2a-7d47f4db4672'.freeze
|
39
38
|
|
40
39
|
# Common testing code
|
41
40
|
class WavefrontTestBase < MiniTest::Test
|
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: 3.
|
4
|
+
version: 3.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: 2019-05-
|
11
|
+
date: 2019-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|