Module: BackupFoundation
- Defined in:
- lib/backup_foundation.rb,
lib/backup_foundation/job.rb,
lib/backup_foundation/db/base.rb,
lib/backup_foundation/railtie.rb,
lib/backup_foundation/version.rb,
lib/backup_foundation/db/mysql.rb,
lib/backup_foundation/db/sqlite.rb,
lib/backup_foundation/db/databases.rb,
lib/backup_foundation/db/postgresql.rb,
lib/generators/backup_foundation/install_generator.rb
Defined Under Namespace
Modules: DB, Generators Classes: Job, Railtie
Constant Summary collapse
- HOST =
'https://backup.foundation'- VERSION =
"0.2.1"
Class Attribute Summary collapse
-
.app_key ⇒ Object
readonly
Returns the value of attribute app_key.
-
.databases ⇒ Object
readonly
Returns the value of attribute databases.
-
.encryption_key ⇒ Object
readonly
Returns the value of attribute encryption_key.
Class Method Summary collapse
Class Attribute Details
.app_key ⇒ Object (readonly)
Returns the value of attribute app_key.
12 13 14 |
# File 'lib/backup_foundation.rb', line 12 def app_key @app_key end |
.databases ⇒ Object (readonly)
Returns the value of attribute databases.
12 13 14 |
# File 'lib/backup_foundation.rb', line 12 def databases @databases end |
.encryption_key ⇒ Object (readonly)
Returns the value of attribute encryption_key.
12 13 14 |
# File 'lib/backup_foundation.rb', line 12 def encryption_key @encryption_key end |
Class Method Details
.backup_db ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/backup_foundation.rb', line 24 def backup_db DB::DATABASES.each do |key, val| if val.respond_to?(:exist?) && val.exist?(Rails.env.to_s) @databases.push({ type: key }.merge(val.get_config(Rails.env.to_s))) end end end |
.encrypt(key) ⇒ Object
20 21 22 |
# File 'lib/backup_foundation.rb', line 20 def encrypt(key) @encryption_key = key end |
.store_app(app_key, &block) ⇒ Object
14 15 16 17 18 |
# File 'lib/backup_foundation.rb', line 14 def store_app(app_key, &block) @app_key = app_key @databases = [] instance_eval &block end |