summaryrefslogtreecommitdiff
path: root/lib/bundler/deployment.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2012-05-23 15:26:06 -0700
committerAndre Arko <andre@arko.net>2012-05-23 15:26:06 -0700
commit5d518bec98d44e474eca37a0fe5fe9b79b5afb19 (patch)
treed4fd0ca3a96bb707afbb693ba389404689f3dc89 /lib/bundler/deployment.rb
parentd65c182503016dc857604434eb3daba3be4685c9 (diff)
downloadbundler-5d518bec98d44e474eca37a0fe5fe9b79b5afb19.tar.gz
fixes for capistrano integration
switch the bundler hook to before "deploy:finalize_update", so that finalize_update will not run if `bundle install` fails. (thanks @leehambley) change from `current_release` to `latest_release`, because both cap and vlad provide more robust directory-finding code behind `latest_release`. (thanks @dontangg) closes #1264
Diffstat (limited to 'lib/bundler/deployment.rb')
-rw-r--r--lib/bundler/deployment.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bundler/deployment.rb b/lib/bundler/deployment.rb
index 213972a794..7551a8b688 100644
--- a/lib/bundler/deployment.rb
+++ b/lib/bundler/deployment.rb
@@ -41,16 +41,16 @@ module Bundler
bundle_dir = context.fetch(:bundle_dir, File.join(context.fetch(:shared_path), 'bundle'))
bundle_gemfile = context.fetch(:bundle_gemfile, "Gemfile")
bundle_without = [*context.fetch(:bundle_without, [:development, :test])].compact
- current_release = context.fetch(:current_release)
- if current_release.to_s.empty?
+ app_path = context.fetch(:latest_release)
+ if app_path.to_s.empty?
raise error_type.new("Cannot detect current release path - make sure you have deployed at least once.")
end
- args = ["--gemfile #{File.join(current_release, bundle_gemfile)}"]
+ args = ["--gemfile #{File.join(app_path, bundle_gemfile)}"]
args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
args << bundle_flags.to_s
args << "--without #{bundle_without.join(" ")}" unless bundle_without.empty?
- run "cd #{current_release} && #{bundle_cmd} install #{args.join(' ')}"
+ run "cd #{app_path} && #{bundle_cmd} install #{args.join(' ')}"
end
end
end