Class/Module Index [+]

Quicksearch

Rudy::CLI::AWS::S3::Buckets

Public Instance Methods

buckets() click to toggle source
# File lib/rudy/cli/aws/s3/buckets.rb, line 9
def buckets
  raise "No bucket name supplied" if !@argv.name && @option.list
  s3 = Rudy::AWS::S3.new(@@global.accesskey, @@global.secretkey, @@global.region)
  unless @option.list
    (s3.list_buckets || []).each do |b|
      puts b.name
    end
  else
    puts "All objects in #{@argv.name}:"
    (s3.list_bucket_objects(@argv.name) || []).each do |o|
      puts o
    end
  end
end
create_buckets() click to toggle source
# File lib/rudy/cli/aws/s3/buckets.rb, line 28
def create_buckets
  s3 = Rudy::AWS::S3.new(@@global.accesskey, @@global.secretkey, @@global.region)
  s3.create_bucket(@argv.name, @option.location)
  buckets
end
create_buckets_valid?() click to toggle source
# File lib/rudy/cli/aws/s3/buckets.rb, line 24
def create_buckets_valid?
  raise "No bucket name supplied" unless @argv.name
  true
end
destroy_buckets() click to toggle source
# File lib/rudy/cli/aws/s3/buckets.rb, line 38
def destroy_buckets
  execute_check(:medium)
  s3 = Rudy::AWS::S3.new(@@global.accesskey, @@global.secretkey, @@global.region)
  s3.destroy_bucket(@argv.name)
  buckets
end
destroy_buckets_valid?() click to toggle source
# File lib/rudy/cli/aws/s3/buckets.rb, line 34
def destroy_buckets_valid?
  raise "No bucket name supplied" unless @argv.name
  true
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.