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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 873187a820bc7cb2248cc10eb22ce76c12d95925651baa3c53972d5f7440a892
4
- data.tar.gz: e0ab5dd4af22d88eb3f5d412dcaa08fb2e58906bf4044178c074dacde734159e
3
+ metadata.gz: cd7ffbaafe591ad3a7882420452454129ef74a3fbceda80051976086061c5a36
4
+ data.tar.gz: f0710e4b9d7ca877e4d8233d82e3bf4436ed2862ac3b9cc05c003fa8f74afbe2
5
5
  SHA512:
6
- metadata.gz: 4432d6d046bc4c55530f10d8e765e5528f04432a9cfbdc4ab4e9a0899beae778885b70035c4cc570c669c3865ce0aa91c537320c6e2d62e0167e0b0123ea44e7
7
- data.tar.gz: 2e9bb61ac0e004f412e3e00420f3e93d4795961ec3f63dc58ff6077efd1d502da4de880126ae562e5f992bc78196ee4ba61b151f14db43e62917bfbbe743be92
6
+ metadata.gz: 9db901c23aa227d5549effb4dcea631a48f1336ce896e6d9bee23909ad84da959381b44623332d178a1805ffde305c5b08e81b8999014a4265bea1a1cefd910f
7
+ data.tar.gz: 25b4f71209418fb6c914046c1a4e09453089ba17dd42ef09b6a8933e7af099838564fdf2bedbaca4b654f624edb8c0f3478786aa8dc9c8ceaa70b233d79dfb85
data/HISTORY.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.5.0 (2019-11-12)
4
+ * Add `user business functions` command.
5
+
3
6
  ## 4.4.2 (2019-10-31)
4
7
  * Bugfix: `dashboard import --update` didn't work when reading from stdin.
5
8
  * Better handling of tag values in brief listings.
@@ -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
 
@@ -84,5 +84,9 @@ module WavefrontDisplay
84
84
  id: options[:'<id>'],
85
85
  quoted_group: quoted(options[:'<group>']))
86
86
  end
87
+
88
+ def do_business_functions
89
+ puts data.sort
90
+ end
87
91
  end
88
92
  end
@@ -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|
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- WF_CLI_VERSION = '4.4.2'
3
+ WF_CLI_VERSION = '4.5.0'
@@ -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
@@ -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.5', '>= 3.5.0'
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.74.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.2
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-10-31 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: docopt
@@ -44,20 +44,20 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.5'
47
+ version: '3.6'
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 3.5.0
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.5'
57
+ version: '3.6'
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 3.5.0
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.74.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.74.0
108
+ version: 0.76.0
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: spy
111
111
  requirement: !ruby/object:Gem::Requirement