specjour 0.1.14 → 0.1.15

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.14
1
+ 0.1.15
@@ -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 => host_ip, :port => printer.port
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
 
@@ -3,8 +3,8 @@ module Specjour
3
3
  require 'dnssd'
4
4
  include DRbUndumped
5
5
 
6
- attr_accessor :project_name, :specs_to_run, :dispatcher_uri
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
@@ -23,7 +23,7 @@ module Specjour
23
23
  autoload :RsyncDaemon, 'specjour/rsync_daemon'
24
24
  autoload :Worker, 'specjour/worker'
25
25
 
26
- VERSION = "0.1.14".freeze
26
+ VERSION = "0.1.15".freeze
27
27
 
28
28
  class Error < StandardError; end
29
29
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 14
9
- version: 0.1.14
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-14 00:00:00 -04:00
17
+ date: 2010-04-15 00:00:00 -04:00
18
18
  default_executable: specjour
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency