wavefront-sdk 3.2.0 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0d0b70537f8a1965c33603e7fa7a25493b9d9ff84d72badf3f5d587c7e51c70
4
- data.tar.gz: add8ce51bf47032fbb1436db738f2985d2448db2c9b56767f654f816bacb30a2
3
+ metadata.gz: 2c8e79cd1093418262ff15a58819de1cadedcc6a98c0450199e7b40b14424dc8
4
+ data.tar.gz: 6feebdd5b6169d943ca38277f1a37af9cd596da15537f1ae3fb0d9946c32673d
5
5
  SHA512:
6
- metadata.gz: db92c24817827d785eb1e036be8f1398d94b1e16e2da59d1f3c7eaa65dcbc42309166c10e83d9d62468f38a6ca16ddc58d834650b66cb37034d4a09e43219894
7
- data.tar.gz: 466acb6db568c0c1ac93b30fabe7b677b97df42657aa5414ae83c0ce2fa9b3dcfd52701c55a263dcb0bde232717bce6e324f59b17bc1a6dd7cbf9afd1188d126
6
+ metadata.gz: 68f31929e91bd8bf2cc49127b4e2d77d4fc901eaa945941d359b7e4a8ecfe198082f455619c2bf5f8d2baead9738f6caf55373529167c8e4201e786dc5239b91
7
+ data.tar.gz: 525ec79d3c53ffa102c6298ea2e041ef0666c0c21ce275ecd0ca24fa9e863c0984fea09e1a34d3bde16700539db987e0615bfff5e2c26282e8e6a1bc61f86247
data/HISTORY.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.3.0
4
+ * Reflect the way the API ACL format has changed.
5
+
3
6
  ## 3.2.0 (01/05/2019)
4
7
  * Add support for new `apitoken` path.
5
8
  * Add support for alert ACLs
@@ -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[Hash]] array of entities allowed to view
24
- # the object. Entities may be users or groups, and are
25
- # defined as a Hash with keys :id and :name. For users the two
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?(Hash) }
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
@@ -1,4 +1,4 @@
1
1
  require 'pathname'
2
2
 
3
- WF_SDK_VERSION = '3.2.0'.freeze
3
+ WF_SDK_VERSION = '3.3.0'.freeze
4
4
  WF_SDK_LOCATION = Pathname.new(__FILE__).dirname.parent.parent.parent
@@ -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 = { name: 'someone@example.com', id: 'someone@example.com' }.freeze
36
- U_ACL_2 = { name: 'other@elsewhere.com', id: 'other@elsewhere.com' }.freeze
37
- GRP_ACL = { name: 'example group',
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.2.0
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-05 00:00:00.000000000 Z
11
+ date: 2019-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable