Un bork mini s3 putter

This commit is contained in:
Dan Buch 2016-08-31 12:01:52 -04:00
parent b124560fd6
commit 9889d8710b
No known key found for this signature in database
GPG Key ID: FAEF12936DD3E3EC

View File

@ -11,6 +11,7 @@ class MiniS3put
Aws::S3::Resource.new.bucket(bucket).object(key).put( Aws::S3::Resource.new.bucket(bucket).object(key).put(
body: instream.read body: instream.read
).on_success(&method(:on_put_success)) ).on_success(&method(:on_put_success))
0
end end
def on_put_success(response) def on_put_success(response)
@ -21,8 +22,6 @@ class MiniS3put
).on_success do |acl_response| ).on_success do |acl_response|
puts acl_response.data puts acl_response.data
end end
0
end end
private private
@ -30,4 +29,4 @@ class MiniS3put
attr_reader :bucket, :key, :instream attr_reader :bucket, :key, :instream
end end
exit(MiniS3put.new(ARGV.first).put) if $PROGRAM_NAME == __FILE__ exit(MiniS3put.new(key: ARGV.first).put) if $PROGRAM_NAME == __FILE__