Method: LabClient::Repositories#archive
- Defined in:
- lib/labclient/repository/archive.rb
#archive(project_id, file_path = nil, format = '.tar.gz') ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/labclient/repository/archive.rb', line 25 def archive(project_id, file_path = nil, format = '.tar.gz') project_id = format_id(project_id) file_path ||= "#{Dir.pwd}/#{project_id}#{format}" output = client.request(:get, "projects/#{project_id}/repository/archive#{format}", nil) File.write(file_path, output) end |