sensu-cli 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +1 -0
- data/lib/sensu-cli/api.rb +3 -0
- data/lib/sensu-cli/base.rb +1 -0
- data/lib/sensu-cli/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: fbf159930199fcb6b714921d1861be3bfcf20c8742c8e3824830aa4dbd551580
|
4
|
+
data.tar.gz: 6117a1abe7d7f7025847d0c34029e14a81626f7c3b969e984436947fa83b12d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e42596dfb9c640c57e9327c34ac9d108c78ff3fbaf998edcd86e4b9d283b828e6ca7b0594f3f6395741175ff12c01afa59d74d46a02f6e492787a8a43db5a024
|
7
|
+
data.tar.gz: 81b8b6d7dc8a7951cfecc82897fbd89179abe60259b3f014b2c478be88a59e5158004d72c927c12f2d8880e3705a1cb55b434250b55aebec814990c0ba6426b7
|
data/README.md
CHANGED
@@ -58,6 +58,7 @@ All Configuration Settings:
|
|
58
58
|
* `proxy_port` Integer - Optional
|
59
59
|
* `user` String - Optional - User for the Sensu API
|
60
60
|
* `password` String - Optional - Password for the Sensu API
|
61
|
+
* `auth_token` String - Optional - Auth Token for Sensu API
|
61
62
|
|
62
63
|
## Examples
|
63
64
|
|
data/lib/sensu-cli/api.rb
CHANGED
@@ -14,6 +14,9 @@ module SensuCli
|
|
14
14
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
15
15
|
end
|
16
16
|
proxy_header = { 'api-proxy' => 'true' }
|
17
|
+
if opts[:auth_token]
|
18
|
+
proxy_header.merge!('Authorization' => "token #{opts[:auth_token]}")
|
19
|
+
end
|
17
20
|
case opts[:method]
|
18
21
|
when 'Get'
|
19
22
|
req = Net::HTTP::Get.new(opts[:path], proxy_header)
|
data/lib/sensu-cli/base.rb
CHANGED
@@ -56,6 +56,7 @@ module SensuCli
|
|
56
56
|
:read_timeout => Config.read_timeout || 15,
|
57
57
|
:open_timeout => Config.open_timeout || 5,
|
58
58
|
:password => Config.password || nil,
|
59
|
+
:auth_token => Config.auth_token || nil,
|
59
60
|
:proxy_address => Config.proxy_address || nil,
|
60
61
|
:proxy_port => Config.proxy_port || nil
|
61
62
|
}
|
data/lib/sensu-cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Brandau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
154
|
version: '0'
|
155
155
|
requirements: []
|
156
156
|
rubyforge_project:
|
157
|
-
rubygems_version: 2.
|
157
|
+
rubygems_version: 2.7.2
|
158
158
|
signing_key:
|
159
159
|
specification_version: 4
|
160
160
|
summary: A command line utility for Sensu.
|