Class: Backup::Connection::Everbox
- Inherits:
-
Object
- Object
- Backup::Connection::Everbox
- Defined in:
- lib/backup/connection/everbox.rb
Defined Under Namespace
Classes: Session
Instance Attribute Summary (collapse)
-
- (Object) secret
Returns the value of attribute secret.
-
- (Object) token
Returns the value of attribute token.
Instance Method Summary (collapse)
- - (Object) connect
-
- (Everbox) initialize(token, secret)
constructor
A new instance of Everbox.
- - (Object) path
- - (Object) session
- - (Object) static_initialize(procedure)
- - (Object) store
Constructor Details
- (Everbox) initialize(token, secret)
A new instance of Everbox
196 197 198 199 |
# File 'lib/backup/connection/everbox.rb', line 196 def initialize(token, secret) @token = token @secret = secret end |
Instance Attribute Details
- (Object) secret
Returns the value of attribute secret
194 195 196 |
# File 'lib/backup/connection/everbox.rb', line 194 def secret @secret end |
- (Object) token
Returns the value of attribute token
194 195 196 |
# File 'lib/backup/connection/everbox.rb', line 194 def token @token end |
Instance Method Details
- (Object) connect
220 221 222 |
# File 'lib/backup/connection/everbox.rb', line 220 def connect session end |
- (Object) path
224 225 226 |
# File 'lib/backup/connection/everbox.rb', line 224 def path @path || "backups" end |
- (Object) session
206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/backup/connection/everbox.rb', line 206 def session opts = {} opts[:api_key] = token unless token.nil? opts[:secret_access_key] = secret unless secret.nil? @session ||= Session.new(opts) unless @session. @session. = token @session. = secret @session. end @session end |
- (Object) static_initialize(procedure)
201 202 203 204 |
# File 'lib/backup/connection/everbox.rb', line 201 def static_initialize(procedure) self.procedure = procedure load_storage_configuration_attributes(true) end |
- (Object) store
228 229 230 231 |
# File 'lib/backup/connection/everbox.rb', line 228 def store path_to_file = File.join(tmp_path, final_file) session.upload(path_to_file, path, :mode => :dropbox) end |