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

Version Path
capistrano-ops-0.2.3 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.2.2 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.2.1 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.2.0 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.1.9 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.1.8 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.1.7 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.1.6 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.1.5 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.1.4 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.1.3 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.1.2 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.1.1 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
capistrano-ops-0.1.0 lib/capistrano/ops/capistrano/v3/tasks/invoke.rake
zauberware-devops-0.0.8 lib/zauberware/devops/capistrano/v3/tasks/invoke.rake