Module: Txdb

Defined in:
lib/txdb.rb,
lib/txdb/app.rb,
lib/txdb/table.rb,
lib/txdb/utils.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, Utils Classes: Application, Config, ConnectionString, Database, Downloader, Hooks, Response, Table, TransifexProject, Triggers, TxResource, Uploader

Constant Summary collapse

DEFAULT_ENV =
'development'
VERSION =
'4.2.1'

Class Method Summary collapse

Class Method Details

.downloadObject



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

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

.envObject



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

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

.uploadObject



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

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