--exclusively=GROUP,... takes one or more Gemfile group names. When specified, update-interactive will only consider updating gems that are used exclusively by those groups. Indirect dependencies that are shared with other Gemfile groups will not be updated. For example, given --exclusively=test, capybara is a test dependency and can be updated, but nokogiri, which is an indirect dependency used in both test and in the default group would not be allowed to update.
-D is a shortcut for --exclusively=development,test (i.e. the most common use case for this feature).
This feature allows update-interactive to be used in a way that minimizes risk: you can update a subset of your lock file and be certain that these updates will not affect production.
I've divided the PR into two main commits:
f85a352 refactors the lockfile.rb implementation and adds much more test coverage. I also moved the report test out of bundle_update_interactive_test.rb and into report_test.rb where it belongs.
93b19b4 implements the --exclusively/-D feature on top of those refactors.
Remaining work:
[x] README documentation
[x] Additional test to exercise Report.generate(groups: %i[development test])
This PR adds two new command line options:
--exclusively=GROUP,...
takes one or more Gemfile group names. When specified,update-interactive
will only consider updating gems that are used exclusively by those groups. Indirect dependencies that are shared with other Gemfile groups will not be updated. For example, given--exclusively=test
,capybara
is a test dependency and can be updated, butnokogiri
, which is an indirect dependency used in both test and in the default group would not be allowed to update.-D
is a shortcut for--exclusively=development,test
(i.e. the most common use case for this feature).This feature allows
update-interactive
to be used in a way that minimizes risk: you can update a subset of your lock file and be certain that these updates will not affect production.I've divided the PR into two main commits:
f85a352 refactors the
lockfile.rb
implementation and adds much more test coverage. I also moved the report test out ofbundle_update_interactive_test.rb
and intoreport_test.rb
where it belongs.93b19b4 implements the
--exclusively
/-D
feature on top of those refactors.Remaining work:
Report.generate(groups: %i[development test])