Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

add --paths option to bundle list command. #6177

Merged
merged 3 commits into from Jan 8, 2018

Conversation

colby-swandale
Copy link
Member

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

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
@colby-swandale
Copy link
Member Author

\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"
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

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

context "with paths option" do
before do
install_gemfile <<-G
source "file://#{gem_repo1}"
Copy link
Member

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?

Copy link
Member

@segiddins segiddins left a 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?

@colby-swandale
Copy link
Member Author

ping @indirect

@indirect
Copy link
Member

indirect commented Jan 8, 2018

Yep, this looks right! Let’s do it.

@bundlerbot r+

@bundlerbot
Copy link
Collaborator

📌 Commit 830e95f has been approved by indirect

@bundlerbot
Copy link
Collaborator

⌛ Testing commit 830e95f with merge e39f7aa...

bundlerbot added a commit that referenced this pull request Jan 8, 2018
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
```
@bundlerbot
Copy link
Collaborator

☀️ Test successful - status-travis
Approved by: indirect
Pushing e39f7aa to master...

@bundlerbot bundlerbot merged commit 830e95f into master Jan 8, 2018
@segiddins segiddins deleted the colby/bundle-show-paths branch January 8, 2018 06:29
@colby-swandale colby-swandale added this to the 1.16.2 milestone Feb 4, 2018
@colby-swandale colby-swandale modified the milestones: 1.16.2, 1.17.0 Apr 4, 2018
colby-swandale pushed a commit that referenced this pull request Sep 20, 2018
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)
colby-swandale pushed a commit that referenced this pull request Oct 5, 2018
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)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants