chef-handler-spinup-complete 0.1.0 → 0.2.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.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'chef-handler-spinup-complete'
3
- s.version = '0.1.0'
3
+ s.version = '0.2.0'
4
4
  s.author = 'Simple Finance'
5
5
  s.email = 'ops@simple.com'
6
6
  s.homepage = 'http://github.com/SimpleFinance/chef-handler-sensu-event'
@@ -34,10 +34,14 @@ class Chef
34
34
  end
35
35
 
36
36
  def report
37
- sock = TCPSocket.new('127.0.0.1', 3030)
38
- sock.write(warn_first)
39
- sock.write(ok_second)
40
- sock.close
37
+ begin
38
+ sock = TCPSocket.new('127.0.0.1', 3030)
39
+ sock.write(warn_first)
40
+ sock.write(ok_second)
41
+ sock.close
42
+ rescue Errno::ECONNREFUSED
43
+ Chef::Log.error("Couldn't write to the Sensu client socket")
44
+ end
41
45
  end
42
46
 
43
47
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-handler-spinup-complete
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -17,6 +17,7 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - chef-handler-spinup-complete-0.1.0.gem
20
21
  - chef-handler-spinup-complete.gemspec
21
22
  - lib/chef-handler-spinup-complete.rb
22
23
  - LICENSE