wavefront-sdk 3.5.0 → 3.6.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: 4a1343ef6a630b783c158b7ff3373247ea541a22e1b3428a9bacc30c4bf6c4f0
4
- data.tar.gz: bd9366f76e693b5ccafe6956ec841fde8816481bff27c24ce2f7167a150942d4
3
+ metadata.gz: cebe33cf2ebe1428fe26352575f9271d951d42d1e8ba171ae20636da3295b342
4
+ data.tar.gz: 566fc5988025e8bc3db50c7df0d4dd4cf3578b2a9156ef6cb605e4882553e6b7
5
5
  SHA512:
6
- metadata.gz: 4647a15bce3d481808699c017c21df2f08046e50a7931fc58b7b4c1249ad67315f779038aa619ec57f80ba714dff56d9cb46fed7c85feff70d1b66375e7aaea5
7
- data.tar.gz: 8578a761628a6ce77a234d12ff59c084498bc2615448aaf905c8057f2230e2fd74df2638f4bbb7e9ebf6df74a963715f1c8bff2154e5894dff1fb51b67f8ff4c
6
+ metadata.gz: 6cdc071dc6f152192e565dec067ddd756a055b5b976dc4a1a76ef254e4eae08577419662ba8411926fc2639b6280210223ba3674e0ea4097063e8ced46af1245
7
+ data.tar.gz: 85b7b0a209643379af464c8a9c1b5bf465374712ed23b148ae7a4a7c7a23ffc7535e1cef32e83e7a33dae47100ab00eaaa5aced4f5781dd14a224f97d43cbb0b
data/HISTORY.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.6.0 (2019-11-12)
4
+ * Add `User#business_functions` method.
5
+ * Update Faraday and Rubocop dependencies
6
+
3
7
  ## 3.5.0 (2019-09-30)
4
8
  * Extend `apitoken` class to cover new service account paths.
5
9
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  require 'pathname'
4
4
 
5
- WF_SDK_VERSION = '3.5.0'
5
+ WF_SDK_VERSION = '3.6.0'
6
6
  WF_SDK_LOCATION = Pathname.new(__dir__).parent.parent.parent
@@ -202,6 +202,16 @@ module Wavefront
202
202
  api.post('invite', body, 'application/json')
203
203
  end
204
204
 
205
+ # GET /api/v2/user/{id}/businessFunctions
206
+ # Returns business functions of a specific user.
207
+ # @param id [String] user ID
208
+ # @return [Wavefront::Response]
209
+ #
210
+ def business_functions(id)
211
+ wf_user_id?(id)
212
+ api.get([id, 'businessFunctions'].uri_concat)
213
+ end
214
+
205
215
  # Fake a response which looks like we get from all the other
206
216
  # paths. I'm expecting the user response model to be made
207
217
  # consistent with others in the future.
@@ -102,6 +102,14 @@ class WavefrontUserTest < WavefrontTestBase
102
102
  assert_raises(ArgumentError) { wf.invite('test') }
103
103
  end
104
104
 
105
+ def test_business_functions
106
+ assert_gets("/api/v2/user/#{id}/businessFunctions") do
107
+ wf.business_functions(id)
108
+ end
109
+
110
+ assert_raises(ArgumentError) { wf.business_functions }
111
+ end
112
+
105
113
  def test_response_shim
106
114
  (RESOURCE_DIR + 'user_responses').each_child do |input|
107
115
  # Ugly hack for the 202 in the 'create' file
@@ -23,13 +23,13 @@ Gem::Specification.new do |gem|
23
23
  gem.bindir = 'bin'
24
24
 
25
25
  gem.add_dependency 'addressable', '~> 2.7'
26
- gem.add_dependency 'faraday', '~> 0.15.4'
26
+ gem.add_dependency 'faraday', '~> 0.17.0'
27
27
  gem.add_dependency 'inifile', '~> 3.0'
28
28
  gem.add_dependency 'map', '~> 6.6'
29
29
 
30
30
  gem.add_development_dependency 'minitest', '~> 5.11'
31
31
  gem.add_development_dependency 'rake', '~> 12.3'
32
- gem.add_development_dependency 'rubocop', '~> 0.74'
32
+ gem.add_development_dependency 'rubocop', '~> 0.76'
33
33
  gem.add_development_dependency 'simplecov', '~> 0.16'
34
34
  gem.add_development_dependency 'spy', '~> 1.0.0'
35
35
  gem.add_development_dependency 'webmock', '~> 3.7'
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.5.0
4
+ version: 3.6.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-09-29 00:00:00.000000000 Z
11
+ date: 2019-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.15.4
33
+ version: 0.17.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.15.4
40
+ version: 0.17.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: inifile
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.74'
103
+ version: '0.76'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.74'
110
+ version: '0.76'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement