soap4r-ng 2.0.3 → 2.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: feac1a1b6c95487a81f512a6140b042fb412fece
4
- data.tar.gz: 07fd71acfbc506dd522a151d6ac450927452b3e7
2
+ SHA256:
3
+ metadata.gz: b3cfbee8d5a5dbc5e4416c83cd11af3048e292043305392d03f536f9a8c51c64
4
+ data.tar.gz: b67f334fbb01dbb79ed85b5773dbf30c0d923d1c91c0f2e06d1d66f0fd6e0643
5
5
  SHA512:
6
- metadata.gz: ea80f755cd8d36451727d5a572ce9e509efe93d562e3fa463fd1e379bf8b5a1f02c59466d3ba90aa64309e83417688c6e0b0004b9d31b0872b1aa3b68d329d82
7
- data.tar.gz: 109b4f5fcdc2b3c98412c5e3ee1a8ae921eec1345e170681a1052afe04e82eba47656bcec78956e886bb3cc7f3b023d777b01a869f7028037667c734bd1f4599
6
+ metadata.gz: 6ba9dc6197fc4c73209df255cd9840a9220f34db791fcd54d191ef32d7b22d8cdb23461e785fb2beaffb5d58c02389898eab7a0b789017425cff4bc3e59c9f51
7
+ data.tar.gz: 15b63bc41c3c82597a2c90bae4904376d2aed2771d2239c19dfd0af31fb07a22b5ba9ce39086016ec230def7f8fa1325de00fc57b47953f5e9fa32574746901a
@@ -6,6 +6,11 @@
6
6
  # redistribute it and/or modify it under the same terms of Ruby's license;
7
7
  # either the dual license version in 2003, or any later version.
8
8
 
9
+ # in 2.4, 2.5 Fixnum/Bignum aliased to 'Integer'
10
+ FixnumShim = 1.class
11
+ FIXNUM_PRESENT = FixnumShim.name == 'Fixnum'
12
+ BignumShim = (10**20).class
13
+ BIGNUM_PRESENT = BignumShim.name == 'Bignum'
9
14
 
10
15
  require 'soap/baseData'
11
16
  require 'soap/mapping/mapping'
@@ -122,7 +127,7 @@ class EncodedRegistry
122
127
 
123
128
  StringFactory = StringFactory_.new
124
129
  BasetypeFactory = BasetypeFactory_.new
125
- FixnumFactory = FixnumFactory_.new
130
+ FixnumFactory = FixnumFactory_.new if FIXNUM_PRESENT
126
131
  DateTimeFactory = DateTimeFactory_.new
127
132
  ArrayFactory = ArrayFactory_.new
128
133
  Base64Factory = Base64Factory_.new
@@ -146,7 +151,6 @@ class EncodedRegistry
146
151
  {:derived_class => true}],
147
152
  [::Float, ::SOAP::SOAPFloat, BasetypeFactory,
148
153
  {:derived_class => true}],
149
- [::Fixnum, ::SOAP::SOAPInt, FixnumFactory],
150
154
  [::Integer, ::SOAP::SOAPInt, BasetypeFactory,
151
155
  {:derived_class => true}],
152
156
  [::Integer, ::SOAP::SOAPLong, BasetypeFactory,
@@ -199,6 +203,8 @@ class EncodedRegistry
199
203
  {:type => XSD::QName.new(RubyCustomTypeNamespace, "SOAPException")}],
200
204
  ]
201
205
 
206
+ SOAPBaseMap << [FixnumShim, ::SOAP::SOAPInt, FixnumFactory] if FIXNUM_PRESENT
207
+
202
208
  RubyOriginalMap = [
203
209
  [::NilClass, ::SOAP::SOAPNil, BasetypeFactory],
204
210
  [::TrueClass, ::SOAP::SOAPBoolean, BasetypeFactory],
@@ -212,7 +218,6 @@ class EncodedRegistry
212
218
  {:derived_class => true}],
213
219
  [::Float, ::SOAP::SOAPFloat, BasetypeFactory,
214
220
  {:derived_class => true}],
215
- [::Fixnum, ::SOAP::SOAPInt, FixnumFactory],
216
221
  [::Integer, ::SOAP::SOAPInt, BasetypeFactory,
217
222
  {:derived_class => true}],
218
223
  [::Integer, ::SOAP::SOAPLong, BasetypeFactory,
@@ -263,6 +268,8 @@ class EncodedRegistry
263
268
  {:type => XSD::QName.new(RubyCustomTypeNamespace, "SOAPException")}],
264
269
  ]
265
270
 
271
+ RubyOriginalMap << [FixnumShim, ::SOAP::SOAPInt, FixnumFactory] if FIXNUM_PRESENT
272
+
266
273
  attr_accessor :default_factory
267
274
  attr_accessor :excn_handler_obj2soap
268
275
  attr_accessor :excn_handler_soap2obj
@@ -411,7 +418,10 @@ private
411
418
  end
412
419
 
413
420
  def addextend2soap(node, obj)
414
- return if [Symbol, Fixnum, Bignum, Float].any?{ |c| obj.is_a?(c) }
421
+ return if [Symbol, Integer, Float].any?{ |c| obj.is_a?(c) }
422
+ return if FIXNUM_PRESENT && obj.is_a?(FixnumShim)
423
+ return if BIGNUM_PRESENT && obj.is_a?(BignumShim)
424
+ return if obj.is_a?(String) && obj.frozen?
415
425
  list = (class << obj; self; end).ancestors - obj.class.ancestors
416
426
  list = list.reject{|c| c.class == Class } ## As of Ruby 2.1 Singleton Classes are now included in the ancestry. Need to filter those out here.
417
427
 
@@ -6,6 +6,10 @@
6
6
  # redistribute it and/or modify it under the same terms of Ruby's license;
7
7
  # either the dual license version in 2003, or any later version.
8
8
 
9
+ old_verbose, $VERBOSE = $VERBOSE, nil # silence warnings
10
+ DATA_PRESENT = defined?(Data)
11
+ DataShim = Kernel.const_get('Data') if DATA_PRESENT
12
+ $VERBOSE = old_verbose
9
13
 
10
14
  module SOAP
11
15
  module Mapping
@@ -38,6 +42,7 @@ class RubytypeFactory < Factory
38
42
 
39
43
  def obj2soap(soap_class, obj, info, map)
40
44
  param = nil
45
+
41
46
  case obj
42
47
  when ::String
43
48
  unless @allow_original_mapping
@@ -193,7 +198,7 @@ class RubytypeFactory < Factory
193
198
  param.add('member', ele_member)
194
199
  addiv2soapattr(param, obj, map)
195
200
  end
196
- when ::IO, ::Binding, ::Data, ::Dir, ::File::Stat,
201
+ when ::IO, ::Binding, DataShim, ::Dir, ::File::Stat,
197
202
  ::MatchData, Method, ::Proc, ::Process::Status, ::Thread,
198
203
  ::ThreadGroup, ::UnboundMethod
199
204
  return nil
@@ -33,7 +33,9 @@ module SOAP
33
33
  # aaa.hhh = iii
34
34
  #
35
35
  class Property
36
- FrozenError = (RUBY_VERSION >= "1.9.0") ? RuntimeError : TypeError
36
+ unless defined?(FrozenError) # defined since 2.5
37
+ FrozenError = (RUBY_VERSION >= "1.9.0") ? RuntimeError : TypeError
38
+ end
37
39
 
38
40
  include Enumerable
39
41
 
@@ -327,4 +329,4 @@ private
327
329
  end
328
330
 
329
331
 
330
- end
332
+ end
@@ -202,7 +202,7 @@ private
202
202
  HTTPVersion = WEBrick::HTTPVersion.new('1.0') # dummy; ignored
203
203
 
204
204
  def run
205
- res = WEBrick::HTTPResponse.new({:HTTPVersion => HTTPVersion})
205
+ res = WEBrick::HTTPResponse.new({:HTTPVersion => HTTPVersion, :Logger => logger})
206
206
  begin
207
207
  @log.info { "received a request from '#{ @remote_host }'" }
208
208
  if @fcgi
@@ -227,9 +227,12 @@ private
227
227
  r.send_http_header
228
228
  buf = res.body
229
229
  else
230
- buf = ''
230
+ # since 2.5 it doesn't work with empty string in WEBRICK::HTTPResponse#send_header(socket)
231
+ # https://github.com/ruby/ruby/commit/c44978b99f0454b8f00674f2f407893c8c47248e
232
+ buf = StringIO.new
231
233
  res.send_response(buf)
232
- buf.sub!(/^[^\r]+\r\n/, '') # Trim status line.
234
+
235
+ buf = buf.string.sub(/^[^\r]+\r\n/, '') # Trim status line.
233
236
  end
234
237
  @log.debug { "SOAP CGI Response:\n#{ buf }" }
235
238
  if @fcgi
@@ -41,6 +41,7 @@ class HTTPServer < Logger::Application
41
41
  @router = ::SOAP::RPC::Router.new(actor)
42
42
  @soaplet = ::SOAP::RPC::SOAPlet.new(@router)
43
43
  on_init
44
+
44
45
  @server = WEBrick::HTTPServer.new(@webrick_config)
45
46
  @server.mount('/soaprouter', @soaplet)
46
47
  if wsdldir = config[:WSDLDocumentDirectory]
@@ -58,7 +59,13 @@ class HTTPServer < Logger::Application
58
59
  end
59
60
 
60
61
  def shutdown
61
- @server.shutdown if @server
62
+ if @server
63
+ @server.shutdown
64
+ while (@server.listeners.length > 0) && (@server.tokens.length > 0) && (@server.status != :Stop)
65
+ sleep(0.25)
66
+ end
67
+ sleep(0.25) # One more for good measure.
68
+ end
62
69
  end
63
70
 
64
71
  def authenticator
@@ -3,7 +3,7 @@ module SOAP
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 2
5
5
  MINOR = 0
6
- TINY = 3
6
+ TINY = 4
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
 
9
9
  FORK = "SOAP4R-NG"
@@ -28,7 +28,7 @@ class OxParser < XSD::XMLParser::Parser
28
28
  ::Ox.sax_parse(handler, string, {:symbolize=> false, :convert_special=> true, :skip=> :skip_return} )
29
29
  else
30
30
  # Use HTMLEntities Decoder. Leave the special-character conversion alone and let HTMLEntities decode it for us.
31
- ::Ox.sax_parse(handler, string, {})
31
+ ::Ox.sax_parse(handler, string, {:skip=> :skip_none})
32
32
  end
33
33
  end
34
34
 
metadata CHANGED
@@ -1,43 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soap4r-ng
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurence A. Lee, Hiroshi NAKAMURA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-29 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: httpclient
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.6'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.6'
27
- - !ruby/object:Gem::Dependency
28
- name: logger-application
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: 0.0.2
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: 0.0.2
11
+ date: 2018-06-21 00:00:00.000000000 Z
12
+ dependencies: []
41
13
  description: Soap4R NextGen (as maintained by RubyJedi) for Ruby 1.8 thru 2.1 and
42
14
  beyond
43
15
  email: rubyjedi@gmail.com, nahi@ruby-lang.org
@@ -230,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
202
  requirements:
231
203
  - none
232
204
  rubyforge_project:
233
- rubygems_version: 2.4.6
205
+ rubygems_version: 2.7.7
234
206
  signing_key:
235
207
  specification_version: 4
236
208
  summary: Soap4R-ng - Soap4R (as maintained by RubyJedi) for Ruby 1.8 thru 2.1 and