Sha256: e6e283a57ec7234a23a91c22ae2e65e8085f4868f9fd02231ea1c58ad864ce78

Contents?: true

Size: 934 Bytes

Versions: 21

Compression:

Stored size: 934 Bytes

Contents

desc 'console [TARGET]', 'Open a Rails console locally or on a Capistrano deploy target'
long_desc <<-LONGDESC
Local (development): `geordi console`

Remote: `geordi console staging`

Selecting the server: `geordi console staging -s` shows a menu with all available
servers. When passed a number, directly connects to the selected server.
LONGDESC

# This option is duplicated in shelll.rb
option :select_server, type: :string, aliases: '-s', banner: '[SERVER_NUMBER]',
  desc: 'Select a server to connect to'

def console(target = 'development', *_args)
  require 'geordi/remote'

  if target == 'development'
    invoke_geordi 'bundle_install'
    invoke_geordi 'yarn_install'

    Interaction.announce 'Opening a local Rails console'

    command = Util.console_command(target)
    Util.run!(command)
  else
    Interaction.announce 'Opening a Rails console on ' + target

    Geordi::Remote.new(target).console(options)
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
geordi-9.5.1 lib/geordi/commands/console.rb
geordi-9.5.0 lib/geordi/commands/console.rb
geordi-9.4.1 lib/geordi/commands/console.rb
geordi-9.4.0 lib/geordi/commands/console.rb
geordi-9.3.1 lib/geordi/commands/console.rb
geordi-9.3.0 lib/geordi/commands/console.rb
geordi-9.2.0 lib/geordi/commands/console.rb
geordi-9.1.0 lib/geordi/commands/console.rb
geordi-9.0.0 lib/geordi/commands/console.rb
geordi-8.0.0 lib/geordi/commands/console.rb
geordi-7.0.2 lib/geordi/commands/console.rb
geordi-7.0.1 lib/geordi/commands/console.rb
geordi-7.0.0 lib/geordi/commands/console.rb
geordi-6.1.0 lib/geordi/commands/console.rb
geordi-6.0.1 lib/geordi/commands/console.rb
geordi-6.0.0 lib/geordi/commands/console.rb
geordi-6.0.0.pre.rc1 lib/geordi/commands/console.rb
geordi-5.4.0 lib/geordi/commands/console.rb
geordi-5.3.0 lib/geordi/commands/console.rb
geordi-5.2.4 lib/geordi/commands/console.rb