Skip to content

Commit

Permalink
Added options option #23
Browse files Browse the repository at this point in the history
  • Loading branch information
grant-olson committed Mar 23, 2013
1 parent fde91b6 commit 207eb07
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/rubygems/openpgp/gpg_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module Gem::OpenPGP
"default-key" => "user_id",
"local-user" => "user_id",
"passphrase-fd" => "file_descriptor",
"passphrase-file" => "file_name"
"passphrase-file" => "file_name",
"options" => "file_name"
}

def self.gpg_options
Expand All @@ -23,7 +24,7 @@ def self.add_gpg_options cmd
mangled_flag = "--gpg-#{flag}"
mangled_flag += " #{arg}" if arg.is_a? String

cmd.add_option(mangled_flag,"Forward option --#{flag} to gpg") do |value, options|
cmd.add_option(mangled_flag,"Forward --#{flag} to gpg") do |value, options|
value = true if arg.nil? #boolean
gpg_options[flag] = value
end
Expand Down

0 comments on commit 207eb07

Please sign in to comment.