Sha256: 1af1907e7741573fc4baec47fa261ca8fb1c21159826b4b45c615a4897e269e1
Contents?: true
Size: 583 Bytes
Versions: 20
Compression:
Stored size: 583 Bytes
Contents
require 'fog/aws' require 'fog/local' if ENV['FOG_LOCAL'] module Shipitron class FetchBucket include Metaractor required :name 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 private def name context.name end end end
Version data entries
20 entries across 20 versions & 1 rubygems