Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pione-config' into webclient-spe…
Browse files Browse the repository at this point in the history
…cial
  • Loading branch information
keita committed Dec 2, 2013
2 parents bef0156 + d7048be commit 2885f17
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions lib/pione/command/option.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ module CommonOption
}
end

define(:my_ip_address) do |item|
item.long = "--my-ip-address=ADDRESS"
item.desc = "set my IP address"
item.action = proc {|_, _, address| Global.my_ip_address = address}
define(:communication_address) do |item|
item.long = "--communication-address=ADDRESS"
item.desc = "set IP address for interprocess communication"
item.action = proc {|_, _, address| Global.communication_address = address}
end

define(:parent_front) do |item|
Expand Down
2 changes: 1 addition & 1 deletion lib/pione/command/pione-broker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PioneBroker < BasicCommand
use_option :daemon
use_option :debug
use_option :features
use_option :my_ip_address
use_option :communication_address
use_option :task_worker

validate_option do |option|
Expand Down
2 changes: 1 addition & 1 deletion lib/pione/command/pione-client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PioneClient < BasicCommand

use_option :debug
use_option :color
use_option :my_ip_address
use_option :communication_address
use_option :presence_notification_address
use_option :task_worker
use_option :features
Expand Down
2 changes: 1 addition & 1 deletion lib/pione/command/pione-relay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PioneRelay < BasicCommand

use_option :color
use_option :debug
use_option :my_ip_address
use_option :communication_address

define_option(:realm) do |item|
item.long = "--realm name"
Expand Down
2 changes: 1 addition & 1 deletion lib/pione/command/pione-task-worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PioneTaskWorker < BasicCommand

use_option :color
use_option :debug
use_option :my_ip_address
use_option :communication_address
use_option :parent_front
use_option :features

Expand Down
4 changes: 2 additions & 2 deletions lib/pione/command/pione-tuple-space-provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PioneTupleSpaceProvider < BasicCommand

use_option :color
use_option :debug
use_option :my_ip_address
use_option :communication_address
use_option :parent_front
use_option :presence_notification_address

Expand All @@ -47,7 +47,7 @@ def self.spawn

# requisite options
spawner.option("--parent-front", Global.front.uri)
spawner.option("--my-ip-address", Global.my_ip_address)
spawner.option("--communication-address", Global.communication_address)
Global.presence_notification_addresses.each do |address|
spawner.option("--presence-notification-address", address.to_s)
end
Expand Down
4 changes: 2 additions & 2 deletions lib/pione/command/pione-tuple-space-receiver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PioneTupleSpaceReceiver < BasicCommand

use_option :color
use_option :debug
use_option :my_ip_address
use_option :communication_address
use_option :parent_front

define_option(:presence_port) do |item|
Expand Down Expand Up @@ -53,7 +53,7 @@ def self.spawn

# requisite options
spawner.option("--parent-front", Global.front.uri)
spawner.option("--my-ip-address", Global.my_ip_address)
spawner.option("--communication-address", Global.communication_address)
spawner.option("--presence-port", Global.presence_port.to_s)

# optionals
Expand Down
4 changes: 2 additions & 2 deletions lib/pione/front/basic-front.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ def start_service(port, config)
end

# Build front server URI. Note that the address is configured by
# `Global.my_ip_address`.
# `Global.communication_address`.
def build_uri(port)
"druby://%s:%s" % [Global.my_ip_address, port]
"druby://%s:%s" % [Global.communication_address, port]
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/pione/global/network-variable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module Pione
module Global
# This is IP address of this system. Note that you should select one IP
# address if system has multiple addresses.
define_external_item(:my_ip_address) do |item|
item.desc = "IP address of this system"
define_external_item(:communication_address) do |item|
item.desc = "IP address for interprocess communication"
item.init = Util::IPAddress.myself
end
end
Expand Down

0 comments on commit 2885f17

Please sign in to comment.