lib/imw/packagers/s3_mover.rb in imw-0.1.0 vs lib/imw/packagers/s3_mover.rb in imw-0.1.1

- old
+ new

@@ -17,9 +17,17 @@ def success? last_response && last_response.response.class == Net::HTTPOK end + def upload local_path, remote_path + begin + upload! local_path, remote_path + rescue RuntimeError => e + return e + end + end + def upload! local_path, remote_path @last_response = AWS::S3::S3Object.store(remote_path, open(local_path), bucket_name) end end