class AptlyCli::AptlyFile
Uploading file into Aptly
Attributes
file_uri[RW]
local_file_path[RW]
package[RW]
Public Instance Methods
file_delete(file_uri)
click to toggle source
# File lib/aptly_file.rb, line 27 def file_delete(file_uri) uri = '/files' + file_uri response = self.class.delete uri response.parsed_response end
file_dir()
click to toggle source
# File lib/aptly_file.rb, line 11 def file_dir uri = '/files' response = self.class.get uri response.parsed_response end
file_get(file_uri)
click to toggle source
# File lib/aptly_file.rb, line 17 def file_get(file_uri) uri = if file_uri == '/' '/files' else '/files/' + file_uri end response = self.class.get uri response.parsed_response end
file_post(post_options = {})
click to toggle source
# File lib/aptly_file.rb, line 33 def file_post(post_options = {}) api_file_uri = '/files' + post_options[:file_uri].to_s response = self.class.post(api_file_uri, body: { package: post_options[:package], file: File.new(post_options[:local_file]) }) response.parsed_response end