Sha256: ea4d9c833a27005b6b1a69882522d35adfe747237f08a4342406e22869d30094

Contents?: true

Size: 953 Bytes

Versions: 2

Compression:

Stored size: 953 Bytes

Contents

class Posgra::CLI::App < Thor
  class_option :host, :default => ENV['POSGRA_DB_HOST'] || 'localhost', :aliases => '-h'
  class_option :port, :type => :numeric, :default => ENV['POSGRA_DB_PORT'] || 5432, :aliases => '-p'
  class_option :dbname, :default => ENV['POSGRA_DB_DATABASE'] || 'postgres', :aliases => '-d'
  class_option :user, :default => ENV['POSGRA_DB_USER'], :aliases => '-U'
  class_option :password, :default => ENV['POSGRA_DB_PASSWORD'], :aliases => '-P'
  class_option :'account-output', :default => ENV['POSGRA_ACCOUNT_FILEPATH'] || 'account.csv'
  class_option :color, :type => :boolean, :default => true
  class_option :debug, :type => :boolean, :default => false

  desc 'role SUBCOMMAND', 'Manage roles'
  subcommand :role, Posgra::CLI::Role

  desc 'grant SUBCOMMAND', 'Manage grants'
  subcommand :grant, Posgra::CLI::Grant

  desc 'database SUBCOMMAND', 'Manage database grants'
  subcommand :database, Posgra::CLI::Database
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
posgra-0.2.3.beta lib/posgra/cli/app.rb
posgra-0.2.2 lib/posgra/cli/app.rb