lib/gooddata/connection.rb in gooddata-0.5.3 vs lib/gooddata/connection.rb in gooddata-0.5.4

- old
+ new

@@ -140,11 +140,11 @@ # /uploads/ resources are special in that they use a different # host and a basic authentication. def upload(file, dir = nil) ensure_connection # We should have followed a link. If it was correct. - stage_url = DEFAULT_URL.sub(/\./, '-di.') + stage_url = @options[:webdav_server] || @url.sub(/\./, '-di.') # Make a directory, if needed if dir then url = stage_url + STAGE_PATH + dir + '/' method = :get @@ -192,10 +192,10 @@ :payload => File.read(file) ) end def download(what, where) - stage_url = DEFAULT_URL.sub(/\./, '-di.') + stage_url = @options[:webdav_server] || @url.sub(/\./, '-di.') url = stage_url + STAGE_PATH + what File.open(where, 'w') do |f| resp = RestClient::Request.execute({ :method => 'GET', :url => url,