Skip to content

Commit

Permalink
Depend on logger-application since it was removed from Ruby 2.2
Browse files Browse the repository at this point in the history
The Logger::Application class was extracted from Ruby 2.2 and moved to the
logger-application gem as it is no longer maintained:
https://bugs.ruby-lang.org/issues/9860

This requires the gem version when the Logger::Application constant is
not defined.

Ideally, soap2r should be refactored to no longer depend on the
Logger::Application class since it is no longer maintained.
  • Loading branch information
cgunther committed Mar 1, 2015
1 parent 2cb45ef commit 887f71e
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 2 deletions.
3 changes: 3 additions & 0 deletions bin/wsdl2ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

require 'getoptlong'
require 'logger'
unless defined?(Logger::Application)
require 'logger-application'
end
require 'wsdl/soap/wsdl2ruby'


Expand Down
3 changes: 3 additions & 0 deletions bin/xsd2ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

require 'getoptlong'
require 'logger'
unless defined?(Logger::Application)
require 'logger-application'
end
require 'wsdl/xmlSchema/xsd2ruby'


Expand Down
5 changes: 4 additions & 1 deletion lib/soap/rpc/cgistub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
require 'webrick/httpresponse'
require 'webrick/httpstatus'
require 'logger'
unless defined?(Logger::Application)
require 'logger-application'
end
require 'soap/rpc/soaplet'


Expand Down Expand Up @@ -113,7 +116,7 @@ def initialize(appname, default_namespace)
@soaplet = ::SOAP::RPC::SOAPlet.new(@router)
on_init
end

def on_init
# do extra initialization in a derived class if needed.
end
Expand Down
5 changes: 4 additions & 1 deletion lib/soap/rpc/httpserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@


require 'logger'
unless defined?(Logger::Application)
require 'logger-application'
end
require 'soap/attrproxy'
require 'soap/rpc/soaplet'
require 'soap/streamHandler'
Expand Down Expand Up @@ -76,7 +79,7 @@ def add_rpc_request_servant(factory, namespace = @default_namespace)
def add_rpc_servant(obj, namespace = @default_namespace)
@router.add_rpc_servant(obj, namespace)
end

def add_request_headerhandler(factory)
@router.add_request_headerhandler(factory)
end
Expand Down
1 change: 1 addition & 0 deletions soap2r.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ Gem::Specification.new "soap2r", SOAP::VERSION do |s|
s.files = `git ls-files lib bin`.split("\n")
s.executables = [ "wsdl2ruby.rb", "xsd2ruby.rb" ]
s.add_dependency("httpclient", ">= 2.1.1")
s.add_dependency("logger-application", "~> 0.0.2")
s.licenses = ["RUBY", "GPLv2"]
end
3 changes: 3 additions & 0 deletions test/interopR2/simonReg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

require 'soap/driver'
require 'logger'
unless defined?(Logger::Application)
require 'logger-application'
end

require 'iSimonReg'

Expand Down

0 comments on commit 887f71e

Please sign in to comment.