Sha256: d7284bde04d455ad1bba12ece80db62c8dbd822c1aafe2a5974e996f6d147e4d
Contents?: true
Size: 1.07 KB
Versions: 3
Compression:
Stored size: 1.07 KB
Contents
class CacheinatorHelper constructor :file_wrapper, :yaml_wrapper def diff_cached_config?(cached_filepath, hash) return false if ( not @file_wrapper.exist?(cached_filepath) ) return true if (@yaml_wrapper.load(cached_filepath) != hash) return false end def diff_cached_defines?(cached_filepath, files) changed_defines = false current_defines = COLLECTION_DEFINES_TEST_AND_VENDOR.reject(&:empty?) current_dependencies = Hash[files.collect { |source| [source, current_defines.dup] }] if not @file_wrapper.exist?(cached_filepath) @yaml_wrapper.dump(cached_filepath, current_dependencies) return changed_defines end dependencies = @yaml_wrapper.load(cached_filepath) common_dependencies = current_dependencies.select { |file, defines| dependencies.has_key?(file) } if dependencies.values_at(*common_dependencies.keys) != common_dependencies.values changed_defines = true end dependencies.merge!(current_dependencies) @yaml_wrapper.dump(cached_filepath, dependencies) return changed_defines end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ceedling-0.31.1 | lib/ceedling/cacheinator_helper.rb |
ceedling-0.31.0 | lib/ceedling/cacheinator_helper.rb |
ceedling-0.30.0 | lib/ceedling/cacheinator_helper.rb |