sensu-plugins-ecityruf 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 493070a7b68fec0a952075930049a84730f164da
4
- data.tar.gz: 77effbc02af618b95d1d3007656ba5ae5c19b260
3
+ metadata.gz: bd0d1817fb166358acb88938ed4b81edc1966c2f
4
+ data.tar.gz: 7ea338a3231ecb40e40ec19cdadc4afe431320be
5
5
  SHA512:
6
- metadata.gz: fc8ed22ba34f2dde169dbd7ccef715392bd4e1c0fe886e5f885337cca31f8c9ad9b6435ff224b3dd0dbb593021246bcb84c018e258eb72de1263ffea53d712c6
7
- data.tar.gz: a097d281a2f0e67af29429f25174115d522ece20f3f1dbddab450f9853894c0736c0bbf0130842161a708db599f1f4ce3c62858c35e25e10d414f0a4d70547db
6
+ metadata.gz: e4b328f20034bef9ca78868d3b30f8abf2486581f316442d189b5c3d0a5910d2c51556dd2d696f08a183206418b43589a5a9b66f5b2b05b396463603de88965d
7
+ data.tar.gz: e02c34019515f4c2a2bd4257664468f22ea70a662ef0c903663bce10dc5fe90e65232e512f8c1592429b0d1441e79704318e81b3eeb0ac881539fd2b5758f35b
@@ -34,21 +34,16 @@ class Ecityruf < Sensu::Handler
34
34
  uri = URI.parse(apiurl)
35
35
  uri.query = URI.encode_www_form(params)
36
36
 
37
- begin
38
- Timeout.timeout(5) do
39
- Net::HTTP.start(uri.host,
40
- uri.port,
41
- use_ssl: uri.scheme == 'https',
42
- verify_mode: OpenSSL::SSL::VERIFY_NONE) do |http|
43
- request = Net::HTTP::Get.new uri
37
+ Timeout.timeout(60) do
38
+ Net::HTTP.start(uri.host,
39
+ uri.port,
40
+ use_ssl: uri.scheme == 'https') do |http|
41
+ request = Net::HTTP::Get.new uri
44
42
 
45
- response = http.request request
46
- puts response.code
47
- end
48
- puts 'ecityruf -- sent alert ' + event_name + ' to number ' + params['number'] + '.'
43
+ response = http.request request
44
+ puts response.code
49
45
  end
50
- rescue Timeout::Error
51
- puts 'ecityruf -- time out while attempting to alert about ' + event_name + '.'
46
+ puts 'ecityruf -- sent alert ' + event_name + ' to number ' + params['number'] + '.'
52
47
  end
53
48
  end
54
49
  end
@@ -1,7 +1,7 @@
1
1
  module Sensu
2
2
  module Plugins
3
3
  module Ecityruf
4
- VERSION = '0.2.3'
4
+ VERSION = '0.3.0'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-ecityruf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hauke Altmann
@@ -90,9 +90,7 @@ extra_rdoc_files: []
90
90
  files:
91
91
  - LICENSE.txt
92
92
  - README.md
93
- - bin/console
94
93
  - bin/handler-ecityruf.rb
95
- - bin/setup
96
94
  - lib/sensu/plugins/ecityruf.rb
97
95
  - lib/sensu/plugins/ecityruf/version.rb
98
96
  homepage: https://www.aboutsource.net
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'sensu/plugins/ecityruf'
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require 'irb'
14
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here