class Flubber::AwsFolderUpload
Constants
- IGNORED_FILES
Attributes
aws_destination[R]
folder_name[R]
Public Class Methods
new(folder_name, aws_destination)
click to toggle source
# File lib/aws_folder_upload.rb, line 11 def initialize(folder_name, aws_destination) @folder_name = folder_name @aws_destination = aws_destination end
upload(folder_name:, aws_destination:)
click to toggle source
# File lib/aws_folder_upload.rb, line 7 def self.upload(folder_name:, aws_destination:) new(folder_name, aws_destination).upload end
Public Instance Methods
upload()
click to toggle source
# File lib/aws_folder_upload.rb, line 16 def upload file_paths.each do |file_path| AwsFileUpload.upload( file_path: file_path, aws_destination: aws_destination, ) end end
Private Instance Methods
file_paths()
click to toggle source
# File lib/aws_folder_upload.rb, line 29 def file_paths @file_paths ||= Dir .children("./#{folder_name}") .filter { |file| !IGNORED_FILES.include?(file) } .map { |file| File.expand_path("#{folder_name}/#{file}") } .filter { |file| !File.directory?(file) } end