Sha256: 896a9b65e336112a48472663a8fbae3399d09517101c3d4ca704463f08482541

Contents?: true

Size: 487 Bytes

Versions: 13

Compression:

Stored size: 487 Bytes

Contents

Capistrano::Configuration.instance.load do
  require_settings :current_path

  namespace :console do
    desc "Open a remote console"
    task :default do
      server = find_servers(roles: [:db]).first
      exec "ssh -t -l #{user} #{server.host} -t 'source ~/.bash_profile && cd #{current_path} && foreman run bundle exec rails console'"
    end

    desc "Run a local console"
    task :local do
      exec "#{runtime_environment_exports} bundle exec rails console"
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
capistrano-elobuff-0.2.7 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.2.6 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.2.5 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.2.4 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.2.3 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.2.2 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.2.1 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.2.0 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.1.4 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.1.3 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.1.2 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.1.1 lib/capistrano/elobuff/recipes/console.rb
capistrano-elobuff-0.1.0 lib/capistrano/elobuff/recipes/console.rb