Methods
public instance
Public instance methods
buckets
()
[show source]
# File lib/rudy/cli/aws/s3/buckets.rb, line 9 9: def buckets 10: raise "No bucket name supplied" if !@argv.name && @option.list 11: s3 = Rudy::AWS::S3.new(@@global.accesskey, @@global.secretkey, @@global.region) 12: unless @option.list 13: (s3.list_buckets || []).each do |b| 14: puts b.name 15: end 16: else 17: puts "All objects in #{@argv.name}:" 18: (s3.list_bucket_objects(@argv.name) || []).each do |o| 19: puts o 20: end 21: end 22: end
create_buckets
()
[show source]
# File lib/rudy/cli/aws/s3/buckets.rb, line 28 28: def create_buckets 29: s3 = Rudy::AWS::S3.new(@@global.accesskey, @@global.secretkey, @@global.region) 30: s3.create_bucket(@argv.name, @option.location) 31: buckets 32: end
create_buckets_valid?
()
[show source]
# File lib/rudy/cli/aws/s3/buckets.rb, line 24 24: def create_buckets_valid? 25: raise "No bucket name supplied" unless @argv.name 26: true 27: end
destroy_buckets
()
[show source]
# File lib/rudy/cli/aws/s3/buckets.rb, line 38 38: def destroy_buckets 39: execute_check(:medium) 40: s3 = Rudy::AWS::S3.new(@@global.accesskey, @@global.secretkey, @@global.region) 41: s3.destroy_bucket(@argv.name) 42: buckets 43: end
destroy_buckets_valid?
()
[show source]
# File lib/rudy/cli/aws/s3/buckets.rb, line 34 34: def destroy_buckets_valid? 35: raise "No bucket name supplied" unless @argv.name 36: true 37: end