app[:deploy_user] group app[:deploy_user] mode '0400' variables(:environment_settings => app[:environment_settings].to_hash) end rvm_shell "Bundle install and assets precompile" do ruby_string "#{app[:ruby_ver]}@#{app[:gemset]}" cwd release_path user app[:deploy_user] group app[:deploy_user] # common_groups = %w{development test cucumber} # bundle install --deployment --path #{app[:app_root]}/shared/bundle --without #{common_groups.join(' ')} code %{ bundle install --path #{app[:app_root]}/shared/bundle } end end before_restart do rvm_shell "assets precompile" do ruby_string "#{app[:ruby_ver]}@#{app[:gemset]}" cwd release_path user app[:deploy_user] group app[:deploy_user] # TODO I could not set the environment via the builtin command. Does not look like it is getting passed to popen4 # So instead of `environment "RAILS_ENV" => app[:environment]` I have it in the code block code %{ export RAILS_ENV=#{app[:environment]} bundle exec rake assets:precompile } end end symlink_before_migrate({ "config/database.yml" => "config/database.yml", "config/environments/#{app[:environment]}.rb" => "config/environments/#{app[:environment]}.rb" }) after_restart do
Analytics! <a href="#" onClick="_gaq.push(['_trackEvent', 'Purchases', 'profits', 'Awesome Item', 299]);"> ! Buy awesome stuff! </a> PS: You can use something like jQuery to make this more elegant.