Class: Configuration
- Inherits:
-
Object
- Object
- Configuration
- Defined in:
- lib/configuration.rb
Instance Attribute Summary collapse
-
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
-
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
-
#backup_folder ⇒ Object
Returns the value of attribute backup_folder.
-
#bucket ⇒ Object
Returns the value of attribute bucket.
-
#file_suffix ⇒ Object
Returns the value of attribute file_suffix.
-
#hooks ⇒ Object
Returns the value of attribute hooks.
-
#region ⇒ Object
Returns the value of attribute region.
-
#remote_path ⇒ Object
Returns the value of attribute remote_path.
-
#repository ⇒ Object
Returns the value of attribute repository.
Instance Method Summary collapse
-
#initialize(aws_access_key_id: '', aws_secret_access_key: '', backup_folder: 'db/backups', bucket: '', file_suffix: '', region: '', remote_path: '_backups/database/', repository: 'file system') ⇒ Configuration
constructor
A new instance of Configuration.
- #s3? ⇒ Boolean
Constructor Details
#initialize(aws_access_key_id: '', aws_secret_access_key: '', backup_folder: 'db/backups', bucket: '', file_suffix: '', region: '', remote_path: '_backups/database/', repository: 'file system') ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/configuration.rb', line 15 def initialize( aws_access_key_id: '', aws_secret_access_key: '', backup_folder: 'db/backups', bucket: '', file_suffix: '', region: '', remote_path: '_backups/database/', repository: 'file system' ) @aws_access_key_id = aws_access_key_id @aws_secret_access_key = aws_secret_access_key @backup_folder = backup_folder @bucket = bucket @file_suffix = file_suffix @region = region @remote_path = remote_path @repository = repository end |
Instance Attribute Details
#aws_access_key_id ⇒ Object
Returns the value of attribute aws_access_key_id.
4 5 6 |
# File 'lib/configuration.rb', line 4 def aws_access_key_id @aws_access_key_id end |
#aws_secret_access_key ⇒ Object
Returns the value of attribute aws_secret_access_key.
4 5 6 |
# File 'lib/configuration.rb', line 4 def aws_secret_access_key @aws_secret_access_key end |
#backup_folder ⇒ Object
Returns the value of attribute backup_folder.
4 5 6 |
# File 'lib/configuration.rb', line 4 def backup_folder @backup_folder end |
#bucket ⇒ Object
Returns the value of attribute bucket.
4 5 6 |
# File 'lib/configuration.rb', line 4 def bucket @bucket end |
#file_suffix ⇒ Object
Returns the value of attribute file_suffix.
4 5 6 |
# File 'lib/configuration.rb', line 4 def file_suffix @file_suffix end |
#hooks ⇒ Object
Returns the value of attribute hooks.
13 14 15 |
# File 'lib/configuration.rb', line 13 def hooks @hooks end |
#region ⇒ Object
Returns the value of attribute region.
4 5 6 |
# File 'lib/configuration.rb', line 4 def region @region end |
#remote_path ⇒ Object
Returns the value of attribute remote_path.
4 5 6 |
# File 'lib/configuration.rb', line 4 def remote_path @remote_path end |
#repository ⇒ Object
Returns the value of attribute repository.
4 5 6 |
# File 'lib/configuration.rb', line 4 def repository @repository end |
Instance Method Details
#s3? ⇒ Boolean
39 40 41 |
# File 'lib/configuration.rb', line 39 def s3? repository.downcase == 's3' end |