ruby / ruby/rubygems

Allow passing multiple Gemfiles to bundle clean

Open
#3,235 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Bundler status: triage
Dominant language
Ruby
Stars
4k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
81

Description

I believe bundle clean should be able to receive multiple Gemfiles to clean gems that are not in any of the associated .lock files.

This feature has already been requested here: rubygems/bundler#2546, but was refused in 2013. I would like this to be considered again and would add a use-case that was not mentioned at the time: Travis-CI 's caching

Some projects, have multiple Gemfile, the deep-cover gem has 7 of them. In deep-cover's case, they are for projects used as fixtures for tests.

Right now, Travis-CI supports caching bundler. However, it will only do it for the main Gemfile (it runs bundle clean before caching). If you want to cache more, you are own your own. In our deep-cover's case, the main Gemfile is very small compared to the small Rails application we use for tests.

The easy way is to just cache everything and never worry about clearing things, but that is quite wasteful (the cache would grow, slowing down the copy process and wasting Travis resources). If bundle clean allowed multiple Gemfiles, it would be trivial for users to set things up to the need of their project, and Travis-CI could add multiple Gemfile caching more easily. (Possibly by just passing in every Gemfile of the project)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the bundle clean command and review the earlier Bundler request referenced in the issue. Determine how multiple Gemfiles and their associated lockfiles should be handled, with completion meaning gems unused by all selected lockfiles are cleaned. No implementation file or test is named, so locate the command's existing tests before changing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.