lib/aptly_publish.rb in aptly_cli-0.5.0 vs lib/aptly_publish.rb in aptly_cli-0.6.0
- old
+ new
@@ -24,16 +24,16 @@
'/:.'
end
uri += "/#{publish_options[:distribution]}"
uri += '?force=1' if publish_options[:force] == true
- self.class.delete(uri)
+ delete(uri)
end
def publish_list
uri = '/publish'
- self.class.get(uri)
+ get(uri)
end
def _parse_snapshots(names)
snapshots_to_publish = []
names.each_pair do |k, v|
@@ -90,11 +90,11 @@
uri += "/#{publish_options[:prefix]}" if publish_options[:prefix]
@body_json = @body.to_json
- self.class.post(uri, :headers => { 'Content-Type' => 'application/json' },
+ post(uri, :headers => { 'Content-Type' => 'application/json' },
:body => @body_json)
end
def publish_update(publish_options={})
uri = '/publish'
@@ -110,16 +110,16 @@
build_body(@@available_options_for_update, publish_options, @body)
uri += if publish_options[:prefix]
"/#{publish_options[:prefix]}"
else
- '/'
+ '/:.'
end
uri += "/#{publish_options[:distribution]}"
@body_json = @body.to_json
- self.class.put(uri, :headers => { 'Content-Type' => 'application/json' },
+ put(uri, :headers => { 'Content-Type' => 'application/json' },
:body => @body_json)
end
end
end