~hazmat/charms/precise/rack/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-08 17:24:12 UTC
  • Revision ID: pavel.pachkovskij@gmail.com-20130808172412-2lvuzpmdluiglwtx
rack v2

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'