diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2017-05-26 11:15:24 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2017-06-14 10:15:47 -0500 |
commit | 65aca787cc329c8c655eaccedf0ea50fa5a47153 (patch) | |
tree | 19f84413928d87a50d78c2cada9310489382d69f /lib/bundler/cli | |
parent | e274d9fe47a0f1801761e4646ce5df32df6033ac (diff) | |
download | bundler-65aca787cc329c8c655eaccedf0ea50fa5a47153.tar.gz |
[Pristine] Allow passing a list of gems to pristine
Diffstat (limited to 'lib/bundler/cli')
-rw-r--r-- | lib/bundler/cli/pristine.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bundler/cli/pristine.rb b/lib/bundler/cli/pristine.rb index 86b7b86eaa..ccf970eae0 100644 --- a/lib/bundler/cli/pristine.rb +++ b/lib/bundler/cli/pristine.rb @@ -3,9 +3,14 @@ require "bundler/cli/common" module Bundler class CLI::Pristine + def initialize(gems) + @gems = gems + end + def run Bundler.load.specs.each do |spec| next if spec.name == "bundler" # Source::Rubygems doesn't install bundler + next if !@gems.empty? && !@gems.include?(spec.name) gem_name = "#{spec.name} (#{spec.version}#{spec.git_version})" gem_name += " (#{spec.platform})" if !spec.platform.nil? && spec.platform != Gem::Platform::RUBY |