lib/aptly_publish.rb in aptly_cli-0.2.0 vs lib/aptly_publish.rb in aptly_cli-0.2.1
- old
+ new
@@ -64,18 +64,18 @@
def parse_gpg_options(available_gpg_options, publish_options)
gpg_options = {}
available_gpg_options.each do |option|
if publish_options.has_key?(option)
unless publish_options[option].nil?
- gpg_options.merge!("#{option.capitalize}" => "#{publish_options[option]}")
+ gpg_options.merge!("#{option.capitalize}" => publish_options[option])
end
end
end
return gpg_options
end
-
+
def build_body(available_options_for_func, publish_options, body)
available_options_for_func.each do |option|
if publish_options.has_key?(option)
body[option.capitalize] = publish_options[option]
end
@@ -116,9 +116,13 @@
@body = {}
unless snapshots.nil?
snapshots = self.parse_names(snapshots, label_type)
@body[:Snapshots] = snapshots
+ end
+
+ unless gpg_options.empty?
+ @body[:Signing] = gpg_options
end
build_body(@@available_options_for_update, publish_options, @body)
if publish_options[:prefix]