Class: S3Website::DiffHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/s3_website/diff_helper.rb

Class Method Summary collapse

Class Method Details

.resolve_files_to_upload(s3_bucket, site_dir) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/s3_website/diff_helper.rb', line 3

def self.resolve_files_to_upload(s3_bucket, site_dir)
  s3_data_source = Filey::DataSources::AwsSdkS3.new(s3_bucket)
  fs_data_source = Filey::DataSources::FileSystem.new(site_dir)
  changed_local_files =
    Filey::Comparison.list_changed(fs_data_source, s3_data_source)
  new_local_files =
    Filey::Comparison.list_missing(fs_data_source, s3_data_source)
  [ normalise(changed_local_files), normalise(new_local_files) ]
end