94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# File 'lib/vmc/client.rb', line 94
def upload_app(name, zipfile, resource_manifest=nil)
resource_manifest ||= []
check_login_status
upload_data = {:_method => 'put'}
if zipfile
if zipfile.is_a? File
file = zipfile
else
file = File.new(zipfile, 'rb')
end
upload_data[:application] = file
end
upload_data[:resources] = resource_manifest.to_json if resource_manifest
http_post(path(VMC::APPS_PATH, name, "application"), upload_data)
rescue RestClient::ServerBrokeConnection
retry
end
|