Sha256: 101c4719f5b81ec20d38f4c4023e7f4ce86c5b13d4c38befe8ffcbafef0b450f

Contents?: true

Size: 489 Bytes

Versions: 8

Compression:

Stored size: 489 Bytes

Contents

module S3Secure
  class Batch
    extend Memoist

    def initialize(*params)
      @params = params
      @command, @subcommand, @file = params
    end

    def run
      buckets.each do |bucket|
        args = @params
        args.pop
        args << bucket
        puts "Running: s3-secure #{args.join(' ')}".color(:green)
        S3Secure::CLI.start(args)
      end
    end

    def buckets
      IO.readlines(@file).map(&:strip).reject(&:empty?)
    end
    memoize :buckets
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
s3-secure-0.5.1 lib/s3_secure/batch.rb
s3-secure-0.5.0 lib/s3_secure/batch.rb
s3-secure-0.4.2 lib/s3_secure/batch.rb
s3-secure-0.4.1 lib/s3_secure/batch.rb
s3-secure-0.4.0 lib/s3_secure/batch.rb
s3-secure-0.3.0 lib/s3_secure/batch.rb
s3-secure-0.2.0 lib/s3_secure/batch.rb
s3-secure-0.1.0 lib/s3_secure/batch.rb