lib/s3_patron/cli.rb in s3_patron-0.0.2 vs lib/s3_patron/cli.rb in s3_patron-0.0.2.1
- old
+ new
@@ -26,10 +26,9 @@
puts 'Something went wrong. Please try again.'.red
end
end
desc 'upload BUCKET_NAME FILE REGION(OPTIONAL) PATH_TO_FILE', 'Upload into a bucket'
- method_option :bucket, type: :string, default: false, aliases: '-b', desc: 'Name of the bucket where you want to upload'
def upload(bucket_name, file, region=ENV['AWS_REGION'])
s3 = Aws::S3::Resource.new(region: region)
begin
item = file
bucket = bucket_name