Class: Backup::Storage::Dropbox
- Defined in:
- lib/backup/storage/dropbox.rb
Instance Attribute Summary collapse
-
#access_type ⇒ Object
Dropbox Access Type Valid values are: :app_folder (default) :dropbox (full access).
-
#api_key ⇒ Object
Dropbox API credentials.
-
#api_secret ⇒ Object
Dropbox API credentials.
-
#path ⇒ Object
Path to where the backups will be stored.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(model, storage_id = nil, &block) ⇒ Dropbox
constructor
Creates a new instance of the storage object.
-
#timeout=(value) ⇒ Object
Deprecated as of v3.0.21 - for move to official ‘dropbox-sdk’ gem (v1.1).
Methods inherited from Base
Methods included from Configuration::Helpers
#clear_defaults!, #load_defaults!
Constructor Details
#initialize(model, storage_id = nil, &block) ⇒ Dropbox
Creates a new instance of the storage object
36 37 38 39 40 41 42 43 |
# File 'lib/backup/storage/dropbox.rb', line 36 def initialize(model, storage_id = nil, &block) super(model, storage_id) @path ||= 'backups' @access_type ||= :app_folder instance_eval(&block) if block_given? end |
Instance Attribute Details
#access_type ⇒ Object
Dropbox Access Type Valid values are:
:app_folder (default)
:dropbox (full access)
20 21 22 |
# File 'lib/backup/storage/dropbox.rb', line 20 def access_type @access_type end |
#api_key ⇒ Object
Dropbox API credentials
13 14 15 |
# File 'lib/backup/storage/dropbox.rb', line 13 def api_key @api_key end |
#api_secret ⇒ Object
Dropbox API credentials
13 14 15 |
# File 'lib/backup/storage/dropbox.rb', line 13 def api_secret @api_secret end |
#path ⇒ Object
Path to where the backups will be stored
24 25 26 |
# File 'lib/backup/storage/dropbox.rb', line 24 def path @path end |
Instance Method Details
#timeout=(value) ⇒ Object
Deprecated as of v3.0.21 - for move to official ‘dropbox-sdk’ gem (v1.1)
27 28 29 30 31 32 |
# File 'lib/backup/storage/dropbox.rb', line 27 def timeout=(value) if value Logger.warn "[DEPRECATED] Backup::Storage::Dropbox.timeout=\n" + " is deprecated and will be removed at some point." end end |