Skip to content

Commit

Permalink
Use ruby 1.9 hash syntax
Browse files Browse the repository at this point in the history
    * lib/corba/cbase/Request.rb:
    * lib/corba/cmds/base.rb:
    * lib/corba/common/Values.rb:
    * lib/corba/jbase/Servant.rb:
    * lib/corba/svcs/ins/cos_naming.rb:
    * lib/corba/svcs/ins/ins.rb:
    * lib/corba/svcs/ins/naming_service.rb:
    * test/BiDirectional/client.rb:
    * test/BiDirectional/run_test.rb:
    * test/BiDirectional/server.rb:
    * test/CORBA_Services/Naming/BindingIterator/client.rb:
    * test/CORBA_Services/Naming/BindingIterator/run_test.rb:
    * test/CORBA_Services/Naming/BindingIterator/server.rb:
    * test/CORBA_Services/Naming/Corbaname/client.rb:
    * test/CORBA_Services/Naming/Corbaname/run_test.rb:
    * test/CORBA_Services/Naming/Corbaname/server.rb:
    * test/CORBA_Services/Naming/Simple/client.rb:
    * test/CORBA_Services/Naming/Simple/run_test.rb:
    * test/CORBA_Services/Naming/Simple/server.rb:
    * test/Collocation/run_test.rb:
    * test/Collocation/test.rb:
    * test/Connect_Timeout/client.rb:
    * test/Connect_Timeout/run_test.rb:
    * test/DII/client.rb:
    * test/DII/run_test.rb:
    * test/DII/server.rb:
    * test/DSI/client.rb:
    * test/DSI/run_test.rb:
    * test/DSI/server.rb:
    * test/Exceptions/client.rb:
    * test/Exceptions/run_test.rb:
    * test/Exceptions/server.rb:
    * test/Hello/client.rb:
    * test/Hello/run_test.rb:
    * test/Hello/server.rb:
    * test/IDL_Test/client.rb:
    * test/IDL_Test/run_test.rb:
    * test/IDL_Test/server.rb:
    * test/IORMap/client.rb:
    * test/IORMap/run_test.rb:
    * test/IORMap/server.rb:
    * test/IORTable/client.rb:
    * test/IORTable/run_test.rb:
    * test/IORTable/server.rb:
    * test/Implicit_Conversion/client.rb:
    * test/Implicit_Conversion/run_test.rb:
    * test/Implicit_Conversion/server.rb:
    * test/Multi_Threading/Multiple_ORB/client.rb:
    * test/Multi_Threading/Multiple_ORB/run_test.rb:
    * test/Multi_Threading/Multiple_ORB/server.rb:
    * test/Multi_Threading/Simple/client.rb:
    * test/Multi_Threading/Simple/run_test.rb:
    * test/Multi_Threading/Simple/server.rb:
    * test/Multi_Threading/Threads/client.rb:
    * test/Multi_Threading/Threads/run_test.rb:
    * test/Multi_Threading/Threads/server.rb:
    * test/Multi_Threading/Threads/watchdog.rb:
    * test/Multiple_Servant_Interfaces/client.rb:
    * test/Multiple_Servant_Interfaces/run_test.rb:
    * test/Multiple_Servant_Interfaces/server.rb:
    * test/Nil/run_test.rb:
    * test/Nil/test.rb:
    * test/OBV/AbstractInterface/client.rb:
    * test/OBV/AbstractInterface/run_test.rb:
    * test/OBV/AbstractInterface/server.rb:
    * test/OBV/Custom/client.rb:
    * test/OBV/Custom/run_test.rb:
    * test/OBV/Custom/server.rb:
    * test/OBV/Simple/client.rb:
    * test/OBV/Simple/run_test.rb:
    * test/OBV/Simple/server.rb:
    * test/OBV/Simple_Event/client.rb:
    * test/OBV/Simple_Event/run_test.rb:
    * test/OBV/Simple_Event/server.rb:
    * test/OBV/Supports/client.rb:
    * test/OBV/Supports/run_test.rb:
    * test/OBV/Supports/server.rb:
    * test/OBV/Tree/client.rb:
    * test/OBV/Tree/run_test.rb:
    * test/OBV/Tree/server.rb:
    * test/OBV/Truncatable/client.rb:
    * test/OBV/Truncatable/run_test.rb:
    * test/OBV/Truncatable/server.rb:
    * test/OBV/ValueBox/client.rb:
    * test/OBV/ValueBox/run_test.rb:
    * test/OBV/ValueBox/server.rb:
    * test/Object/client.rb:
    * test/Object/run_test.rb:
    * test/Object/server.rb:
    * test/POA/run_test.rb:
    * test/POA/test.rb:
    * test/Param_Test/client.rb:
    * test/Param_Test/run_test.rb:
    * test/Param_Test/server.rb:
    * test/Performance/Simple/client.rb:
    * test/Performance/Simple/run_test.rb:
    * test/Performance/Simple/server.rb:
    * test/Policies/run_test.rb:
    * test/Policies/test.rb:
    * test/Timeout/client.rb:
    * test/Timeout/run_test.rb:
    * test/Timeout/server.rb:
    * test/test_runner.rb:
  • Loading branch information
jwillemsen committed Feb 28, 2023
1 parent 6d67edb commit 444ff2c
Show file tree
Hide file tree
Showing 103 changed files with 321 additions and 321 deletions.
12 changes: 6 additions & 6 deletions lib/corba/cbase/Request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ def return_value

def invoke
self._invoke({
:arg_list => self._arguments,
:result_type => @_rettc,
:exc_list => self._exceptions
arg_list: self._arguments,
result_type: @_rettc,
exc_list: self._exceptions
})
end

Expand All @@ -91,9 +91,9 @@ def send_oneway

def send_deferred
self._send_deferred({
:arg_list => self._arguments,
:result_type => @_rettc,
:exc_list => self._exceptions
arg_list: self._arguments,
result_type: @_rettc,
exc_list: self._exceptions
})
end

Expand Down
2 changes: 1 addition & 1 deletion lib/corba/cmds/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module Commands
end

@@options = {
:verbose => false
verbose: false
}

def self.register(cmdid, cmdhandler)
Expand Down
8 changes: 4 additions & 4 deletions lib/corba/common/Values.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ def self.unregister_factory(orb)
VM_TRUNCATABLE = 3

VT_MODIFIERS = {
:none => VM_NONE,
:abstract => VM_ABSTRACT,
:truncatable => VM_TRUNCATABLE,
:custom => VM_CUSTOM
none: VM_NONE,
abstract: VM_ABSTRACT,
truncatable: VM_TRUNCATABLE,
custom: VM_CUSTOM
}.freeze

PRIVATE_MEMBER = 0
Expand Down
8 changes: 4 additions & 4 deletions lib/corba/jbase/Servant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,25 @@ def invoke(jsrvreq)
begin
case rsrvreq.srvreq_.operation()
when '_is_a'
rsrvreq.describe({:arg_list => [['', CORBA::ARG_IN, CORBA._tc_string]], :result_type => CORBA._tc_boolean})
rsrvreq.describe({arg_list: [['', CORBA::ARG_IN, CORBA._tc_string]], result_type: CORBA._tc_boolean})
rc = self._is_a(*rsrvreq.arguments)
jany = rsrvreq.orb_.create_any()
jany.insert_boolean(rc == true)
jsrvreq.set_result(jany)
when '_non_existent'
rsrvreq.describe({:arg_list => [], :result_type => CORBA._tc_boolean})
rsrvreq.describe({arg_list: [], result_type: CORBA._tc_boolean})
rc = self._non_existent(*rsrvreq.arguments)
jany = rsrvreq.orb_.create_any()
jany.insert_boolean(rc == true)
jsrvreq.set_result(jany)
when '_repository_id'
rsrvreq.describe({:arg_list => [], :result_type => CORBA._tc_string})
rsrvreq.describe({arg_list: [], result_type: CORBA._tc_string})
rc = self._repository_id(*rsrvreq.arguments)
jany = rsrvreq.orb_.create_any()
jany.insert_string(rc)
jsrvreq.set_result(jany)
when '_component'
rsrvreq.describe({:arg_list => [], :result_type => CORBA._tc_Object})
rsrvreq.describe({arg_list: [], result_type: CORBA._tc_Object})
rc = self._get_component(*rsrvreq.arguments)
jany = rsrvreq.orb_.create_any()
jany.insert_Object(rc)
Expand Down
12 changes: 6 additions & 6 deletions lib/corba/svcs/ins/cos_naming.rb
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,9 @@ def register_object(name, full_name, type, obj)
@map.synchronize do
raise CosNaming::NamingContext::AlreadyBound.new if @map.has_key?(key_)
@map[key_] = {
:name => full_name,
:type => type,
:object => obj
name: full_name,
type: type,
object: obj
}
end
end
Expand All @@ -380,9 +380,9 @@ def reregister_object(name, full_name, type, obj)
raise CosNaming::NamingContext::NotFound.new(why, [])
end
@map[key_] = {
:name => full_name,
:type => type,
:object => obj
name: full_name,
type: type,
object: obj
}
end
end
Expand Down
66 changes: 33 additions & 33 deletions lib/corba/svcs/ins/ins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ def start
report 'INS - starting daemon mode'

daemon_opt = {
:app_name => 'rins',
:ARGV => ['start'],
:dir_mode => :normal,
:dir => @options[:piddir],
:multiple => true,
:log_dir => @options[:logdir] || @options[:piddir],
:log_output => true,
:stop_proc => Proc.new do
app_name: 'rins',
ARGV: ['start'],
dir_mode: :normal,
dir: @options[:piddir],
multiple: true,
log_dir: @options[:logdir] || @options[:piddir],
log_output: true,
stop_proc: Proc.new do
report 'INS - shutting down'
ins_svc.shutdown
end
Expand Down Expand Up @@ -252,11 +252,11 @@ def stop
report 'INS - stopping service'
if @options[:daemon]
daemon_opt = {
:app_name => 'rins',
:ARGV => ['stop'],
:dir_mode => :normal,
:dir => @options[:piddir],
:multiple => true,
app_name: 'rins',
ARGV: ['stop'],
dir_mode: :normal,
dir: @options[:piddir],
multiple: true,
}

Daemons.run_proc('ins.rb', daemon_opt) {}
Expand All @@ -279,14 +279,14 @@ def restart
report 'INS - restarting daemon mode'

daemon_opt = {
:app_name => 'rins',
:ARGV => ['restart'],
:dir_mode => :normal,
:dir => @options[:piddir],
:multiple => true,
:log_dir => @options[:logdir] || @options[:piddir],
:log_output => true,
:stop_proc => Proc.new do
app_name: 'rins',
ARGV: ['restart'],
dir_mode: :normal,
dir: @options[:piddir],
multiple: true,
log_dir: @options[:logdir] || @options[:piddir],
log_output: true,
stop_proc: Proc.new do
report 'INS - shutting down'
ins_svc.shutdown
end
Expand All @@ -310,11 +310,11 @@ def restart
def status
report 'INS - retrieving service status'
daemon_opt = {
:app_name => 'rins',
:ARGV => ['status'],
:dir_mode => :normal,
:dir => @options[:piddir],
:multiple => true,
app_name: 'rins',
ARGV: ['status'],
dir_mode: :normal,
dir: @options[:piddir],
multiple: true,
}

Daemons.run_proc('ins.rb', daemon_opt) {}
Expand Down Expand Up @@ -351,13 +351,13 @@ def check_pidfile
end

OPTIONS = {
:piddir => Dir.getwd,
:iorfile => 'ins.ior',
:debug => 0,
:logdir => nil,
:threads => 5,
:orbprop => {},
:port => 0,
piddir: Dir.getwd,
iorfile: 'ins.ior',
debug: 0,
logdir: nil,
threads: 5,
orbprop: {},
port: 0,
}

COMMANDS = [
Expand Down
10 changes: 5 additions & 5 deletions lib/corba/svcs/ins/naming_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ module INS
class Service
# default options
OPTIONS = {
:iorfile => 'ins.ior',
:debug => 0,
:threads => 5,
:orbprop => {},
:port => 0
iorfile: 'ins.ior',
debug: 0,
threads: 5,
orbprop: {},
port: 0
}

def initialize(options = {})
Expand Down
6 changes: 3 additions & 3 deletions test/BiDirectional/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
include TestUtil::Assertions

OPTIONS = {
:use_implement => false,
:orb_debuglevel => 0,
:iorfile => 'file://server.ior'
use_implement: false,
orb_debuglevel: 0,
iorfile: 'file://server.ior'
}

ARGV.options do |opts|
Expand Down
4 changes: 2 additions & 2 deletions test/BiDirectional/run_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#--------------------------------------------------------------------

OPTIONS = {
:debug_opt => '',
:use_implement => '--use-implement'
debug_opt: '',
use_implement: '--use-implement'
}

require 'optparse'
Expand Down
8 changes: 4 additions & 4 deletions test/BiDirectional/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
require 'optparse'

OPTIONS = {
:use_implement => false,
:orb_debuglevel => 0,
:iorfile => 'server.ior',
:iter_num => 10
use_implement: false,
orb_debuglevel: 0,
iorfile: 'server.ior',
iter_num: 10
}

ARGV.options do |opts|
Expand Down
6 changes: 3 additions & 3 deletions test/CORBA_Services/Naming/BindingIterator/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
include TestUtil::Assertions

OPTIONS = {
:use_implement => false,
:orb_debuglevel => 0,
:iorfile => 'file://ins.ior'
use_implement: false,
orb_debuglevel: 0,
iorfile: 'file://ins.ior'
}

ARGV.options do |opts|
Expand Down
4 changes: 2 additions & 2 deletions test/CORBA_Services/Naming/BindingIterator/run_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#--------------------------------------------------------------------

OPTIONS = {
:debug_opt => '',
:use_implement => '--use-implement'
debug_opt: '',
use_implement: '--use-implement'
}

require 'optparse'
Expand Down
6 changes: 3 additions & 3 deletions test/CORBA_Services/Naming/BindingIterator/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
include TestUtil::Assertions

OPTIONS = {
:use_implement => false,
:orb_debuglevel => 0,
:iorfile => 'file://ins.ior'
use_implement: false,
orb_debuglevel: 0,
iorfile: 'file://ins.ior'
}

ARGV.options do |opts|
Expand Down
6 changes: 3 additions & 3 deletions test/CORBA_Services/Naming/Corbaname/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
include TestUtil::Assertions

OPTIONS = {
:use_implement => false,
:orb_debuglevel => 0,
:iorfile => 'corbaname.ior'
use_implement: false,
orb_debuglevel: 0,
iorfile: 'corbaname.ior'
}

ARGV.options do |opts|
Expand Down
4 changes: 2 additions & 2 deletions test/CORBA_Services/Naming/Corbaname/run_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#--------------------------------------------------------------------

OPTIONS = {
:debug_opt => '',
:use_implement => '--use-implement'
debug_opt: '',
use_implement: '--use-implement'
}

require 'optparse'
Expand Down
8 changes: 4 additions & 4 deletions test/CORBA_Services/Naming/Corbaname/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
include TestUtil::Assertions

OPTIONS = {
:iorfile => 'corbaname.ior',
:use_implement => false,
:orb_debuglevel => 0,
:ins_port => 2345
iorfile: 'corbaname.ior',
use_implement: false,
orb_debuglevel: 0,
ins_port: 2345
}

ARGV.options do |opts|
Expand Down
6 changes: 3 additions & 3 deletions test/CORBA_Services/Naming/Simple/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
include TestUtil::Assertions

OPTIONS = {
:use_implement => false,
:orb_debuglevel => 0,
:iorfile => 'file://ins.ior'
use_implement: false,
orb_debuglevel: 0,
iorfile: 'file://ins.ior'
}

ARGV.options do |opts|
Expand Down
4 changes: 2 additions & 2 deletions test/CORBA_Services/Naming/Simple/run_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#--------------------------------------------------------------------

OPTIONS = {
:debug_opt => '',
:use_implement => '--use-implement'
debug_opt: '',
use_implement: '--use-implement'
}

require 'optparse'
Expand Down
6 changes: 3 additions & 3 deletions test/CORBA_Services/Naming/Simple/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
include TestUtil::Assertions

OPTIONS = {
:use_implement => false,
:orb_debuglevel => 0,
:iorfile => 'file://ins.ior'
use_implement: false,
orb_debuglevel: 0,
iorfile: 'file://ins.ior'
}

ARGV.options do |opts|
Expand Down
4 changes: 2 additions & 2 deletions test/Collocation/run_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
#--------------------------------------------------------------------

OPTIONS = {
:debug_opt => '',
:use_implement => '--use-implement'
debug_opt: '',
use_implement: '--use-implement'
}

require 'optparse'
Expand Down
2 changes: 1 addition & 1 deletion test/Collocation/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
require 'optparse'

OPTIONS = {
:use_implement => false
use_implement: false
}

ORB_ARG = []
Expand Down
Loading

0 comments on commit 444ff2c

Please sign in to comment.