Class: Shipitron::FetchBucket
- Inherits:
-
Object
- Object
- Shipitron::FetchBucket
- Includes:
- Metaractor
- Defined in:
- lib/shipitron/fetch_bucket.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/shipitron/fetch_bucket.rb', line 10 def call if ENV['FOG_LOCAL'] Logger.debug 'Using fog local storage' storage = Fog::Storage.new provider: 'Local', local_root: '/fog' context.bucket = storage.directories.create(key: name) else storage = Fog::Storage.new provider: 'AWS', use_iam_profile: true context.bucket = storage.directories.get(name) end end |