sensu-plugins-pagerduty 3.0.1 → 3.1.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
  SHA256:
3
- metadata.gz: a898561f9c8faa276173dcc570a4e20ea5710af9eee224c633d32cec079de0ed
4
- data.tar.gz: 8cc2058d9118c61344ff6e0769caca89a5a82ec3b7dbe64becefa823ec2cf4c0
3
+ metadata.gz: a619eda66ee13a52fc0f89bd6308696c584bc81a57b009c63620d7d255fb3caa
4
+ data.tar.gz: 2a99da1c7d3c6b5dfd540703b71fbc95d65f7f4d39ccae0a430ca54f0187c1ef
5
5
  SHA512:
6
- metadata.gz: c3efa587c416484e501a5343550470d913b82adf9b2e3fa04c6a0c62bce41918470dacd956de408e0e56a20ad852997de61ea11aa6c96330fc6ab9cc2415470b
7
- data.tar.gz: 7327d39fc842b4bd49ccfb1a096baa20c86260b82f1f65c5fe9776a361da088761e00fbc0bc70a21db8be33c7089bc8203ea08e382d8d61a5dc62f3e1f7ba60a
6
+ metadata.gz: 3af328bb52fdf31240b71c563d906bc8dc513384a212c34563d0479d89dff4e9b5575feb0eb38746246acfa46f4d175082c1edcc697b4df9fe3fc1324a1d1dd8
7
+ data.tar.gz: b7ea8751a04ee3ec249a563fd6678a078f31f0923c52bd0ab64f7610eaa6dcacb92400e3a104141668a39ef4f4cc8ef053d351a5799e4f24472e18a6f659fbcd
@@ -5,6 +5,13 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [3.1.0] - 2018-03-17
9
+ ### Added
10
+ - error handling when `json_config` key is not found to help users deal with the problem. Not great but better than a `NilClass` error (@majormoses)
11
+
12
+ ### Changed
13
+ - changed the description of `json_config` to reflect that this is a key not the json file (@majormoses)
14
+
8
15
  ## [3.0.1] - 2018-02-16
9
16
  ### Added
10
17
  - ruby 2.4 testing (@majormoses)
@@ -115,7 +122,8 @@ marking it as a stable 1.0.0 release.
115
122
  ### Added
116
123
  - initial release
117
124
 
118
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/3.0.1...HEAD
125
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/3.1.0...HEAD
126
+ [3.1.0]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/3.0.1...3,1.0
119
127
  [3.0.1]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/3.0.0...3.0.1
120
128
  [3.0.0]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/2.2.0...3.0.0
121
129
  [2.2.0]: https://github.com/sensu-plugins/sensu-plugins-pagerduty/compare/2.1.0...2.2.0
@@ -25,9 +25,9 @@ require 'pagerduty'
25
25
  #
26
26
  class PagerdutyHandler < Sensu::Handler
27
27
  option :json_config,
28
- description: 'Config Name',
29
- short: '-j JsonConfig',
30
- long: '--json_config JsonConfig',
28
+ description: 'Config key Name, this is not a path to a file but rather the key name within sensu to check',
29
+ short: '-j JsonConfigKey',
30
+ long: '--json_config JsonConfigKey',
31
31
  required: false,
32
32
  default: 'pagerduty'
33
33
 
@@ -83,6 +83,10 @@ class PagerdutyHandler < Sensu::Handler
83
83
  end
84
84
 
85
85
  def handle(pd_client = nil)
86
+ if settings[json_config].nil?
87
+ p "invalid config: #{options[:json_config]} you need to pass a key and not a file"
88
+ exit 3 # unknown
89
+ end
86
90
  incident_key_prefix = settings[json_config]['incident_key_prefix']
87
91
  description_prefix = description_prefix()
88
92
  proxy_settings = proxy_settings()
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsPagerduty
2
2
  module Version
3
3
  MAJOR = 3
4
- MINOR = 0
5
- PATCH = 1
4
+ MINOR = 1
5
+ PATCH = 0
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-pagerduty
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.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: 2018-02-17 00:00:00.000000000 Z
11
+ date: 2018-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin