Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config bundler locally for path, without and gemfile options #97

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions lib/capistrano/tasks/bundler.cap
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,18 @@ namespace :bundler do
on fetch(:bundle_servers) do
within release_path do
with fetch(:bundle_env_variables, {}) do
options = []
options << "--gemfile #{fetch(:bundle_gemfile)}" if fetch(:bundle_gemfile)
options << "--path #{fetch(:bundle_path)}" if fetch(:bundle_path)
unless test(:bundle, :check, *options)
bundle_path = fetch(:bundle_path)
bundle_without = fetch(:bundle_without)
bundle_gemfile = fetch(:bundle_gemfile)

execute :bundle, :config, "--local path #{bundle_path}" if bundle_path
execute :bundle, :config, "--local without #{bundle_without.split(' ').join(':')}" if bundle_without
execute :bundle, :config, "--local gemfile #{bundle_gemfile}" if bundle_gemfile

unless test(:bundle, :check)
options = []
options << "--binstubs #{fetch(:bundle_binstubs)}" if fetch(:bundle_binstubs)
options << "--jobs #{fetch(:bundle_jobs)}" if fetch(:bundle_jobs)
options << "--without #{fetch(:bundle_without)}" if fetch(:bundle_without)
options << "#{fetch(:bundle_flags)}" if fetch(:bundle_flags)
execute :bundle, :install, *options
end
Expand Down