lib/gooddata/client.rb in gooddata-0.6.0.pre3 vs lib/gooddata/client.rb in gooddata-0.6.0.pre4
- old
+ new
@@ -117,10 +117,11 @@
connection.status = :logged_in
connection
end
def with_project(project, &bl)
+ fail "You have to specify a project when using with_project" if project.nil? || project.empty?
old_project = GoodData.project
begin
GoodData.use(project)
server_url = case GoodData.project.data["content"]["cluster"]
when "na1"
@@ -235,9 +236,13 @@
# === Examples
#
# GoodData.delete '/gdc/project/1'
def delete(path, options = {})
connection.delete path, options
+ end
+
+ def upload_webdav(file, options={})
+ connection.upload(file, options[:directory], options)
end
def poll(result, key, options={})
sleep_interval = options[:sleep_interval] || 10
link = result[key]["links"]["poll"]