sensu-plugins-http 2.2.0 → 2.3.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
2
  SHA1:
3
- metadata.gz: 6e3afdef217237a86469b5b3c02d9fbea9174cca
4
- data.tar.gz: 4af732af7c2f5d722d10f4a8cfff8a23d128c34c
3
+ metadata.gz: 92905de82a44c0638bb189e1212f248ccb9d321b
4
+ data.tar.gz: 3527f6eb5297442a8e5d3bab82bedb80f3c86f1c
5
5
  SHA512:
6
- metadata.gz: 0e9d6e5ddf2b72eaf499cc355b536d4913f9e3b4fbb44227553c31c837875afc497b10de1013ebdfdebf398ead1a50e98bf59b5b9499921e73cac0f2688e613c
7
- data.tar.gz: 21e5cacdb6206226f04e91027eecd5e0413a04ba1eb9225a83e3e108fcc3caf5d93bdd9d07f5e9daa9d9ffb01c594292e5ef94d561214d9f504e0106268801c4
6
+ metadata.gz: c5f558b70bf011ec045756b0099649590ca48404682943a656cfa13e87e8239f3a360b93cfbb5f766c8dc783db3b61fa6ab0077018b098c11ec3ba9e8a47d1ab
7
+ data.tar.gz: 881cc591aadf86025f7d3281c7c6c39d8bab2a7eaceabc19914f17f594a7a8a3915702383625b203464b213fb9f0c70bb4499962596a46a53c05a5b76ad5eda5
data/CHANGELOG.md CHANGED
@@ -1,9 +1,15 @@
1
- #Change Log
1
+ # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
4
  This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
5
 
6
6
  ## [Unreleased]
7
+
8
+ ## [2.3.0] - 2017-06-01
9
+ ### Added
10
+ - check-http.rb: support PUT requests (@majormoses)
11
+ - check-http.rb: added examples per GH issues (@majormoses)
12
+
7
13
  ## [2.2.0] - 2017-05-31
8
14
  ### Added
9
15
  - `check-http-json`: add --value-greater-than and --value-less-than options (@dave-handy)
@@ -128,7 +134,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
128
134
  ### Added
129
135
  - Initial release
130
136
 
131
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.2.0...HEAD
137
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.3.0...HEAD
138
+ [2.3.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.2.0...2.3.0
132
139
  [2.2.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.1.0...2.2.0
133
140
  [2.1.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.0.2...2.1.0
134
141
  [2.0.2]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.0.1...2.0.2
data/bin/check-http.rb CHANGED
@@ -28,6 +28,11 @@
28
28
  # Use a proxy to check a URL
29
29
  # check-http.rb -u https://www.google.com --proxy-url http://my.proxy.com:3128
30
30
  #
31
+ # Check something with needing to set multiple headers
32
+ # check-http.rb -u https://www.google.com --header 'Origin: ma.local.box, SomeRandomHeader: foo'
33
+ #
34
+ # Check something that requires a POST with json data
35
+ # check-http.rb -u https://httpbin.org/post --method POST --header 'Content-type: application/json' --body '{"foo": "bar"}'
31
36
  # NOTES:
32
37
  #
33
38
  # LICENSE:
@@ -77,9 +82,9 @@ class CheckHttp < Sensu::Plugin::Check::CLI
77
82
 
78
83
  option :method,
79
84
  short: '-m GET|POST',
80
- long: '--method GET|POST',
81
- description: 'Specify a GET or POST operation; defaults to GET',
82
- in: %w(GET POST),
85
+ long: '--method GET|POST|PUT',
86
+ description: 'Specify a GET, POST, or PUT operation; defaults to GET',
87
+ in: %w(GET POST PUT),
83
88
  default: 'GET'
84
89
 
85
90
  option :header,
@@ -271,6 +276,8 @@ class CheckHttp < Sensu::Plugin::Check::CLI
271
276
  Net::HTTP::Get.new(config[:request_uri], 'User-Agent' => config[:ua])
272
277
  when 'POST'
273
278
  Net::HTTP::Post.new(config[:request_uri], 'User-Agent' => config[:ua])
279
+ when 'PUT'
280
+ Net::HTTP::Put.new(config[:request_uri], 'User-Agent' => config[:ua])
274
281
  end
275
282
 
276
283
  unless config[:user].nil? && config[:password].nil?
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsHttp
2
2
  module Version
3
3
  MAJOR = 2
4
- MINOR = 2
4
+ MINOR = 3
5
5
  PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-31 00:00:00.000000000 Z
11
+ date: 2017-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin