ruby-changes:66814
From: David <ko1@a...>
Date: Fri, 16 Jul 2021 15:40:28 +0900 (JST)
Subject: [ruby-changes:66814] 71d3c9bbfa (master): [rubygems/rubygems] Fix `bundle plugin install --help` showing `bundle install`'s help
https://git.ruby-lang.org/ruby.git/commit/?id=71d3c9bbfa From 71d3c9bbfaa1cf251205e1fb7f9611c9dee54e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Tue, 13 Jul 2021 13:00:02 +0200 Subject: [rubygems/rubygems] Fix `bundle plugin install --help` showing `bundle install`'s help https://github.com/rubygems/rubygems/commit/b7b7d16aa8 --- lib/bundler/cli.rb | 1 + spec/bundler/plugins/install_spec.rb | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb index 3027535..aa94ad2 100644 --- a/lib/bundler/cli.rb +++ b/lib/bundler/cli.rb @@ -14,6 +14,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli.rb#L14 COMMAND_ALIASES = { "check" => "c", "install" => "i", + "plugin" => "", "list" => "ls", "exec" => ["e", "ex", "exe"], "cache" => ["package", "pack"], diff --git a/spec/bundler/plugins/install_spec.rb b/spec/bundler/plugins/install_spec.rb index 2175610..ef39e75 100644 --- a/spec/bundler/plugins/install_spec.rb +++ b/spec/bundler/plugins/install_spec.rb @@ -29,6 +29,12 @@ RSpec.describe "bundler plugin install" do https://github.com/ruby/ruby/blob/trunk/spec/bundler/plugins/install_spec.rb#L29 plugin_should_be_installed("foo") end + it "shows help when --help flag is given" do + bundle "plugin install --help" + + expect(out).to include("bundle plugin install PLUGINS # Install the plugin from the source") + end + context "plugin is already installed" do before do bundle "plugin install foo --source #{file_uri_for(gem_repo2)}" -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/