Sha256: 7cb3341872f7a3b1f93fbd98ae7d92803bd10a7e973a5459340625ff5e3377fa
Contents?: true
Size: 589 Bytes
Versions: 15
Compression:
Stored size: 589 Bytes
Contents
namespace :invoke do # Defalut to :app roles rake_roles = fetch(:rake_roles, :app) desc "Execute a rake task on a remote server (cap invoke:rake TASK=db:migrate)" task :rake do if ENV['TASK'] on roles(rake_roles) do within current_path do with rails_env: fetch(:rails_env) do execute :rake, ENV['TASK'] end end end else puts "\n\nFailed! You need to specify the 'TASK' parameter!", "Usage: cap <stage> invoke:rake TASK=your:task" end end end
Version data entries
15 entries across 15 versions & 2 rubygems