sensu-plugins-http 0.2.0 → 0.2.1

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: 4a2fddf58bbc4f5e5bb4ee8cb87fe585adc4bf91
4
- data.tar.gz: ae1a525f5078688b79bc1779961467387eed9a8e
3
+ metadata.gz: 9c309c06264eee4c7d39e9a24be622984ce3c71f
4
+ data.tar.gz: a77f72ec94d1e27aea3cbe6dbb7163b46bed56f3
5
5
  SHA512:
6
- metadata.gz: 98ac5d741959215edc5a1d074f7d7d466e42c5128c6f3b536bb112c592440233ab5bfb80ac40099fee191536cf04f8f4581d2cf4f2f6ea17595cfe0235acc271
7
- data.tar.gz: 245a69230dcd50d7c1b566bf9a6349b456c20236b660f569891b3ac38e09a9e8a81bb0dbed8fd5aa9bc1343e707bd97b79e6496f08849f1c5ab9ed253899884c
6
+ metadata.gz: 9eac5ce3ff21aca15984145a8f979edb90d1b74627c6c9fa26ea3aa51911ae8921d84c8ed3d7806aaf2621022f5afbf04acf7622e718805cdcf3e09f459d426e
7
+ data.tar.gz: 93411d49c91be084810b8a518ca198ac518d841dbd2fd801eac8fad0075e948b12d43f2c093d68933506296d795106d0bb9c8b423da1f8de47f2a50bf6aa6f8b
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- F�%$�7��ހ�@����n����.U�?M3�����]W��bN8��}lN�&��_p�]�ь#^.)����-wM��E�h�YL����I�@
2
- 7��3���ҫ~�brJR}�4��yS6�"I���v�,huXoHWa֣X Lv���cHWƐ�� �&`f3�͝��ۘÐ�D�2�@Z�E���A�!m d�F�c��M5���M4���ՙk΂����G肞�s���XM� ���ѽ �D
1
+ n*�7m��n�!�as�e�$ͷ˽M�
2
+ Fs�*zM0�Ւ�uj:4�l�~�Amf�}��>Hz���d�\Oͺq����F�z)1��'�Ӄct��|unE"����W`��u �Td5,�8�%J��2.-�߯ א�WN��),�L�v������’v/�A��r�����э�=� ���D���+��E\//˼߽�K��'E�������-�!���Q^�+|�
3
+ �b�)'n��M3N�
@@ -4,10 +4,15 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4
4
  This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
5
 
6
6
  ## Unreleased
7
- - nothing
8
7
 
9
- ## 0.2.0 - 2015-11-17
8
+ ## 0.2.1 - 2015-12-14
9
+ ### Added
10
+ - Added validation check for proxy url option in check-http.rb
10
11
 
12
+ ### Fixed
13
+ - Fixed SSL verification error raised erroneously when using -e flag with check-http.rb
14
+
15
+ ## 0.2.0 - 2015-11-17
11
16
  ### Fixed
12
17
  - check-http.rb will no longer fail if the plugin timeout is longer than the net/http default timeout
13
18
  - check-http-json.rb will no longer fail when comparing strings
@@ -197,6 +197,9 @@ class CheckHttp < Sensu::Plugin::Check::CLI
197
197
  http = Net::HTTP.new(config[:host], config[:port], nil, nil)
198
198
  elsif config[:proxy_url]
199
199
  proxy_uri = URI.parse(config[:proxy_url])
200
+ if proxy_uri.host.nil?
201
+ unknown 'Invalid proxy url specified'
202
+ end
200
203
  http = Net::HTTP.new(config[:host], config[:port], proxy_uri.host, proxy_uri.port)
201
204
  else
202
205
  http = Net::HTTP.new(config[:host], config[:port])
@@ -219,10 +222,12 @@ class CheckHttp < Sensu::Plugin::Check::CLI
219
222
  unless config[:expiry].nil?
220
223
  expire_warn_date = Time.now + (config[:expiry] * 60 * 60 * 24)
221
224
  # We can't raise inside the callback, have to check when we finish.
222
- http.verify_callback = proc do |_preverify_ok, ssl_context|
225
+ http.verify_callback = proc do |preverify_ok, ssl_context|
223
226
  if ssl_context.current_cert.not_after <= expire_warn_date
224
227
  warn_cert_expire = ssl_context.current_cert.not_after
225
228
  end
229
+
230
+ preverify_ok
226
231
  end
227
232
  end
228
233
  end
@@ -2,7 +2,7 @@ module SensuPluginsHttp
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 2
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-11-17 00:00:00.000000000 Z
33
+ date: 2015-12-14 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: sensu-plugin
metadata.gz.sig CHANGED
Binary file