Class: RedashBackup

Inherits:
Object
  • Object
show all
Defined in:
lib/redash_backup.rb,
lib/redash_backup/version.rb

Defined Under Namespace

Classes: Base, Error

Constant Summary collapse

VERSION =
"0.3.0"

Instance Method Summary collapse

Constructor Details

#initialize(database_url) ⇒ RedashBackup

Returns a new instance of RedashBackup.



6
7
8
# File 'lib/redash_backup.rb', line 6

def initialize(database_url)
  ENV['DATABASE_URL'] = database_url
end

Instance Method Details

#execute(dir = nil) ⇒ Object



10
11
12
13
# File 'lib/redash_backup.rb', line 10

def execute(dir = nil)
  dir ||= './queries'
  RedashBackup::Base.export!(dir)
end