From 340eeb96010c0fe66851d2a7b2c93e8a0b117b9e Mon Sep 17 00:00:00 2001 From: briri Date: Wed, 8 May 2019 14:16:55 -0700 Subject: [PATCH 1/2] added support for optional gem groups updated default updated README updated README --- CHANGELOG.md | 4 ++++ README.md | 1 + lib/capistrano/tasks/bundler.cap | 3 +++ 3 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76d3bce7..1e424790 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ * Your contribution here! +# [1.5.1][] (08 May 2019) + +* Added support for optional gem groups by allowing `:bundle_with, %w{optional_groupA optional_groupB}.join(' ')` to be set so that bundler will execute as: `bundle install --with optional_groupA optional_groupB` + # [1.5.0][] (23 Dec 2018) Changes to default behavior diff --git a/README.md b/README.md index f1786189..c4acffdc 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,7 @@ set :bundle_servers, -> { release_roles(fetch(:bundle_roles)) } # this is defaul set :bundle_binstubs, -> { shared_path.join('bin') } # default: nil set :bundle_gemfile, -> { release_path.join('MyGemfile') } # default: nil set :bundle_path, -> { shared_path.join('bundle') } # this is default. set it to nil for skipping the --path flag. +set :bundle_with, %w{msql}.join(' ') # default: nil set :bundle_without, %w{development test}.join(' ') # this is default set :bundle_flags, '--deployment --quiet' # this is default set :bundle_env_variables, {} # this is default diff --git a/lib/capistrano/tasks/bundler.cap b/lib/capistrano/tasks/bundler.cap index 6aa0a638..5872ed60 100644 --- a/lib/capistrano/tasks/bundler.cap +++ b/lib/capistrano/tasks/bundler.cap @@ -15,6 +15,7 @@ namespace :bundler do set :bundle_binstubs, -> { shared_path.join('bin') } set :bundle_gemfile, -> { release_path.join('Gemfile') } set :bundle_path, -> { shared_path.join('bundle') } + set :bundle_with, nil set :bundle_without, %w{development test}.join(' ') set :bundle_flags, '--deployment --quiet' set :bundle_jobs, nil @@ -33,6 +34,7 @@ namespace :bundler do else options << "--binstubs #{fetch(:bundle_binstubs)}" if fetch(:bundle_binstubs) options << "--jobs #{fetch(:bundle_jobs)}" if fetch(:bundle_jobs) + options << "--with #{fetch(:bundle_with)}" if fetch(:bundle_with) options << "--without #{fetch(:bundle_without)}" if fetch(:bundle_without) options << "#{fetch(:bundle_flags)}" if fetch(:bundle_flags) execute :bundle, :install, *options @@ -79,6 +81,7 @@ namespace :load do set :bundle_binstubs, nil set :bundle_gemfile, nil set :bundle_path, -> { shared_path.join('bundle') } + set :bundle_with, nil set :bundle_without, %w{development test}.join(' ') set :bundle_flags, '--deployment --quiet' set :bundle_jobs, 4 From 2aeb66cf424170cf38ca1e00da1317d4dd9a7880 Mon Sep 17 00:00:00 2001 From: briri Date: Wed, 8 May 2019 14:35:47 -0700 Subject: [PATCH 2/2] updated version in gemspec --- capistrano-bundler.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capistrano-bundler.gemspec b/capistrano-bundler.gemspec index 3160e8a7..69a71ea1 100644 --- a/capistrano-bundler.gemspec +++ b/capistrano-bundler.gemspec @@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |spec| spec.name = 'capistrano-bundler' - spec.version = '1.5.0' + spec.version = '1.5.1' spec.authors = ['Tom Clements', 'Lee Hambley', 'Kir Shatrov'] spec.email = ['seenmyfate@gmail.com', 'lee.hambley@gmail.com', 'shatrov@me.com'] spec.description = %q{Bundler support for Capistrano 3.x}