~charmers/charms/precise/rails/trunk

« back to all changes in this revision

Viewing changes to hooks/chef/cookbooks/rack/definitions/rake_task.rb

  • Committer: Pavel Pachkovskij
  • Date: 2013-08-21 10:46:29 UTC
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: pavel.pachkovskij@gmail.com-20130821104629-zgrf6efx90tkf0ps
add rvm-installer, move cookbooks to CHARM_DIR

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
define :rake_task, action: :run, user: 'ubuntu', group: 'ubuntu', cwd: nil, ignore_failure: false do
2
 
  execute "rake #{params[:name]}" do
3
 
    action params[:action]
4
 
    command wrap_bundle(["cd #{params[:cwd]}", "rack_bundle exec rake #{params[:name]}"])
5
 
    cwd params[:cwd]
6
 
    group params[:group]
7
 
    ignore_failure params[:ignore_failure]
8
 
    only_if { run_with_wrap_bundle(["cd #{params[:cwd]}", "rack_bundle exec rake #{params[:name]} --dry-run"]) && $?.success? }
9
 
    user params[:user]
10
 
  end
11
 
end
 
 
b'\\ No newline at end of file'