diff options
Diffstat (limited to 'lib/rubygems/commands')
-rw-r--r-- | lib/rubygems/commands/pristine_command.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/rubygems/commands/pristine_command.rb b/lib/rubygems/commands/pristine_command.rb index dcd5bb76fb..91308d83f6 100644 --- a/lib/rubygems/commands/pristine_command.rb +++ b/lib/rubygems/commands/pristine_command.rb @@ -21,6 +21,11 @@ class Gem::Commands::PristineCommand < Gem::Command options[:all] = value end + add_option('--skip=gem_name', + 'used on --all, skip if name == gem_name') do |value, options| + options[:skip] = value + end + add_option('--[no-]extensions', 'Restore gems with extensions', 'in addition to regular gems') do |value, options| @@ -109,6 +114,11 @@ extensions will be restored. next end + if spec.name == options[:skip] + say "Skipped #{spec.full_name}, it was given through options" + next + end + if spec.bundled_gem_in_old_ruby? say "Skipped #{spec.full_name}, it is bundled with old Ruby" next |