Class: Lexicon::Common::Remote::PackageUploader
- Inherits:
-
RemoteBase
- Object
- RemoteBase
- Lexicon::Common::Remote::PackageUploader
- Includes:
- Mixin::LoggerAware
- Defined in:
- lib/lexicon/common/remote/package_uploader.rb
Instance Attribute Summary
Attributes included from Mixin::LoggerAware
Instance Method Summary collapse
Methods included from Mixin::LoggerAware
Methods inherited from RemoteBase
Constructor Details
This class inherits a constructor from Lexicon::Common::Remote::RemoteBase
Instance Method Details
#upload(package) ⇒ Corindon::Result::Result
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/lexicon/common/remote/package_uploader.rb', line 13 def upload(package) rescue_failure do bucket_name = package.version.to_s if s3.bucket_exist?(bucket_name) Failure(StandardError.new("The server already has a folder named #{bucket_name}")) else upload_package(package, bucket_name) end end end |