summaryrefslogtreecommitdiff
path: root/lib/bundler/cli
diff options
context:
space:
mode:
authorJosef Šimánek <josef.simanek@gmail.com>2021-12-06 01:42:43 +0100
committergit <svn-admin@ruby-lang.org>2021-12-06 18:03:54 +0900
commit25423f0918eb31477a9ef72a4c14b0c5c5b78bc6 (patch)
treecb4bf1eae2f37a2756b0b493d8b4e3245ebb6cad /lib/bundler/cli
parent5ce3272e513e0dafedcc40f121e2d71bef3a3688 (diff)
[rubygems/rubygems] Add --version parameter to bundle info command.
https://github.com/rubygems/rubygems/commit/7d9fdd908d
Diffstat (limited to 'lib/bundler/cli')
-rw-r--r--lib/bundler/cli/info.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bundler/cli/info.rb b/lib/bundler/cli/info.rb
index 6ecc842b4c..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"