sensu-plugins-http 2.0.0 → 2.0.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: 95a39066cb3a991ed3c72a76eee75116bd29eb6b
4
- data.tar.gz: 6a13f65bb32146e991fe33685d6505177721da97
3
+ metadata.gz: affca08f3aef9b6807f551b57eada0ae05e3cfae
4
+ data.tar.gz: 2c39c5f2d7162f07db9b27526a8611178bf2f9fb
5
5
  SHA512:
6
- metadata.gz: 3382ead5492e3c4dfffdec1dabbd31b2ed53520542d8aafde38923088561e2d39127f4179f96d4845225fe5db1a5c65435d40afbb7a07c5a48da7f9df618be36
7
- data.tar.gz: 42b6f719e1ef650e8286e4ea6db0368ef5116170e3d7fc69e3c37e4a2bd1afabf8246067ac7bf4ce6e03394be4f2b678b31ba28d0f8f4272fad5b2b8476bff56
6
+ metadata.gz: 8a3ea2c90ce200aa36b6d8a3adbe6c7d88635a74c3080de980f17605cff1e5a7dec5a6a0cf860f89a47f0247c5203951886020a947fc9e23aa980061d71dc7d2
7
+ data.tar.gz: 0f5bf5a0a8059b0626dbf25e6c5ffcb27366256f5a42be81842b1e221afbc2aca06433c412de2e140041ed0097e059ef1947f1fd1cf69b007cf9dd9560f17f81
data/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [2.0.1] - 2017-02-21
9
+ ### Fixed
10
+ - `check-http-json`: fix incorrect "key not found" error when key value is null (@marktheunissen)
11
+
8
12
  ## [2.0.0] - 2017-02-20
9
13
  ### Breaking Changes
10
14
  - Support for Ruby < 2.1 removed. Ruby 2.0 and older are EOL.
@@ -109,7 +113,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
109
113
  ### Added
110
114
  - Initial release
111
115
 
112
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.0.0...HEAD
116
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.0.1...HEAD
117
+ [2.0.1]: https://github.com/sensu-plugins/sensu-plugins-http/compare/2.0.0...2.0.1
113
118
  [2.0.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/1.0.0...2.0.0
114
119
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/0.4.0...1.0.0
115
120
  [0.4.0]: https://github.com/sensu-plugins/sensu-plugins-http/compare/0.3.0...0.4.0
@@ -92,7 +92,7 @@ class CheckJson < Sensu::Plugin::Check::CLI
92
92
  arr_key = parent + '[' + index.to_s + ']'
93
93
 
94
94
  if arr_key == desired_key
95
- return value
95
+ return value.nil? ? 'null' : value
96
96
  end
97
97
 
98
98
  if desired_key.include? arr_key
@@ -107,7 +107,7 @@ class CheckJson < Sensu::Plugin::Check::CLI
107
107
  hash_key = parent + key_prefix + key
108
108
 
109
109
  if hash_key == desired_key
110
- return value
110
+ return value.nil? ? 'null' : value
111
111
  end
112
112
 
113
113
  if desired_key.include?(hash_key + '.') || desired_key.include?(hash_key + '[')
@@ -2,7 +2,7 @@ module SensuPluginsHttp
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
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.0.0
4
+ version: 2.0.1
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-02-20 00:00:00.000000000 Z
11
+ date: 2017-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin