diff options
Diffstat (limited to 'lib/bundler/cli/info.rb')
-rw-r--r-- | lib/bundler/cli/info.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb index 3afed89ceb..76c8cf60c0 100644 --- a/lib/bundler/cli/info.rb +++ b/lib/bundler/cli/info.rb @@ -18,6 +18,7 @@ module Bundler if spec return print_gem_path(spec) if @options[:path] + return print_gem_version(spec) if @options[:version] print_gem_info(spec) end end @@ -39,6 +40,10 @@ module Bundler raise GemNotFound, Bundler::CLI::Common.gem_not_found_message(gem_name, Bundler.definition.dependencies) end + def print_gem_version(spec) + Bundler.ui.info spec.version.to_s + end + def print_gem_path(spec) name = spec.name if name == "bundler" @@ -70,7 +75,7 @@ module Bundler gem_info << "\tPath: #{spec.full_gem_path}\n" gem_info << "\tDefault Gem: yes" if spec.respond_to?(:default_gem?) && spec.default_gem? - if spec.deleted_gem? + if name != "bundler" && spec.deleted_gem? return Bundler.ui.warn "The gem #{name} has been deleted. Gemspec information is still available though:\n#{gem_info}" end |