Module: Txdb

Defined in:
lib/txdb.rb,
lib/txdb/app.rb,
lib/txdb/table.rb,
lib/txdb/config.rb,
lib/txdb/version.rb,
lib/txdb/backends.rb,
lib/txdb/database.rb,
lib/txdb/handlers.rb,
lib/txdb/response.rb,
lib/txdb/uploader.rb,
lib/txdb/iterators.rb,
lib/txdb/downloader.rb,
lib/txdb/tx_resource.rb,
lib/txdb/response_helpers.rb,
lib/txdb/connection_string.rb,
lib/txdb/handlers/triggers.rb,
lib/txdb/transifex_project.rb,
lib/txdb/backends/globalize.rb,
lib/txdb/handlers/hook_handler.rb,
lib/txdb/backends/globalize/reader.rb,
lib/txdb/backends/globalize/writer.rb,
lib/txdb/handlers/triggers/handler.rb,
lib/txdb/backends/globalize/backend.rb,
lib/txdb/backends/globalize/helpers.rb,
lib/txdb/iterators/globalize_iterator.rb,
lib/txdb/handlers/triggers/pull_handler.rb,
lib/txdb/handlers/triggers/push_handler.rb,
lib/txdb/iterators/auto_increment_iterator.rb

Defined Under Namespace

Modules: Backends, Handlers, Iterators, RespondWith, ResponseHelpers Classes: Application, Config, ConnectionString, Database, Downloader, Hooks, Response, Table, TransifexProject, Triggers, TxResource, Uploader

Constant Summary collapse

DEFAULT_ENV =
'development'
VERSION =
'3.0.0'

Class Method Summary collapse

Class Method Details

.downloadObject



30
31
32
33
34
# File 'lib/txdb.rb', line 30

def download
  Txdb::Config.databases.each do |database|
    Downloader.download(database)
  end
end

.envObject



36
37
38
# File 'lib/txdb.rb', line 36

def env
  ENV.fetch('TXDB_ENV', DEFAULT_ENV)
end

.uploadObject



24
25
26
27
28
# File 'lib/txdb.rb', line 24

def upload
  Txdb::Config.databases.each do |database|
    Uploader.upload(database)
  end
end