From 8f987f26a623b80c65eb206d31e777d6bedbf172 Mon Sep 17 00:00:00 2001 From: Jonne Haß Date: Mon, 30 Mar 2015 01:07:14 +0200 Subject: Implement optional groups * Add optional option to the group method, defaulting to false * Exclude optional groups from the groups to be installed * Add --with parameter to bundle install to install a group that would * otherwise be excluded * Error out if a group is listed in both, --with and --without * Add bundle_with option to capistrano task --- man/bundle-install.ronn | 9 +++++++++ man/gemfile.5.ronn | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'man') diff --git a/man/bundle-install.ronn b/man/bundle-install.ronn index e9706b51..117fd363 100644 --- a/man/bundle-install.ronn +++ b/man/bundle-install.ronn @@ -18,6 +18,7 @@ bundle-install(1) -- Install the dependencies specified in your Gemfile [--standalone[=GROUP[ GROUP...]]] [--trust-policy=POLICY] [--without=GROUP[ GROUP...]] + [--with=GROUP[ GROUP...]] ## DESCRIPTION @@ -125,8 +126,16 @@ update process below under [CONSERVATIVE UPDATING][]. * `--without=`: A space-separated list of groups referencing gems to skip during installation. + If a group is given that is in the remembered list of groups given + to --with, it is removed from that list. This is a [remembered option][REMEMBERED OPTIONS]. +* `--with=`: + A space-separated list of groups referencing gems to install. If an + optional group is given it is installed. If a group is given that is + in the remembered list of groups given to --without, it is removed + from that list. This is a [remembered option][REMEMBERED OPTIONS]. + ## DEPLOYMENT MODE diff --git a/man/gemfile.5.ronn b/man/gemfile.5.ronn index 876c9273..dcd1961a 100644 --- a/man/gemfile.5.ronn +++ b/man/gemfile.5.ronn @@ -430,11 +430,15 @@ applied to a group of gems by using block form. gem "sqlite3" end - group :development do + group :development, :optional => true do gem "wirble" gem "faker" end +In the case of the group block form the :optional option can be given +to prevent a group from being installed unless listed in the `--with` +option given to the `bundle install` command. + In the case of the `git` block form, the `:ref`, `:branch`, `:tag`, and `:submodules` options may be passed to the `git` method, and all gems in the block will inherit those options. -- cgit v1.2.3