Sha256: 67abd2375568796d26df240d81a4f6b00247e05fe6677d356116e232d6c2d2ae

Contents?: true

Size: 687 Bytes

Versions: 27

Compression:

Stored size: 687 Bytes

Contents

module Jekyll
  module S3
    class DiffHelper
      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

      private

      def self.normalise(fileys)
        fileys.map { |filey|
          filey.full_path.sub(/\.\//, '')
        }
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
jekyll-s3-3.2.0 lib/jekyll-s3/diff_helper.rb
jekyll-s3-3.1.2 lib/jekyll-s3/diff_helper.rb
jekyll-s3-3.1.1 lib/jekyll-s3/diff_helper.rb
jekyll-s3-3.1.0 lib/jekyll-s3/diff_helper.rb
jekyll-s3-3.0.0 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.8.0 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.7.0 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.6.0 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.5.1 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.5.0 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.4.3 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.4.2 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.4.1 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.4.0 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.3.0 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.2.4 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.2.3 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.2.2 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.2.1 lib/jekyll-s3/diff_helper.rb
jekyll-s3-2.2.0 lib/jekyll-s3/diff_helper.rb