Sha256: d3533b549f8e2295f3bac106db1b3036d33217f82340caafee4e90715102e125
Contents?: true
Size: 627 Bytes
Versions: 4
Compression:
Stored size: 627 Bytes
Contents
desc "Start pgcli using connection info from database.yml" task :pgcli do begin require "rails/commands/dbconsole" rescue LoadError require "rails/commands/dbconsole/dbconsole_command" end # APP_PATH constant must be set for DBConsole to work APP_PATH = Rails.root.join("config", "application") unless defined?(APP_PATH) opt = if Rails.gem_version >= Gem::Version.new("5.1.0") { "--include-password" => true } else ["--include-password"] end require "pgcli/rails/monkey_patch" Pgcli::Rails::MonkeyPatch.apply! Rails::DBConsole.new(opt).start console.start end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
pgcli-rails-0.9.1 | lib/pgcli/rails/tasks.rake |
pgcli-rails-0.9.0 | lib/pgcli/rails/tasks.rake |
pgcli-rails-0.8.1 | lib/pgcli/rails/tasks.rake |
pgcli-rails-0.8.0 | lib/pgcli/rails/tasks.rake |