Skip to content

Commit

Permalink
Add Run#upload_data.
Browse files Browse the repository at this point in the history
This exposes Server#upload_data to the Run API.
  • Loading branch information
hainesr committed Mar 13, 2012
1 parent 553def3 commit 758f430
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/t2-server/run.rb
Expand Up @@ -427,6 +427,18 @@ def upload_file(filename, params={})
@credentials)
end

# :call-seq:
# upload_data(data, remote_name, remote_directory = "") -> bool
#
# Upload data to the server and store it in <tt>remote_file</tt>. The
# remote directory to put this file in can also be specified, but if it is
# it must first have been created by a call to Run#mkdir.
def upload_data(data, remote_name, remote_directory = "")
location = "#{@links[:wdir]}/#{remote_directory}"
@server.upload_data(@identifier, data, remote_name, location,
@credentials)
end

# :stopdoc:
def upload_input_file(input, filename, params={})
warn "[DEPRECATION] 'Run#upload_input_file' is deprecated and will be " +
Expand Down

0 comments on commit 758f430

Please sign in to comment.