Module: Arql::Commands::Info

Defined in:
lib/arql/commands/info.rb

Class Method Summary collapse

Class Method Details

.db_infoObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/arql/commands/info.rb', line 6

def db_info
  <<~EOF

  Database Connection Information:

      Active:    #{color_boolean(ActiveRecord::Base.connection.active?)}
      Host:      #{Arql::App.config[:host]}
      Port:      #{Arql::App.config[:port]}
      Username:  #{Arql::App.config[:username]}
      Password:  #{(Arql::App.config[:password] || '').gsub(/./, '*')}
      Database:  #{Arql::App.config[:database]}
      Adapter:   #{Arql::App.config[:adapter]}
      Encoding:  #{Arql::App.config[:encoding]}
      Pool Size: #{Arql::App.config[:pool]}
  EOF
end

.ssh_infoObject



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/arql/commands/info.rb', line 23

def ssh_info
  <<~EOF

  SSH Connection Information:

      Active:     #{color_boolean(Arql::SSHProxy.active?)}
      Host:       #{Arql::App.config[:ssh][:host]}
      Port:       #{Arql::App.config[:ssh][:port]}
      Username:   #{Arql::App.config[:ssh][:user]}
      Password:   #{(Arql::App.config[:ssh][:password] || '').gsub(/./, '*')}
      Local Port: #{Arql::SSHProxy.local_ssh_proxy_port}
  EOF
end