wavefront-cli 4.4.2 → 4.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +3 -0
- data/lib/wavefront-cli/commands/base.rb +0 -2
- data/lib/wavefront-cli/commands/user.rb +1 -0
- data/lib/wavefront-cli/display/user.rb +4 -0
- data/lib/wavefront-cli/user.rb +5 -0
- data/lib/wavefront-cli/version.rb +1 -1
- data/spec/wavefront-cli/user_spec.rb +14 -0
- data/wavefront-cli.gemspec +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd7ffbaafe591ad3a7882420452454129ef74a3fbceda80051976086061c5a36
|
4
|
+
data.tar.gz: f0710e4b9d7ca877e4d8233d82e3bf4436ed2862ac3b9cc05c003fa8f74afbe2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9db901c23aa227d5549effb4dcea631a48f1336ce896e6d9bee23909ad84da959381b44623332d178a1805ffde305c5b08e81b8999014a4265bea1a1cefd910f
|
7
|
+
data.tar.gz: 25b4f71209418fb6c914046c1a4e09453089ba17dd42ef09b6a8933e7af099838564fdf2bedbaca4b654f624edb8c0f3478786aa8dc9c8ceaa70b233d79dfb85
|
data/HISTORY.md
CHANGED
@@ -142,12 +142,10 @@ class WavefrontCommandBase
|
|
142
142
|
# columns. This is used to indent following lines
|
143
143
|
# @param term_width [Integer] the width of the user's terminal
|
144
144
|
#
|
145
|
-
# rubocop:disable Style/FormatStringToken
|
146
145
|
def opt_row(opt_str, width, term_width = TW)
|
147
146
|
format(" %s %-#{width}s %s",
|
148
147
|
*opt_str.split(/\s+/, 3)).opt_fold(term_width, width + 5)
|
149
148
|
end
|
150
|
-
# rubocop:enable Style/FormatStringToken
|
151
149
|
|
152
150
|
# @return [Integer] the width of the column containing short and
|
153
151
|
# long options
|
@@ -27,6 +27,7 @@ class WavefrontCommandUser < WavefrontCommandBase
|
|
27
27
|
"leave #{CMN} <id> <group>...",
|
28
28
|
"grant #{CMN} <privilege> to <id>",
|
29
29
|
"revoke #{CMN} <privilege> from <id>",
|
30
|
+
"business functions #{CMN} <id>",
|
30
31
|
"search #{CMN} [-al] [-o offset] [-L limit] [-O fields] <condition>..."]
|
31
32
|
end
|
32
33
|
|
data/lib/wavefront-cli/user.rb
CHANGED
@@ -44,6 +44,11 @@ module WavefrontCli
|
|
44
44
|
wf.invite([user_body])
|
45
45
|
end
|
46
46
|
|
47
|
+
def do_business_functions
|
48
|
+
wf_user_id?(options[:'<id>'])
|
49
|
+
wf.business_functions(options[:'<id>'])
|
50
|
+
end
|
51
|
+
|
47
52
|
def import_to_create(raw)
|
48
53
|
{ emailAddress: raw['items']['identifier'],
|
49
54
|
groups: raw['items']['groups'] }.tap do |r|
|
@@ -251,6 +251,20 @@ class UserEndToEndTest < EndToEndTest
|
|
251
251
|
'- identifier: user2@example.com', out.strip)
|
252
252
|
end
|
253
253
|
|
254
|
+
def test_business_functions
|
255
|
+
quietly do
|
256
|
+
assert_cmd_gets("business functions #{id}",
|
257
|
+
"/api/v2/user/#{id}/businessFunctions")
|
258
|
+
end
|
259
|
+
|
260
|
+
assert_noop("business functions #{id}",
|
261
|
+
'uri: GET https://default.wavefront.com/api/v2/user/' \
|
262
|
+
"#{id}/businessFunctions")
|
263
|
+
assert_invalid_id("business functions #{invalid_id}")
|
264
|
+
assert_abort_on_missing_creds("business functions #{id}")
|
265
|
+
assert_usage('business functions')
|
266
|
+
end
|
267
|
+
|
254
268
|
private
|
255
269
|
|
256
270
|
def id
|
data/wavefront-cli.gemspec
CHANGED
@@ -26,11 +26,11 @@ Gem::Specification.new do |gem|
|
|
26
26
|
|
27
27
|
gem.add_runtime_dependency 'docopt', '~> 0.6.0'
|
28
28
|
gem.add_runtime_dependency 'inifile', '~> 3.0'
|
29
|
-
gem.add_runtime_dependency 'wavefront-sdk', '~> 3.
|
29
|
+
gem.add_runtime_dependency 'wavefront-sdk', '~> 3.6', '>= 3.6.0'
|
30
30
|
|
31
31
|
gem.add_development_dependency 'minitest', '~> 5.11', '>= 5.11.0'
|
32
32
|
gem.add_development_dependency 'rake', '~> 12.0'
|
33
|
-
gem.add_development_dependency 'rubocop', '~> 0.
|
33
|
+
gem.add_development_dependency 'rubocop', '~> 0.76.0'
|
34
34
|
gem.add_development_dependency 'spy', '~> 1.0.0'
|
35
35
|
gem.add_development_dependency 'webmock', '~> 3.7'
|
36
36
|
gem.add_development_dependency 'yard', '~> 0.9.5'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wavefront-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.5.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-
|
11
|
+
date: 2019-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: docopt
|
@@ -44,20 +44,20 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
47
|
+
version: '3.6'
|
48
48
|
- - ">="
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 3.
|
50
|
+
version: 3.6.0
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: '3.
|
57
|
+
version: '3.6'
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 3.
|
60
|
+
version: 3.6.0
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: minitest
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,14 +98,14 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - "~>"
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 0.
|
101
|
+
version: 0.76.0
|
102
102
|
type: :development
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
106
|
- - "~>"
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version: 0.
|
108
|
+
version: 0.76.0
|
109
109
|
- !ruby/object:Gem::Dependency
|
110
110
|
name: spy
|
111
111
|
requirement: !ruby/object:Gem::Requirement
|