diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-20 15:14:35 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-08-20 15:14:35 +0000 |
commit | 2e553d11ef2810e8551f43454491cee757876370 (patch) | |
tree | 5c380eecb51149dda4f685df646a114be177d821 | |
parent | 64f4737b1a82db3cbafebe3e37ac76811f6c9d0c (diff) | |
download | ruby-2e553d11ef2810e8551f43454491cee757876370.tar.gz |
* lib/wsdl/xmlSchema/importer.rb (WSDL::XMLSchema::Importer#fetch): add
a workaround for importing an WSDL whose path begins with drive
letter. [ruby-dev:26242]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | lib/wsdl/xmlSchema/importer.rb | 8 |
2 files changed, 13 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Sun Aug 21 00:13:27 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp> + + * lib/wsdl/xmlSchema/importer.rb (WSDL::XMLSchema::Importer#fetch): add + a workaround for importing an WSDL whose path begins with drive + letter. [ruby-dev:26242] + Sat Aug 20 22:37:13 2005 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp> * lib/logger.rb (write, shift_log?, shift_log): file shifting race diff --git a/lib/wsdl/xmlSchema/importer.rb b/lib/wsdl/xmlSchema/importer.rb index 8829d5240c..f57bfd972a 100644 --- a/lib/wsdl/xmlSchema/importer.rb +++ b/lib/wsdl/xmlSchema/importer.rb @@ -48,12 +48,18 @@ private if location.scheme == 'file' or (location.relative? and FileTest.exist?(location.path)) content = File.open(location.path).read + elsif location.scheme and location.scheme.size == 1 and + FileTest.exist?(location.to_s) + # ToDo: remove this ugly workaround for a path with drive letter + # (D://foo/bar) + content = File.open(location.to_s).read else client = web_client.new(nil, "WSDL4R") client.proxy = ::SOAP::Env::HTTP_PROXY client.no_proxy = ::SOAP::Env::NO_PROXY if opt = ::SOAP::Property.loadproperty(::SOAP::PropertyName) - ::SOAP::HTTPConfigLoader.set_options(client, opt["client.protocol.http"]) + ::SOAP::HTTPConfigLoader.set_options(client, + opt["client.protocol.http"]) end content = client.get_content(location) end |