lib/aptly_file.rb in aptly_cli-0.5.0 vs lib/aptly_file.rb in aptly_cli-0.6.0
- old
+ new
@@ -8,32 +8,32 @@
class AptlyFile < AptlyCommand
attr_accessor :file_uri, :package, :local_file_path
def file_dir
uri = '/files'
- response = self.class.get uri
+ response = get uri
response.parsed_response
end
def file_get(file_uri)
uri = if file_uri == '/'
'/files'
else
'/files/' + file_uri
end
- response = self.class.get uri
+ response = get uri
response.parsed_response
end
def file_delete(file_uri)
uri = '/files' + file_uri
- response = self.class.delete uri
+ response = delete uri
response.parsed_response
end
def file_post(post_options = {})
api_file_uri = '/files' + post_options[:file_uri].to_s
- response = self.class.post(api_file_uri,
+ response = post(api_file_uri,
body: {
package: post_options[:package],
file: File.new(post_options[:local_file])
})
response.parsed_response