Rake
A cheatsheet by @rstacruz|Refreshed 7 months ago.Refresh|View source on Github

Basic syntax

Basic syntax

namespace :foo do
  desc "Description"
  task :bar do
    ...
  end

  task :baz => :dependency do
  end

  task :baz => [:dep1, :dep2, :dep3] do
  end
end

# rake foo:bar

Rake task with arguments

Rake task with arguments

desc "Do something"
task :workit, [:id] => :environment do |_, args|
  id = args[:id]
end

# rake workit[234]