sensu-cli 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b66b4ffd4f0f22354184e9102888444f2c9d7cc7
4
- data.tar.gz: 26b376578c3cf4decaeccd332b31dc2b087593ee
2
+ SHA256:
3
+ metadata.gz: fbf159930199fcb6b714921d1861be3bfcf20c8742c8e3824830aa4dbd551580
4
+ data.tar.gz: 6117a1abe7d7f7025847d0c34029e14a81626f7c3b969e984436947fa83b12d7
5
5
  SHA512:
6
- metadata.gz: 4125b72f4ca9969482246576e371d1c157da2b5faf0a26083513506fa4eff6834e18a501d891984f7d5616739694559fafb49b12429df0bea956595e1b3403ba
7
- data.tar.gz: ee3cde2598b46d1d9e9d5e36abf4675a58004baa471aab5ef111368745de13c50e1967c1b97d06cb2100e4faadb5fe4b7e864ee2af271c8777e0f835037840f1
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)
@@ -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
  }
@@ -1,3 +1,3 @@
1
1
  module SensuCli
2
- VERSION = '0.8.1'
2
+ VERSION = '0.9.0'
3
3
  end
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.8.1
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: 2017-11-03 00:00:00.000000000 Z
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.6.10
157
+ rubygems_version: 2.7.2
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: A command line utility for Sensu.