Skip to content

Commit

Permalink
load rvm part of bundler only when rvm was loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Mar 19, 2013
1 parent 2d3c03a commit 016ef79
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/eycap/recipes/bundler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
task :bundle_gems, :roles => :app, :except => {:no_bundle => true} do
parallel do |session|
rvm_role = fetch(:rvm_require_role,"rvm")
session.when "in?(:#{rvm_role})", command_with_shell(<<-SHELL.split("\n").map(&:strip).join("; "), fetch(:rvm_shell))
if [ -f #{release_path}/Gemfile ]
then cd #{release_path} && bundle install --without=#{bundle_without} --system
fi
SHELL
if exists?(:rvm_shell)
session.when "in?(:#{rvm_role})", command_with_shell(<<-SHELL.split("\n").map(&:strip).join("; "), fetch(:rvm_shell))
if [ -f #{release_path}/Gemfile ]
then cd #{release_path} && bundle install --without=#{bundle_without} --system
fi
SHELL
end
session.else <<-SHELL.split("\n").map(&:strip).join("; ")
mkdir -p #{shared_path}/bundled_gems
if [ -f #{release_path}/Gemfile ]
Expand Down

0 comments on commit 016ef79

Please sign in to comment.