public
Description: DataMapper Adapters
Homepage: http://www.yehudakatz.com
Clone URL: git://github.com/wycats/dm-adapters.git
Search Repo:
Handle absolute paths correctly.
wycats (author)
Tue May 13 18:52:11 -0700 2008
commit  4adb2e64fb049b4e13ded3fae3bbbe0658438314
tree    227b586363d9b83fac27f5d96f900cea2411ae25
parent  a7bd92d1e8cf39ed1831324636db742eb07df8ac
...
82
83
84
85
 
86
87
 
88
89
90
...
95
96
97
98
 
 
 
99
100
101
...
82
83
84
 
85
86
 
87
88
89
90
...
95
96
97
 
98
99
100
101
102
103
0
@@ -82,9 +82,9 @@
0
       end
0
       
0
       def connect!
0
- if @uri.host && @uri.path
0
+ if !@uri.host.empty? && !@uri.path.empty?
0
           path = File.join(Dir.pwd, @uri.host, @uri.path)
0
- elsif @uri.host
0
+ elsif !@uri.host.empty?
0
           path = File.join(Dir.pwd, @uri.host)
0
         else
0
           path = @uri.path
0
@@ -95,7 +95,9 @@
0
         # Generate Ruby files and move them into .salesforce for future use
0
         unless File.directory? "#{ENV["HOME"]}/.salesforce/#{basename}"
0
           old_args = ARGV.dup
0
- ARGV.replace %W(--wsdl #{File.expand_path(path)} --module_path SalesforceAPI --classdef SalesforceAPI --type client)
0
+ path = path =~ %r{^/} ? path : File.expand_path(path)
0
+ ARGV.replace %W(--wsdl #{path} --module_path SalesforceAPI --classdef SalesforceAPI --type client)
0
+ p ARGV
0
           load `which wsdl2ruby.rb`.chomp
0
           FileUtils.mkdir_p "#{ENV["HOME"]}/.salesforce/#{basename}"
0
           FileUtils.mv Dir["SalesforceAPI*"], "#{ENV["HOME"]}/.salesforce/#{basename}/"

Comments

    No one has commented yet.