Sha256: 9c33d09e6268cbfe1ae2e37ce12803419e1cd64f91f3b91f3b0efab9af658f7b

Contents?: true

Size: 663 Bytes

Versions: 4

Compression:

Stored size: 663 Bytes

Contents

class Posgra::Exporter
  def self.export_roles(driver, options = {})
    self.new(driver, options).export_roles
  end

  def self.export_grants(driver, options = {})
    self.new(driver, options).export_grants
  end

  def self.export_databases(driver, options = {})
    self.new(driver, options).export_databases
  end

  def initialize(driver, options = {})
    @driver = driver
    @options = options
  end

  def export_roles
    {
      :users => @driver.describe_users.keys,
      :users_by_group => @driver.describe_groups,
    }
  end

  def export_grants
    @driver.describe_grants
  end

  def export_databases
    @driver.describe_databases
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
posgra-0.2.3.beta lib/posgra/exporter.rb
posgra-0.2.2 lib/posgra/exporter.rb
posgra-0.2.1 lib/posgra/exporter.rb
posgra-0.2.0 lib/posgra/exporter.rb