Sha256: 10f054e2c69e30baaea846d55f5bbc60876206015b9ee5eff7b4db81550face7

Contents?: true

Size: 449 Bytes

Versions: 11

Compression:

Stored size: 449 Bytes

Contents

desc "Start pgcli using connection info from database.yml"
task :pgcli do
  require "pgcli/rails/dbconsole"

  # APP_PATH constant must be set for DBConsole to work
  APP_PATH = Rails.root.join("config", "application") unless defined?(APP_PATH)

  opt = if ::Rails.version >= "5.1"
          { "--include-password" => true }
        else
          ["--include-password"]
        end

  console = Pgcli::Rails::DBConsole.new(opt)
  console.start
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
pgcli-rails-0.6.4 lib/pgcli/rails/tasks.rake
pgcli-rails-0.6.3 lib/pgcli/rails/tasks.rake
pgcli-rails-0.6.2 lib/pgcli/rails/tasks.rake
pgcli-rails-0.6.1 lib/pgcli/rails/tasks.rake
pgcli-rails-0.6.0 lib/pgcli/rails/tasks.rake
pgcli-rails-0.5.3 lib/pgcli/rails/tasks.rake
pgcli-rails-0.5.2 lib/pgcli/rails/tasks.rake
pgcli-rails-0.5.1 lib/pgcli/rails/tasks.rake
pgcli-rails-0.5.0 lib/pgcli/rails/tasks.rake
pgcli-rails-0.4.0 lib/pgcli/rails/tasks.rake
pgcli-rails-0.3.0 lib/pgcli/rails/tasks.rake