specjour 0.1.14 → 0.1.15
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.
- data/VERSION +1 -1
- data/lib/specjour/dispatcher.rb +1 -5
- data/lib/specjour/manager.rb +7 -2
- data/lib/specjour.rb +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.15
|
data/lib/specjour/dispatcher.rb
CHANGED
@@ -77,10 +77,6 @@ module Specjour
|
|
77
77
|
@hostname ||= Socket.gethostname
|
78
78
|
end
|
79
79
|
|
80
|
-
def host_ip
|
81
|
-
@host_ip ||= Specjour.ip_from_hostname hostname
|
82
|
-
end
|
83
|
-
|
84
80
|
def printer
|
85
81
|
@printer ||= begin
|
86
82
|
p = Printer.new
|
@@ -112,7 +108,7 @@ module Specjour
|
|
112
108
|
|
113
109
|
def set_up_manager(manager, uri)
|
114
110
|
manager.project_name = project_name
|
115
|
-
manager.dispatcher_uri = URI::Generic.build :scheme => "specjour", :host =>
|
111
|
+
manager.dispatcher_uri = URI::Generic.build :scheme => "specjour", :host => hostname, :port => printer.port
|
116
112
|
at_exit { manager.kill_worker_processes }
|
117
113
|
end
|
118
114
|
|
data/lib/specjour/manager.rb
CHANGED
@@ -3,8 +3,8 @@ module Specjour
|
|
3
3
|
require 'dnssd'
|
4
4
|
include DRbUndumped
|
5
5
|
|
6
|
-
attr_accessor :project_name, :specs_to_run
|
7
|
-
attr_reader :worker_size, :batch_size, :registered_projects, :bonjour_service, :worker_pids
|
6
|
+
attr_accessor :project_name, :specs_to_run
|
7
|
+
attr_reader :worker_size, :batch_size, :dispatcher_uri, :registered_projects, :bonjour_service, :worker_pids
|
8
8
|
|
9
9
|
def initialize(options = {})
|
10
10
|
@worker_size = options[:worker_size]
|
@@ -25,6 +25,11 @@ module Specjour
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
+
def dispatcher_uri=(uri)
|
29
|
+
uri.host = Specjour.ip_from_hostname(uri.host)
|
30
|
+
@dispatcher_uri = uri
|
31
|
+
end
|
32
|
+
|
28
33
|
def kill_worker_processes
|
29
34
|
Process.kill('TERM', *worker_pids) rescue nil
|
30
35
|
end
|
data/lib/specjour.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 15
|
9
|
+
version: 0.1.15
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Sandro Turriate
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-15 00:00:00 -04:00
|
18
18
|
default_executable: specjour
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|