class AwsTestDump::S3Restore
Public Class Methods
new()
click to toggle source
# File lib/aws_test_dump.rb, line 139 def initialize @s3_files = nil @s3_restore_processors = Array.new end
Public Instance Methods
run()
click to toggle source
# File lib/aws_test_dump.rb, line 144 def run s3_restore_processors.each { |x| x.run } end
s3_files()
click to toggle source
# File lib/aws_test_dump.rb, line 148 def s3_files if @s3_files.nil? @s3_files = Dir[ File.join(DEFAULT_S3_DUMP_DIR, '**', '*') ].reject { |p| File.directory? p } end @s3_files end
s3_restore_processors()
click to toggle source
# File lib/aws_test_dump.rb, line 155 def s3_restore_processors if @s3_restore_processors.empty? s3_files.each do |s3_file| relative_path = s3_file.split(DEFAULT_S3_DUMP_DIR)[1][1..-1] bucket = relative_path.split('/')[0] key = relative_path.gsub(bucket, '')[1..-1] @s3_restore_processors << S3FileRestore.new(bucket, key) end end @s3_restore_processors end