From 6cc3a746df447d4157c00a696c9a7399619bb35a Mon Sep 17 00:00:00 2001 From: "Grant T. Olson" Date: Sat, 23 Mar 2013 09:31:49 -0400 Subject: [PATCH] Deprecate --key #23 --- CHANGELOG | 3 +++ lib/rubygems/commands/sign_command.rb | 1 + lib/rubygems/openpgp/sign_plugins.rb | 1 + 3 files changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 3585c43..aa44a40 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +* Add deprecation warning for --key option. Users should use + --gpg-local-user instead. --key will be removed in 1.0. + * Allow forwarding of select gpg options with commands like --gpg-homedir. run `gem verify --help` to see a list of all options. diff --git a/lib/rubygems/commands/sign_command.rb b/lib/rubygems/commands/sign_command.rb index 60eaef0..11a29bd 100644 --- a/lib/rubygems/commands/sign_command.rb +++ b/lib/rubygems/commands/sign_command.rb @@ -19,6 +19,7 @@ def initialize # :nodoc: add_version_option add_option('--key KEY', "Specify key id if you don't want to use your default gpg key") do |key, options| + warn("--key deprecated. Use --gpg-local-user instead") options[:key] = key end end diff --git a/lib/rubygems/openpgp/sign_plugins.rb b/lib/rubygems/openpgp/sign_plugins.rb index 47c71c7..59e7ddd 100644 --- a/lib/rubygems/openpgp/sign_plugins.rb +++ b/lib/rubygems/openpgp/sign_plugins.rb @@ -10,6 +10,7 @@ end b.add_option('--key KEY', "Specify key id if you don't want to use your default gpg key") do |key, options| + warn("--key deprecated. Use --gpg-local-user instead") Gem::OpenPGP.options[:key] = key end