lib/omnibus/fetchers/path_fetcher.rb in omnibus-4.0.0 vs lib/omnibus/fetchers/path_fetcher.rb in omnibus-4.1.0

- old
+ new

@@ -62,11 +62,14 @@ # def fetch log.info(log_key) { "Copying from `#{source_path}'" } create_required_directories - FileSyncer.sync(source_path, project_dir) + FileSyncer.sync(source_path, project_dir, source_options) + # Reset target shasum on every fetch + @target_shasum = nil + target_shasum end # # The version for this item in the cache. The is the shasum of the directory # on disk. @@ -75,18 +78,38 @@ # def version_for_cache "path:#{source_path}|shasum:#{target_shasum}" end + # + # @return [String, nil] + # + def self.resolve_version(version, source) + version + end + private # # The path on disk to pull the files from. # # @return [String] # def source_path source[:path] + end + + # + # Options to pass to the underlying FileSyncer + # + # @return [Hash] + # + def source_options + if source[:options] && source[:options].is_a?(Hash) + source[:options] + else + {} + end end # # The shasum of the directory **inside** the project. #