adeona 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. data/lib/adeona.rb +6 -3
  2. metadata +3 -5
@@ -1,3 +1,5 @@
1
+ require 'logger'
2
+
1
3
  module Adeona
2
4
  def Adeona::spawn_child(options = {}, &block)
3
5
  # handle default options
@@ -43,10 +45,11 @@ module Adeona
43
45
  # this exception handler will handle exceptions thrown by the user specified code in the block, as well as
44
46
  # exceptions thrown by the lifeline_thread that cause the child process to exit when the parent process is
45
47
  # no longer active.
46
- rescue Exception => e
48
+ rescue => ex
47
49
  if(options[:verbose])
48
- puts "Exception caught: #{e.message}"
49
- puts e.backtrace
50
+ logger = Logger.new($stdout)
51
+ logger.warn(self.name.to_s) { "Exception caught: #{ex.message}" }
52
+ logger.warn(self.name.to_s) { ex.backtrace }
50
53
  end
51
54
  end
52
55
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adeona
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-15 00:00:00.000000000 +01:00
13
- default_executable:
12
+ date: 2012-05-01 00:00:00.000000000Z
14
13
  dependencies: []
15
14
  description: A module that makes it easy to create child processes that die when their
16
15
  parent process is killed. It works even if the parent is disabled with SIGKILL.
@@ -21,7 +20,6 @@ extensions: []
21
20
  extra_rdoc_files: []
22
21
  files:
23
22
  - lib/adeona.rb
24
- has_rdoc: true
25
23
  homepage: https://github.com/vaneyckt/Adeona
26
24
  licenses: []
27
25
  post_install_message:
@@ -42,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
40
  version: '0'
43
41
  requirements: []
44
42
  rubyforge_project:
45
- rubygems_version: 1.6.2
43
+ rubygems_version: 1.8.17
46
44
  signing_key:
47
45
  specification_version: 3
48
46
  summary: A module that makes it easy to create child processes that die when their