pigeon 0.4.9 → 0.4.10

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.9
1
+ 0.4.10
data/lib/pigeon/engine.rb CHANGED
@@ -419,7 +419,6 @@ protected
419
419
  end
420
420
 
421
421
  def assign_process_name!
422
- puts self.class.process_name.inspect
423
422
  if (self.class.process_name)
424
423
  $0 = self.class.process_name
425
424
  end
@@ -1,3 +1,5 @@
1
+ require 'optparse'
2
+
1
3
  class Pigeon::Launcher
2
4
  # == Class Methods ========================================================
3
5
 
@@ -8,10 +10,17 @@ class Pigeon::Launcher
8
10
 
9
11
  def initialize(with_engine = Pigeon::Engine)
10
12
  @engine = with_engine
13
+ @options = { }
11
14
  end
12
15
 
13
16
  def handle_args(*args)
14
- command = args.flatten.first
17
+ op = OptionParser.new
18
+
19
+ op.on("-s", "--supervise") do
20
+ @options[:supervise] = true
21
+ end
22
+
23
+ command = op.parse(*args.flatten).first
15
24
 
16
25
  begin
17
26
  case (command)
@@ -35,13 +35,15 @@ module Pigeon::Support
35
35
  # Returns a unique 160-bit identifier for this engine expressed as a 40
36
36
  # character hexadecimal string. The first 32-bit sequence is a timestamp
37
37
  # so these numbers increase over time and can be used to identify when
38
- # a particular instance was launched.
38
+ # a particular instance was launched. For informational purposes, the name
39
+ # of the host is appended to help identify the origin of the ident.
39
40
  def unique_id
40
- '%8x%s' % [
41
+ '%8x%s@%s' % [
41
42
  Time.now.to_i,
42
43
  Digest::SHA1.hexdigest(
43
44
  '%.8f%8x' % [ Time.now.to_f, rand(1 << 32) ]
44
- )[0, 32]
45
+ )[0, 32],
46
+ Socket.gethostname
45
47
  ]
46
48
  end
47
49
 
data/pigeon.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pigeon}
8
- s.version = "0.4.9"
8
+ s.version = "0.4.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["tadman"]
12
- s.date = %q{2011-01-18}
12
+ s.date = %q{2011-03-01}
13
13
  s.default_executable = %q{launcher.example}
14
14
  s.description = %q{Pigeon is a simple way to get started building an EventMachine engine that's intended to run as a background job.}
15
15
  s.email = %q{github@tadman.ca}
@@ -54,7 +54,7 @@ Gem::Specification.new do |s|
54
54
  ]
55
55
  s.homepage = %q{http://github.com/twg/pigeon}
56
56
  s.require_paths = ["lib"]
57
- s.rubygems_version = %q{1.3.7}
57
+ s.rubygems_version = %q{1.5.2}
58
58
  s.summary = %q{Simple daemonized EventMachine engine framework with plug-in support}
59
59
  s.test_files = [
60
60
  "test/helper.rb",
@@ -72,7 +72,6 @@ Gem::Specification.new do |s|
72
72
  ]
73
73
 
74
74
  if s.respond_to? :specification_version then
75
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
76
75
  s.specification_version = 3
77
76
 
78
77
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pigeon
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 4
8
- - 9
9
- version: 0.4.9
4
+ prerelease:
5
+ version: 0.4.10
10
6
  platform: ruby
11
7
  authors:
12
8
  - tadman
@@ -14,7 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-01-18 00:00:00 -05:00
13
+ date: 2011-03-01 00:00:00 -05:00
18
14
  default_executable: launcher.example
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
@@ -25,8 +21,6 @@ dependencies:
25
21
  requirements:
26
22
  - - ">="
27
23
  - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
24
  version: "0"
31
25
  type: :development
32
26
  version_requirements: *id001
@@ -86,21 +80,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
80
  requirements:
87
81
  - - ">="
88
82
  - !ruby/object:Gem::Version
89
- segments:
90
- - 0
91
83
  version: "0"
92
84
  required_rubygems_version: !ruby/object:Gem::Requirement
93
85
  none: false
94
86
  requirements:
95
87
  - - ">="
96
88
  - !ruby/object:Gem::Version
97
- segments:
98
- - 0
99
89
  version: "0"
100
90
  requirements: []
101
91
 
102
92
  rubyforge_project:
103
- rubygems_version: 1.3.7
93
+ rubygems_version: 1.5.2
104
94
  signing_key:
105
95
  specification_version: 3
106
96
  summary: Simple daemonized EventMachine engine framework with plug-in support