sensu-plugins-dns 1.2.0 → 1.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: 4ea5d5beab135be6075b0d6852baed6faee580ff
4
- data.tar.gz: 9a96a200a5b29a3b825d854511b0c07d7e0a8fe3
3
+ metadata.gz: a9b625a7ffd03971e668c3adf1f53e60e0d54cb0
4
+ data.tar.gz: 922eb51f737e5d077af7b9ed4ed0a3c436d2103b
5
5
  SHA512:
6
- metadata.gz: 08a0d341fdae3693ad67acb449ed7774ac82684686a59b468001c7757429e176d3a063ecca927bac9982996146bce8fb9cb0428ab1dd07a75c20a516a977d419
7
- data.tar.gz: ecc6d2fb556c02325f110727f27f4407b98ff2612989a7075d5154c8be3640c16e015ae2745df25cf1aea85c84da38b7cf7f948fb52374a914d7088b1a521e95
6
+ metadata.gz: 585d972924649d10074e8d10792d83da1918c27cc5f93cbb1aef221aad0e090afead10eee978895c5126369170a80ba9892421995d18937f962c2b435ae07937
7
+ data.tar.gz: c7cdd2dedd3bd9e1707b47fb0faaeadbcf4673a8da8d8037eb4bfb5a5f3e402ad06dc01934c950ff0ba953064e2029d2714982252242f28a84c056d6445dc2bd
data/CHANGELOG.md CHANGED
@@ -4,6 +4,9 @@ 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
+ ## [1.2.1] - 2017-05-16
8
+ ### Fixed
9
+ - check-dns.rb: fixed a bug introduced in #15 as the input to check_ips changed. This bug only manifested itself when using the `-r || --result` options
7
10
  ## [1.2.0] - 2017-05-16
8
11
  ### Added
9
12
  - Add support for making multiple requests, with a threshold for success
data/bin/check-dns.rb CHANGED
@@ -212,10 +212,10 @@ class DNS < Sensu::Plugin::Check::CLI
212
212
  end
213
213
 
214
214
  def check_ips(entries)
215
- ips = entries.answer.rrsets(config[:type]).flat_map(&:rrs).map(&:address).map(&:to_s)
215
+ ips = entries.first.answer.rrsets(config[:type]).flat_map(&:rrs).map(&:address).map(&:to_s)
216
216
  result = IPAddr.new config[:result]
217
217
  if ips.any? { |ip| (IPAddr.new ip) == result }
218
- ok "Resolved #{entries.security_level} #{config[:domain]} #{config[:type]} included #{config[:result]}"
218
+ ok "Resolved #{entries.first.security_level} #{config[:domain]} #{config[:type]} included #{config[:result]}"
219
219
  else
220
220
  critical "Resolved #{config[:domain]} #{config[:type]} did not include #{config[:result]}"
221
221
  end
@@ -2,7 +2,7 @@ module SensuPluginsDNS
2
2
  module Version
3
3
  MAJOR = 1
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-dns
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu Plugins and contributors