r2corba 1.5.2 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +8 -5
  3. data/ext/libr2tao/any.cpp +12 -11
  4. data/ext/libr2tao/exception.cpp +6 -8
  5. data/ext/libr2tao/exception.h +1 -2
  6. data/ext/libr2tao/longdouble.cpp +5 -9
  7. data/ext/libr2tao/object.cpp +37 -53
  8. data/ext/libr2tao/orb.cpp +46 -73
  9. data/ext/libr2tao/r2tao_export.h +1 -1
  10. data/ext/libr2tao/r2tao_ext.h +8 -19
  11. data/ext/libr2tao/required.cpp +4 -28
  12. data/ext/libr2tao/required.h +23 -80
  13. data/ext/libr2tao/values.cpp +97 -98
  14. data/ext/libr2tao/values.h +36 -40
  15. data/ext/librpoa/iortable.cpp +6 -7
  16. data/ext/librpoa/poa.cpp +29 -32
  17. data/ext/librpoa/servant.cpp +39 -113
  18. data/ext/librpoa/servant.h +18 -40
  19. data/lib/corba.rb +1 -1
  20. data/lib/corba/cbase/ORB.rb +26 -23
  21. data/lib/corba/cbase/Request.rb +3 -3
  22. data/lib/corba/cbase/Streams.rb +2 -2
  23. data/lib/corba/cbase/Typecode.rb +6 -6
  24. data/lib/corba/cbase/Values.rb +4 -2
  25. data/lib/corba/cbase/exception.rb +6 -4
  26. data/lib/corba/cbase/poa.rb +1 -1
  27. data/lib/corba/cbase/policies.rb +2 -2
  28. data/lib/corba/cbase/require.rb +8 -1
  29. data/lib/corba/cmds/base.rb +1 -1
  30. data/lib/corba/common/Any.rb +3 -2
  31. data/lib/corba/common/IDL.rb +4 -7
  32. data/lib/corba/common/ORB.rb +22 -22
  33. data/lib/corba/common/Object.rb +14 -14
  34. data/lib/corba/common/Servant.rb +4 -4
  35. data/lib/corba/common/Stub.rb +6 -6
  36. data/lib/corba/common/Typecode.rb +72 -45
  37. data/lib/corba/common/Union.rb +5 -0
  38. data/lib/corba/common/Values.rb +1 -0
  39. data/lib/corba/common/const.rb +2 -2
  40. data/lib/corba/common/exception.rb +2 -1
  41. data/lib/corba/common/require.rb +8 -0
  42. data/lib/corba/common/version.rb +2 -2
  43. data/lib/corba/idl/IDL.rb +1 -1
  44. data/lib/corba/jbase/Any.rb +28 -26
  45. data/lib/corba/jbase/ORB.rb +5 -5
  46. data/lib/corba/jbase/Object.rb +13 -13
  47. data/lib/corba/jbase/Request.rb +8 -8
  48. data/lib/corba/jbase/Servant.rb +10 -10
  49. data/lib/corba/jbase/ServerRequest.rb +7 -7
  50. data/lib/corba/jbase/Streams.rb +67 -3
  51. data/lib/corba/jbase/Typecode.rb +17 -16
  52. data/lib/corba/jbase/Values.rb +2 -0
  53. data/lib/corba/jbase/exception.rb +2 -1
  54. data/lib/corba/jbase/poa.rb +20 -20
  55. data/lib/corba/jbase/policies.rb +32 -32
  56. data/lib/corba/jbase/require.rb +4 -0
  57. data/lib/corba/poa.rb +1 -1
  58. data/lib/corba/policies.rb +1 -1
  59. data/lib/corba/require.rb +2 -2
  60. data/lib/corba/svcs/ins/cos_naming.rb +37 -28
  61. data/lib/corba/svcs/ins/ins.rb +51 -51
  62. data/lib/corba/svcs/ins/naming_service.rb +8 -8
  63. data/lib/ridlbe/ruby/config.rb +78 -72
  64. data/lib/ridlbe/ruby/walker.rb +295 -272
  65. data/mkrf_conf_srcgem.rb +6 -6
  66. data/rakelib/bin.rake +1 -1
  67. data/rakelib/bin.rb +3 -3
  68. data/rakelib/build.rake +16 -16
  69. data/rakelib/config.rake +1 -1
  70. data/rakelib/config.rb +24 -25
  71. data/rakelib/ext.rake +7 -68
  72. data/rakelib/ext.rb +13 -13
  73. data/rakelib/ext_r2tao.rb +11 -54
  74. data/rakelib/gem.rake +40 -24
  75. data/rakelib/gem.rb +6 -6
  76. data/rakelib/package.rake +1 -1
  77. data/test/BiDirectional/client.rb +17 -17
  78. data/test/BiDirectional/run_test.rb +11 -11
  79. data/test/BiDirectional/server.rb +24 -25
  80. data/test/CORBA_Services/Naming/BindingIterator/client.rb +17 -17
  81. data/test/CORBA_Services/Naming/BindingIterator/run_test.rb +13 -13
  82. data/test/CORBA_Services/Naming/BindingIterator/server.rb +19 -19
  83. data/test/CORBA_Services/Naming/Corbaname/client.rb +15 -15
  84. data/test/CORBA_Services/Naming/Corbaname/run_test.rb +13 -13
  85. data/test/CORBA_Services/Naming/Corbaname/server.rb +30 -30
  86. data/test/CORBA_Services/Naming/Simple/client.rb +16 -16
  87. data/test/CORBA_Services/Naming/Simple/run_test.rb +13 -13
  88. data/test/CORBA_Services/Naming/Simple/server.rb +19 -19
  89. data/test/Collocation/run_test.rb +10 -10
  90. data/test/Collocation/test.rb +27 -20
  91. data/test/Connect_Timeout/client.rb +16 -17
  92. data/test/Connect_Timeout/run_test.rb +10 -10
  93. data/test/DII/client.rb +30 -30
  94. data/test/DII/run_test.rb +11 -11
  95. data/test/DII/server.rb +16 -16
  96. data/test/DSI/client.rb +16 -16
  97. data/test/DSI/run_test.rb +11 -11
  98. data/test/DSI/server.rb +17 -17
  99. data/test/Exceptions/client.rb +21 -21
  100. data/test/Exceptions/run_test.rb +11 -11
  101. data/test/Exceptions/server.rb +16 -16
  102. data/test/Hello/client.rb +16 -16
  103. data/test/Hello/run_test.rb +11 -11
  104. data/test/Hello/server.rb +17 -17
  105. data/test/IDL_Test/client.rb +21 -21
  106. data/test/IDL_Test/run_test.rb +11 -11
  107. data/test/IDL_Test/server.rb +19 -19
  108. data/test/IORMap/client.rb +14 -14
  109. data/test/IORMap/run_test.rb +11 -11
  110. data/test/IORMap/server.rb +26 -26
  111. data/test/IORTable/client.rb +14 -14
  112. data/test/IORTable/run_test.rb +11 -11
  113. data/test/IORTable/server.rb +26 -26
  114. data/test/Implicit_Conversion/client.rb +20 -17
  115. data/test/Implicit_Conversion/run_test.rb +11 -11
  116. data/test/Implicit_Conversion/server.rb +16 -16
  117. data/test/Multi_Threading/Multiple_ORB/client.rb +14 -14
  118. data/test/Multi_Threading/Multiple_ORB/run_test.rb +12 -12
  119. data/test/Multi_Threading/Multiple_ORB/server.rb +17 -17
  120. data/test/Multi_Threading/Simple/client.rb +17 -17
  121. data/test/Multi_Threading/Simple/run_test.rb +11 -11
  122. data/test/Multi_Threading/Simple/server.rb +16 -16
  123. data/test/Multi_Threading/Threads/client.rb +16 -16
  124. data/test/Multi_Threading/Threads/run_test.rb +11 -11
  125. data/test/Multi_Threading/Threads/server.rb +22 -22
  126. data/test/Multi_Threading/Threads/watchdog.rb +16 -16
  127. data/test/Multiple_Servant_Interfaces/client.rb +14 -14
  128. data/test/Multiple_Servant_Interfaces/run_test.rb +11 -11
  129. data/test/Multiple_Servant_Interfaces/server.rb +18 -18
  130. data/test/Nil/run_test.rb +10 -10
  131. data/test/Nil/test.rb +22 -19
  132. data/test/OBV/AbstractInterface/client.rb +14 -14
  133. data/test/OBV/AbstractInterface/run_test.rb +11 -11
  134. data/test/OBV/AbstractInterface/server.rb +20 -19
  135. data/test/OBV/Custom/OBV_impl.rb +2 -0
  136. data/test/OBV/Custom/client.rb +14 -14
  137. data/test/OBV/Custom/run_test.rb +11 -11
  138. data/test/OBV/Custom/server.rb +16 -16
  139. data/test/OBV/Simple/OBV_impl.rb +1 -0
  140. data/test/OBV/Simple/client.rb +14 -14
  141. data/test/OBV/Simple/run_test.rb +11 -11
  142. data/test/OBV/Simple/server.rb +16 -16
  143. data/test/OBV/Simple_Event/Event_impl.rb +1 -0
  144. data/test/OBV/Simple_Event/client.rb +14 -14
  145. data/test/OBV/Simple_Event/run_test.rb +11 -11
  146. data/test/OBV/Simple_Event/server.rb +16 -16
  147. data/test/OBV/Supports/client.rb +19 -19
  148. data/test/OBV/Supports/run_test.rb +11 -11
  149. data/test/OBV/Supports/server.rb +15 -15
  150. data/test/OBV/Supports/supports_impl.rb +3 -0
  151. data/test/OBV/Tree/client.rb +14 -14
  152. data/test/OBV/Tree/run_test.rb +11 -11
  153. data/test/OBV/Tree/server.rb +19 -19
  154. data/test/OBV/Truncatable/Truncatable_impl.rb +1 -1
  155. data/test/OBV/Truncatable/client.rb +57 -57
  156. data/test/OBV/Truncatable/run_test.rb +11 -11
  157. data/test/OBV/Truncatable/server.rb +15 -15
  158. data/test/OBV/ValueBox/client.rb +154 -153
  159. data/test/OBV/ValueBox/run_test.rb +11 -11
  160. data/test/OBV/ValueBox/server.rb +42 -42
  161. data/test/Object/client.rb +15 -15
  162. data/test/Object/run_test.rb +11 -11
  163. data/test/Object/server.rb +19 -19
  164. data/test/POA/run_test.rb +10 -10
  165. data/test/POA/test.rb +16 -16
  166. data/test/Param_Test/client.rb +51 -51
  167. data/test/Param_Test/run_test.rb +11 -11
  168. data/test/Param_Test/server.rb +59 -59
  169. data/test/Performance/Simple/client.rb +16 -16
  170. data/test/Performance/Simple/run_test.rb +11 -11
  171. data/test/Performance/Simple/server.rb +16 -16
  172. data/test/Policies/run_test.rb +10 -10
  173. data/test/Policies/test.rb +23 -24
  174. data/test/Timeout/client.rb +21 -21
  175. data/test/Timeout/run_test.rb +11 -11
  176. data/test/Timeout/server.rb +22 -22
  177. data/test/lib/assert.rb +0 -1
  178. data/test/lib/test.rb +27 -22
  179. data/test/test_runner.rb +20 -21
  180. metadata +11 -13
  181. data/ext/extload/extload.c +0 -60
  182. data/ext/librpoa/srvreq_fix.cpp +0 -282
  183. data/ext/librpoa/srvreq_fix.h +0 -148
data/test/lib/assert.rb CHANGED
@@ -39,4 +39,3 @@ module TestUtil
39
39
  end
40
40
 
41
41
  end
42
-
data/test/lib/test.rb CHANGED
@@ -65,7 +65,7 @@ if defined?(JRUBY_VERSION)
65
65
  # const char *const *argv,
66
66
  # const char *const *envp);
67
67
 
68
- attach_function :_spawnvpe,:_spawnvpe, [:int, :string, :pointer, :pointer], :pointer
68
+ attach_function :_spawnvpe, :_spawnvpe, [:int, :string, :pointer, :pointer], :pointer
69
69
 
70
70
  P_NOWAIT = 1
71
71
 
@@ -105,7 +105,7 @@ if defined?(JRUBY_VERSION)
105
105
  def self.wait(pid)
106
106
  stat_ptr = FFI::MemoryPointer.new(:int, 1)
107
107
  tmp_pid = _wait(stat_ptr, pid, 0)
108
- if tmp_pid==pid
108
+ if tmp_pid == pid
109
109
  return [pid, stat_ptr.get_int()]
110
110
  else
111
111
  return [pid, 0]
@@ -120,7 +120,7 @@ if defined?(JRUBY_VERSION)
120
120
  args_ary.put_array_of_pointer(0, str_ptrs)
121
121
 
122
122
  env_ary = FFI::MemoryPointer.new(:pointer, ENV.length + 1)
123
- env_ptrs = ENV.map {|key,value| FFI::MemoryPointer.from_string("#{key}=#{value}")}
123
+ env_ptrs = ENV.map {|key, value| FFI::MemoryPointer.from_string("#{key}=#{value}")}
124
124
  env_ary.put_array_of_pointer(0, env_ptrs)
125
125
 
126
126
  [P_NOWAIT, args[0], args_ary, env_ary]
@@ -159,8 +159,8 @@ if defined?(JRUBY_VERSION)
159
159
  def self.wait(pid)
160
160
  begin
161
161
  tmp, status = ::Process.waitpid2(pid, ::Process::WNOHANG)
162
- if tmp==pid and status.success? != nil
163
- return [pid, status.success?() ? 0 : status.exitstatus ]
162
+ if tmp == pid and status.success? != nil
163
+ return [pid, status.success?() ? 0 : status.exitstatus]
164
164
  end
165
165
  return [nil, 0]
166
166
  rescue Errno::ECHILD
@@ -178,13 +178,14 @@ if defined?(JRUBY_VERSION)
178
178
  args_ary.put_array_of_pointer(0, str_ptrs)
179
179
 
180
180
  env_ary = FFI::MemoryPointer.new(:pointer, ENV.length + 1)
181
- env_ptrs = ENV.map {|key,value| FFI::MemoryPointer.from_string("#{key}=#{value}")}
181
+ env_ptrs = ENV.map {|key, value| FFI::MemoryPointer.from_string("#{key}=#{value}")}
182
182
  env_ary.put_array_of_pointer(0, env_ptrs)
183
183
 
184
184
  [pid_ptr, args[0], nil, nil, args_ary, env_ary]
185
185
  end
186
186
  end
187
187
  end
188
+
188
189
  def initialize(cmd_, arg_)
189
190
  @pid = nil
190
191
  @exitstatus = nil
@@ -197,7 +198,7 @@ if defined?(JRUBY_VERSION)
197
198
  sleep 0.01
198
199
 
199
200
  tmp_pid, tmp_status = Exec.wait(@pid)
200
- if tmp_pid==@pid
201
+ if tmp_pid == @pid
201
202
  exit_status = tmp_status
202
203
  is_running = false
203
204
  end
@@ -237,7 +238,8 @@ if defined?(JRUBY_VERSION)
237
238
  end
238
239
 
239
240
  def is_running?; @exitstatus.nil?; end
240
- def has_error? ; @trd.status.nil? or (!self.is_running? and self.exitstatus!=0) ;end
241
+
242
+ def has_error? ; @trd.status.nil? or (!self.is_running? and self.exitstatus != 0) ;end
241
243
 
242
244
  def stop
243
245
  Exec.stop(@pid)
@@ -264,7 +266,7 @@ elsif is_win32? && TestUtil::RBVersion[0] < 2 && TestUtil::RBVersion[1] < 9
264
266
 
265
267
  protected
266
268
  # Used by Process.create
267
- ProcessInfo = Struct.new("ProcessInfo",
269
+ ProcessInfo = Struct.new('ProcessInfo',
268
270
  :process_handle,
269
271
  :thread_handle,
270
272
  :process_id,
@@ -287,9 +289,9 @@ elsif is_win32? && TestUtil::RBVersion[0] < 2 && TestUtil::RBVersion[1] < 9
287
289
  extend WinAPI
288
290
 
289
291
  def Process.create(cmd_)
290
- startinfo = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
292
+ startinfo = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
291
293
  startinfo = startinfo.pack('LLLLLLLLLLLLSSLLLL')
292
- procinfo = [0,0,0,0].pack('LLLL')
294
+ procinfo = [0, 0, 0, 0].pack('LLLL')
293
295
 
294
296
  bool = CreateProcess(
295
297
  0, # App name
@@ -305,14 +307,14 @@ elsif is_win32? && TestUtil::RBVersion[0] < 2 && TestUtil::RBVersion[1] < 9
305
307
  )
306
308
 
307
309
  unless bool
308
- raise ProcessError, "CreateProcess() failed: ", get_last_error
310
+ raise ProcessError, 'CreateProcess() failed: ', get_last_error
309
311
  end
310
312
 
311
313
  ProcessInfo.new(
312
- procinfo[0,4].unpack('L').first, # hProcess
313
- procinfo[4,4].unpack('L').first, # hThread
314
- procinfo[8,4].unpack('L').first, # hProcessId
315
- procinfo[12,4].unpack('L').first # hThreadId
314
+ procinfo[0, 4].unpack('L').first, # hProcess
315
+ procinfo[4, 4].unpack('L').first, # hThread
316
+ procinfo[8, 4].unpack('L').first, # hProcessId
317
+ procinfo[12, 4].unpack('L').first # hThreadId
316
318
  )
317
319
  end
318
320
 
@@ -324,7 +326,7 @@ elsif is_win32? && TestUtil::RBVersion[0] < 2 && TestUtil::RBVersion[1] < 9
324
326
  else
325
327
  CloseHandle(pi_.process_handle) unless pi_.process_handle == INVALID_HANDLE_VALUE
326
328
  pi_.process_handle = INVALID_HANDLE_VALUE
327
- raise ProcessError, "GetExitCodeProcess failed: ", get_last_error
329
+ raise ProcessError, 'GetExitCodeProcess failed: ', get_last_error
328
330
  end
329
331
  end
330
332
 
@@ -395,6 +397,7 @@ elsif is_win32? && TestUtil::RBVersion[0] < 2 && TestUtil::RBVersion[1] < 9
395
397
  def exitstatus; @exitstatus; end
396
398
 
397
399
  def is_running?; @exitstatus.nil?; end
400
+
398
401
  def has_error?; !@exitstatus.nil? and (@exitstatus != 0); end
399
402
 
400
403
  def stop
@@ -441,7 +444,7 @@ else # !win32
441
444
  def check_status
442
445
  begin
443
446
  tmp, @status = ::Process.waitpid2(@pid, ::Process::WNOHANG)
444
- if tmp==@pid and @status.success? == false
447
+ if tmp == @pid and @status.success? == false
445
448
  @exitstatus = @status.exitstatus
446
449
  return false
447
450
  end
@@ -457,6 +460,7 @@ else # !win32
457
460
  end
458
461
 
459
462
  def is_running?; @exitstatus.nil?; end
463
+
460
464
  def has_error?; !@status.nil? and (@status.success? == false); end
461
465
 
462
466
  def stop
@@ -472,7 +476,7 @@ end
472
476
  class Test
473
477
  def initialize
474
478
  @proc = nil
475
- @cmd = ""
479
+ @cmd = ''
476
480
  end
477
481
 
478
482
  def run(cmd_, arg_)
@@ -487,10 +491,12 @@ end
487
491
  end
488
492
 
489
493
  def pid; @proc.pid; end
494
+
490
495
  def is_running?; @proc.is_running?; end
496
+
491
497
  def exit_status; @proc.exitstatus; end
492
498
 
493
- def wait(timeout, check_exit=true)
499
+ def wait(timeout, check_exit = true)
494
500
  t = Time.now
495
501
  begin
496
502
  if @proc.check_status
@@ -523,7 +529,7 @@ end
523
529
 
524
530
  def TestUtil.wait_for_file(filename, timeout)
525
531
  t = Time.now
526
- while !File.readable?(filename) do
532
+ while !File.readable?(filename)
527
533
  sleep(0.1)
528
534
  if (Time.now() - t) >= timeout.to_f
529
535
  STDERR.puts "ERROR: could not find file '#{filename}'"
@@ -538,4 +544,3 @@ end
538
544
  end
539
545
 
540
546
  end
541
-
data/test/test_runner.rb CHANGED
@@ -49,23 +49,23 @@ else
49
49
  ENV['RUBYLIB'] = incdirs.join(File::PATH_SEPARATOR)
50
50
  if is_win32
51
51
  ENV['PATH'] = [
52
- File.directory?(ace_root) ? File.join(ENV['ACE_ROOT'],'lib') : nil,
52
+ File.directory?(ace_root) ? File.join(ace_root, 'lib') : nil,
53
53
  File.expand_path(File.join(root_path, 'ext')),
54
54
  ENV['PATH']
55
55
  ].compact.join(File::PATH_SEPARATOR)
56
56
  elsif RUBY_PLATFORM =~ /darwin/
57
57
  ENV['DYLD_LIBRARY_PATH'] = [
58
- File.directory?(ace_root) ? File.join(ENV['ACE_ROOT'],'lib') : nil,
58
+ File.directory?(ace_root) ? File.join(ace_root, 'lib') : nil,
59
59
  ENV['DYLD_LIBRARY_PATH']
60
60
  ].compact.join(File::PATH_SEPARATOR)
61
61
  ENV['DYLD_FALLBACK_LIBRARY_PATH'] = [
62
- File.directory?(ace_root) ? File.join(ENV['ACE_ROOT'],'lib') : nil,
62
+ File.directory?(ace_root) ? File.join(ace_root, 'lib') : nil,
63
63
  File.expand_path(File.join(root_path, 'ext')),
64
64
  ENV['DYLD_FALLBACK_LIBRARY_PATH']
65
65
  ].compact.join(File::PATH_SEPARATOR)
66
66
  else
67
67
  ENV['LD_LIBRARY_PATH'] = [
68
- File.directory?(ace_root) ? File.join(ENV['ACE_ROOT'],'lib') : nil,
68
+ File.directory?(ace_root) ? File.join(ace_root, 'lib') : nil,
69
69
  ENV['LD_LIBRARY_PATH']
70
70
  ].compact.join(File::PATH_SEPARATOR)
71
71
  end
@@ -126,7 +126,7 @@ module TestFinder
126
126
  puts dir
127
127
  end
128
128
  else
129
- Dir.glob(File.join(path, "*")) {|psub| self.process_directory(psub)}
129
+ Dir.glob(File.join(path, '*')) {|psub| self.process_directory(psub)}
130
130
  end
131
131
  end
132
132
  end
@@ -136,25 +136,25 @@ module TestFinder
136
136
  script_name = File.basename($0)
137
137
  opts.banner = "Usage: #{script_name} #{/r2corba/ =~ script_name ? 'test ' : nil}[options]"
138
138
 
139
- opts.separator ""
139
+ opts.separator ''
140
140
 
141
- opts.on("-x MATCH", "--exclude=MATCH",
142
- "Do not run tests matching MATCH.",
143
- "Default: nil") { |v| (OPTIONS[:exclude] ||= []) << v.to_s }
144
- opts.on("-r MATCH", "--run=MATCH",
145
- "Only run tests matching MATCH.",
146
- "Default: nil (run all)") { |v| (OPTIONS[:runonly] ||= []) << v.to_s }
141
+ opts.on('-x MATCH', '--exclude=MATCH',
142
+ 'Do not run tests matching MATCH.',
143
+ 'Default: nil') { |v| (OPTIONS[:exclude] ||= []) << v.to_s }
144
+ opts.on('-r MATCH', '--run=MATCH',
145
+ 'Only run tests matching MATCH.',
146
+ 'Default: nil (run all)') { |v| (OPTIONS[:runonly] ||= []) << v.to_s }
147
147
  opts.on('-l', '--list',
148
148
  'List tests, do not run.',
149
- "Default: off") { OPTIONS[:listonly] = true }
150
- opts.on("-d",
151
- "Run with debugging output.",
149
+ 'Default: off') { OPTIONS[:listonly] = true }
150
+ opts.on('-d',
151
+ 'Run with debugging output.',
152
152
  "Default: ENV['R2CORBA_DEBUG'].nil? ? false : true") { OPTIONS[:debug] = true }
153
153
 
154
- opts.separator ""
154
+ opts.separator ''
155
155
 
156
- opts.on("-h", "--help",
157
- "Show this help message.") { puts opts; exit }
156
+ opts.on('-h', '--help',
157
+ 'Show this help message.') { puts opts; exit }
158
158
 
159
159
  opts.parse!(argv)
160
160
 
@@ -170,7 +170,7 @@ module TestFinder
170
170
  end
171
171
 
172
172
  if OPTIONS[:runonly].nil?
173
- Dir.glob(File.join(TestFinder::ROOT, "*")) do |p|
173
+ Dir.glob(File.join(TestFinder::ROOT, '*')) do |p|
174
174
  TestFinder.process_directory(p)
175
175
  end
176
176
  else
@@ -184,9 +184,8 @@ module TestFinder
184
184
  end
185
185
 
186
186
  # add Ruby library path for test library
187
- ENV['RUBYLIB'] = ((ENV['RUBYLIB'] || '').split(File::PATH_SEPARATOR)+[TestFinder::ROOT]).join(File::PATH_SEPARATOR)
187
+ ENV['RUBYLIB'] = ((ENV['RUBYLIB'] || '').split(File::PATH_SEPARATOR) + [TestFinder::ROOT]).join(File::PATH_SEPARATOR)
188
188
 
189
189
  if $0 == __FILE__
190
190
  TestFinder.run(ARGV)
191
191
  end
192
-
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r2corba
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Corino
8
+ - Johnny Willemsen
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2019-12-04 00:00:00.000000000 Z
12
+ date: 2021-08-11 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: ridl
@@ -16,28 +17,28 @@ dependencies:
16
17
  requirements:
17
18
  - - "~>"
18
19
  - !ruby/object:Gem::Version
19
- version: '2.5'
20
+ version: '2.8'
20
21
  type: :runtime
21
22
  prerelease: false
22
23
  version_requirements: !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - "~>"
25
26
  - !ruby/object:Gem::Version
26
- version: '2.5'
27
+ version: '2.8'
27
28
  - !ruby/object:Gem::Dependency
28
29
  name: rake
29
30
  requirement: !ruby/object:Gem::Requirement
30
31
  requirements:
31
- - - "~>"
32
+ - - ">="
32
33
  - !ruby/object:Gem::Version
33
- version: '10.0'
34
+ version: 12.3.3
34
35
  type: :runtime
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
- - - "~>"
39
+ - - ">="
39
40
  - !ruby/object:Gem::Version
40
- version: '10.0'
41
+ version: 12.3.3
41
42
  description: 'OMG CORBA v3.3 compliant CORBA language mapping implementation for Ruby.
42
43
  Depends on ridl gem for providing native Ruby IDL compiler. '
43
44
  email: mcorino@remedy.nl
@@ -57,7 +58,6 @@ files:
57
58
  - bin/ridlc
58
59
  - bin/rins
59
60
  - ext/ext.mwc
60
- - ext/extload/extload.c
61
61
  - ext/libr2tao/any.cpp
62
62
  - ext/libr2tao/exception.cpp
63
63
  - ext/libr2tao/exception.h
@@ -81,8 +81,6 @@ files:
81
81
  - ext/librpoa/rpoa_export.h
82
82
  - ext/librpoa/servant.cpp
83
83
  - ext/librpoa/servant.h
84
- - ext/librpoa/srvreq_fix.cpp
85
- - ext/librpoa/srvreq_fix.h
86
84
  - ext/librpol/policies.cpp
87
85
  - ext/librpol/policies.h
88
86
  - ext/librpol/rpol_export.h
@@ -320,14 +318,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
320
318
  requirements:
321
319
  - - ">="
322
320
  - !ruby/object:Gem::Version
323
- version: '2.0'
321
+ version: '2.4'
324
322
  required_rubygems_version: !ruby/object:Gem::Requirement
325
323
  requirements:
326
324
  - - ">="
327
325
  - !ruby/object:Gem::Version
328
326
  version: '0'
329
327
  requirements: []
330
- rubygems_version: 3.0.3
328
+ rubygems_version: 3.1.6
331
329
  signing_key:
332
330
  specification_version: 4
333
331
  summary: CORBA language mapping implementation for Ruby
@@ -1,60 +0,0 @@
1
-
2
- #include <windows.h>
3
- #include <string.h>
4
- #include <stdio.h>
5
-
6
- static TCHAR szModulePath[MAX_PATH+1] = {0};
7
- static TCHAR *pszPathEnd = 0;
8
-
9
- BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
10
- {
11
- (void)lpvReserved;
12
- size_t len;
13
-
14
- if (fdwReason == DLL_PROCESS_ATTACH)
15
- {
16
- GetModuleFileName(hinstDLL, &szModulePath[0], MAX_PATH);
17
- /* find last path separator and cut off path to get foldername incl. last separator */
18
- len = strlen (&szModulePath[0]);
19
- while (len > 0 && szModulePath[--len] != '\\') ;
20
- pszPathEnd = &szModulePath[len+1];
21
- *pszPathEnd = '\0';
22
- }
23
- return TRUE;
24
- }
25
-
26
- typedef void (WINAPI *TExtInit)(void);
27
-
28
- #define DEF_EXTENSION_INIT(LIBNAME) \
29
- __declspec (dllexport) void Init_ ## LIBNAME ## w() \
30
- { \
31
- const char *pszLibName; \
32
- HMODULE hlib; \
33
- TExtInit pfInit; \
34
- \
35
- pszLibName = #LIBNAME ".so"; \
36
- strcat (&szModulePath[0], pszLibName); \
37
- if (NULL == (hlib = LoadLibraryEx(szModulePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH))) \
38
- { \
39
- *pszPathEnd = '\0'; \
40
- strcat (&szModulePath[0], #LIBNAME "\\"); \
41
- strcat (&szModulePath[0], pszLibName); \
42
- if (NULL == (hlib = LoadLibraryEx(szModulePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH))) \
43
- { \
44
- printf("ERROR: extload failed to load %s\n", #LIBNAME); \
45
- return; \
46
- } \
47
- } \
48
- if (NULL == (pfInit = (TExtInit) GetProcAddress(hlib, "Init_" #LIBNAME))) \
49
- { \
50
- printf("ERROR: extload failed to retrieve init proc %s from lib %s\n", "Init_" #LIBNAME, #LIBNAME); \
51
- return; \
52
- } \
53
- pfInit (); \
54
- }
55
-
56
- DEF_EXTENSION_INIT(libr2tao)
57
-
58
- DEF_EXTENSION_INIT(librpoa)
59
-
60
- DEF_EXTENSION_INIT(librpol)
@@ -1,282 +0,0 @@
1
- /*--------------------------------------------------------------------
2
- # srvreq_fix.h - R2TAO CORBA Servant support
3
- #
4
- # Author: Martin Corino
5
- #
6
- # This program is free software; you can redistribute it and/or
7
- # modify it under the terms of the R2CORBA LICENSE which is
8
- # included with this program.
9
- #
10
- # Copyright (c) Remedy IT Expertise BV
11
- #------------------------------------------------------------------*/
12
-
13
- #ifndef __SRVREQ_FIX_CPP__
14
- #define __SRVREQ_FIX_CPP__
15
-
16
- #include "tao/DynamicInterface/DII_Arguments.h"
17
- #include "tao/DynamicInterface/Unknown_User_Exception.h"
18
- #include "tao/PortableServer/Collocated_Arguments_Converter.h"
19
- #include "tao/AnyTypeCode/NVList.h"
20
- #include "tao/GIOP_Utils.h"
21
- #include "tao/AnyTypeCode/Marshal.h"
22
- #include "tao/AnyTypeCode/TypeCode.h"
23
- #include "tao/AnyTypeCode/Any_Impl.h"
24
- #include "tao/operation_details.h"
25
- #include "tao/SystemException.h"
26
-
27
- // Reference counting for DSI ServerRequest object.
28
-
29
- CORBA::ULong
30
- R2CORBA::ServerRequest::_incr_refcount (void)
31
- {
32
- return ++this->refcount_;
33
- }
34
-
35
- CORBA::ULong
36
- R2CORBA::ServerRequest::_decr_refcount (void)
37
- {
38
- CORBA::ULong const new_count = --this->refcount_;
39
-
40
- if (new_count == 0)
41
- delete this;
42
-
43
- return new_count;
44
- }
45
-
46
- R2CORBA::ServerRequest::ServerRequest (TAO_ServerRequest &orb_server_request)
47
- : lazy_evaluation_ (0),
48
- ctx_ (CORBA::Context::_nil ()),
49
- params_ (CORBA::NVList::_nil ()),
50
- retval_ (0),
51
- exception_ (0),
52
- refcount_ (1),
53
- orb_server_request_ (orb_server_request),
54
- sent_gateway_exception_ (false)
55
- {
56
- this->orb_server_request_.is_dsi ();
57
- }
58
-
59
- R2CORBA::ServerRequest::~ServerRequest (void)
60
- {
61
- if (this->params_ != 0)
62
- {
63
- ::CORBA::release (this->params_);
64
- }
65
-
66
- delete this->retval_;
67
- delete this->exception_;
68
- }
69
-
70
- // Unmarshal in/inout params, and set up to marshal the appropriate
71
- // inout/out/return values later on.
72
- void
73
- R2CORBA::ServerRequest::arguments (CORBA::NVList_ptr &list)
74
- {
75
- // arguments() must be called before either of these.
76
- if (this->params_ != 0 || this->exception_ != 0)
77
- {
78
- throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 7, CORBA::COMPLETED_NO);
79
- }
80
-
81
- // In a collocated situation there will not be an incoming CDR stream
82
- // in which case we can get the arguments from the
83
- // operation_details using the 'collocated argument converter'.
84
- if (this->orb_server_request_.collocated ())
85
- {
86
- this->params_ = list;
87
-
88
- if (this->orb_server_request_.operation_details ()->cac () != 0)
89
- {
90
- TAO_OutputCDR output;
91
- this->orb_server_request_.operation_details ()->cac (
92
- )->dsi_convert_request (this->orb_server_request_,
93
- output);
94
-
95
- TAO_InputCDR input(output);
96
- this->params_->_tao_decode (input, CORBA::ARG_IN | CORBA::ARG_INOUT);
97
- }
98
- }
99
- else
100
- {
101
- // Save params for later use when marshaling the reply.
102
- this->params_ = list;
103
-
104
- // sometimes there is no incoming stream
105
- if (this->orb_server_request_.incoming ())
106
- {
107
- this->params_->_tao_incoming_cdr (*this->orb_server_request_.incoming (),
108
- CORBA::ARG_IN | CORBA::ARG_INOUT,
109
- this->lazy_evaluation_);
110
-
111
- // Pass this alignment back to the TAO_ServerRequest.
112
- this->orb_server_request_.dsi_nvlist_align (
113
- this->params_->_tao_target_alignment ());
114
- }
115
- }
116
- }
117
-
118
- // Store the result value. There's either an exception, or a result,
119
- // but not both of them. Results can be reported (at most once)
120
- // only after the parameter list has been provided (maybe empty).
121
- void
122
- R2CORBA::ServerRequest::set_result (const CORBA::Any &value
123
- )
124
- {
125
- // Setting a result when another result already exists or if an exception
126
- // exists or before the args have been processeed is an error.
127
- if (this->retval_ != 0 || this->exception_ != 0 || this->params_ == 0)
128
- {
129
- throw ::CORBA::BAD_INV_ORDER (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
130
- }
131
-
132
- ACE_NEW_THROW_EX (this->retval_,
133
- CORBA::Any (value),
134
- CORBA::NO_MEMORY ());
135
- }
136
-
137
- // NOTE: if "" is set, there has been a system exception,
138
- // and it will take precedence over exceptions reported using the
139
- // set_exception() mechanism of the ServerRequest, which we assume
140
- // the application writer will use to report only user exceptions.
141
- // If both types of exception happen on the same invocation, the user
142
- // exception will be lost.
143
-
144
- // Store the exception value.
145
- void
146
- R2CORBA::ServerRequest::set_exception (const CORBA::Any &value)
147
- {
148
- CORBA::TypeCode_var tc = value.type ();
149
-
150
- CORBA::TCKind const kind = tc->kind ();
151
-
152
- // set_exception() can be called at any time, but the Any arg MUST
153
- // contain an exception.
154
- if (kind != CORBA::tk_except)
155
- {
156
- throw ::CORBA::BAD_PARAM (CORBA::OMGVMCID | 21, CORBA::COMPLETED_MAYBE);
157
- }
158
-
159
- ACE_NEW_THROW_EX (this->exception_,
160
- CORBA::Any (value),
161
- CORBA::NO_MEMORY ());
162
-
163
- this->orb_server_request_.reply_status (GIOP::USER_EXCEPTION);
164
- }
165
-
166
- // This method will be utilized by the DSI servant to marshal outgoing
167
- // parameters.
168
- void
169
- R2CORBA::ServerRequest::dsi_marshal (void)
170
- {
171
- // There was a user exception, no need to marshal any parameters.
172
- if (this->sent_gateway_exception_)
173
- {
174
- return;
175
- }
176
-
177
- // In a collocated situation there is no outgoing CDR stream.
178
- // So, in case of an exception we just raise the UnknownUserException
179
- // and for a regular reply we use the 'collocated argument converter'.
180
- if (this->orb_server_request_.collocated ())
181
- {
182
- if (this->orb_server_request_.reply_status () == GIOP::USER_EXCEPTION)
183
- {
184
- throw CORBA::UnknownUserException (*this->exception_);
185
- }
186
- else if (this->orb_server_request_.operation_details ()->cac () != 0)
187
- {
188
- TAO_OutputCDR output;
189
- // marshal the return value if any
190
- if (this->retval_ != 0)
191
- {
192
- this->retval_->impl ()->marshal_value (output);
193
- }
194
-
195
- // marshal the "inout" and "out" parameters.
196
- if (this->params_ != 0)
197
- {
198
- this->params_->_tao_encode (
199
- output,
200
- CORBA::ARG_INOUT | CORBA::ARG_OUT);
201
- }
202
-
203
- TAO_InputCDR input (output);
204
- // set reply parameters
205
- this->orb_server_request_.operation_details ()->cac (
206
- )->dsi_convert_reply (this->orb_server_request_,
207
- input);
208
- }
209
- }
210
- else
211
- {
212
- if (this->orb_server_request_.reply_status () == GIOP::NO_EXCEPTION)
213
- {
214
- // In DSI, we can't rely on the skeleton to do this.
215
- if (this->retval_ == 0 && this->params_ == 0)
216
- {
217
- this->orb_server_request_.argument_flag (false);
218
- }
219
-
220
- this->orb_server_request_.init_reply ();
221
-
222
- // Send the return value, if any.
223
- if (this->retval_ != 0)
224
- {
225
- this->retval_->impl ()->marshal_value (
226
- *this->orb_server_request_.outgoing ());
227
- }
228
-
229
- // Send the "inout" and "out" parameters.
230
- if (this->params_ != 0)
231
- {
232
- this->params_->_tao_encode (
233
- *this->orb_server_request_.outgoing (),
234
- CORBA::ARG_INOUT | CORBA::ARG_OUT);
235
- }
236
- }
237
- else
238
- {
239
- // This defaults to true, but just to be safe...
240
- this->orb_server_request_.argument_flag (true);
241
-
242
- // Write the reply header to the ORB request's outgoing CDR stream.
243
- this->orb_server_request_.init_reply ();
244
-
245
- this->exception_->impl ()->marshal_value (
246
- *this->orb_server_request_.outgoing ());
247
- }
248
- }
249
-
250
- // do not send in case of deferred reply
251
- if (!this->orb_server_request_.deferred_reply ())
252
- {
253
- this->orb_server_request_.tao_send_reply ();
254
- }
255
- }
256
-
257
- void
258
- R2CORBA::ServerRequest::gateway_exception_reply (ACE_CString &raw_exception)
259
- {
260
- // This defaults to 1, but just to be safe...
261
- this->orb_server_request_.argument_flag (true);
262
-
263
- // This reply path handles only user exceptions.
264
- this->orb_server_request_.reply_status (GIOP::USER_EXCEPTION);
265
-
266
- this->orb_server_request_.init_reply ();
267
-
268
- // We know nothing about this exception, so we marshal it as a block
269
- // of bytes. The outgoing stream's byte order has already been matched
270
- // to the original source of the reply.
271
- this->orb_server_request_.outgoing ()->write_octet_array (
272
- reinterpret_cast<const CORBA::Octet *> (raw_exception.fast_rep ()),
273
- static_cast<CORBA::ULong> (raw_exception.length () + ACE_CDR::MAX_ALIGNMENT)
274
- );
275
-
276
- // This will prevent the marshaling of any parameters into this reply.
277
- this->sent_gateway_exception_ = true;
278
-
279
- this->orb_server_request_.tao_send_reply ();
280
- }
281
-
282
- #endif