add --paths
option to bundle list
command.
#6177
Conversation
This option mimics the `--paths` options in `bundle show` which is being removed in bundler 2. Example Usage: $ bundle list --paths /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actioncable-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionmailer-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionpack-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionview-5.1.4
\cc @indirect |
@@ -285,6 +285,7 @@ def show(gem_name = nil) | |||
if Bundler.feature_flag.list_command? | |||
desc "list", "List all gems in the bundle" | |||
method_option "name-only", :type => :boolean, :banner => "print only the gem names" | |||
method_option "paths", :type => :boolean, :banner => "print the path to each gem in the bundle" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if you pass bundle list --paths --name-only
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bundler will just print the same output as bundler list --name-only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we probably should make it an error if both are passed, then
spec/commands/list_spec.rb
Outdated
context "with paths option" do | ||
before do | ||
install_gemfile <<-G | ||
source "file://#{gem_repo1}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's also include a :git
gem and a gemspec
gem for good measure?
…n --only-names + --paths are used together
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@indirect can you confirm this fulfills the need?
ping @indirect |
Yep, this looks right! Let’s do it. @bundlerbot r+ |
📌 Commit 830e95f has been approved by |
add `--paths` option to `bundle list` command. See #6172 This option mimics the `--paths` options in `bundle show` which is being removed in Bundler 2. Example Usage: ``` $ bundle list --paths /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actioncable-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionmailer-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionpack-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionview-5.1.4 ```
☀️ Test successful - status-travis |
add `--paths` option to `bundle list` command. See #6172 This option mimics the `--paths` options in `bundle show` which is being removed in Bundler 2. Example Usage: ``` $ bundle list --paths /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actioncable-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionmailer-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionpack-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionview-5.1.4 ``` (cherry picked from commit e39f7aa)
add `--paths` option to `bundle list` command. See #6172 This option mimics the `--paths` options in `bundle show` which is being removed in Bundler 2. Example Usage: ``` $ bundle list --paths /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actioncable-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionmailer-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionpack-5.1.4 /Users/c/Desktop/Projects/testapp/.bundle/ruby/2.4.0/gems/actionview-5.1.4 ``` (cherry picked from commit e39f7aa)
See #6172
This option mimics the
--paths
options inbundle show
which isbeing removed in Bundler 2.
Example Usage: