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