Class: S3Website::DiffHelper
- Inherits:
-
Object
- Object
- S3Website::DiffHelper
- Defined in:
- lib/s3_website/diff_helper.rb
Defined Under Namespace
Classes: DiffProgressIndicator
Class Method Summary collapse
Class Method Details
.resolve_files_to_upload(s3_bucket, site_dir, config) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/s3_website/diff_helper.rb', line 3 def self.resolve_files_to_upload(s3_bucket, site_dir, config) with_progress_indicator('Calculating diff') { |progress_indicator| s3_data_source = Filey::DataSources::AwsSdkS3.new(s3_bucket, config) { |filey| progress_indicator.render_next_step } fs_data_source = Filey::DataSources::FileSystem.new(site_dir) { |filey| progress_indicator.render_next_step } 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 ) [ reject_blacklisted(normalise changed_local_files), reject_blacklisted(normalise new_local_files) ] } end |