Sha256: ad712c6083952136b1febb4a95170abed7b18fab669c0e09c837bf78f5e63c91

Contents?: true

Size: 1.35 KB

Versions: 21

Compression:

Stored size: 1.35 KB

Contents

class Cacheinator

  constructor :cacheinator_helper, :file_path_utils, :file_wrapper, :yaml_wrapper
  
  def cache_test_config(hash)
    @yaml_wrapper.dump( @file_path_utils.form_test_build_cache_path( INPUT_CONFIGURATION_CACHE_FILE), hash )
  end

  def cache_release_config(hash)
    @yaml_wrapper.dump( @file_path_utils.form_release_build_cache_path( INPUT_CONFIGURATION_CACHE_FILE ), hash )
  end

  
  def diff_cached_test_file( filepath )
    cached_filepath = @file_path_utils.form_test_build_cache_path( filepath )
  
    if (@file_wrapper.exist?( cached_filepath ) and (!@file_wrapper.compare( filepath, cached_filepath )))
      @file_wrapper.cp(filepath, cached_filepath, {:preserve => false})
      return filepath
    elsif (!@file_wrapper.exist?( cached_filepath ))
      @file_wrapper.cp(filepath, cached_filepath, {:preserve => false}) 
      return filepath
    end

    return cached_filepath
  end

  
  def diff_cached_test_config?(hash)
    cached_filepath = @file_path_utils.form_test_build_cache_path(INPUT_CONFIGURATION_CACHE_FILE)
    
    return @cacheinator_helper.diff_cached_config?( cached_filepath, hash )
  end

  def diff_cached_release_config?(hash)
    cached_filepath = @file_path_utils.form_release_build_cache_path(INPUT_CONFIGURATION_CACHE_FILE)
    
    return @cacheinator_helper.diff_cached_config?( cached_filepath, hash )
  end
  
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
ceedling-0.28.3 lib/ceedling/cacheinator.rb
ceedling-0.28.2 lib/ceedling/cacheinator.rb
ceedling-0.28.1 lib/ceedling/cacheinator.rb
ceedling-0.27.0 lib/ceedling/cacheinator.rb
ceedling-0.25.0 lib/ceedling/cacheinator.rb
ceedling-0.24.0 lib/ceedling/cacheinator.rb
ceedling-0.22.0 lib/ceedling/cacheinator.rb
ceedling-0.21.0 lib/ceedling/cacheinator.rb
ceedling-0.20.3 lib/ceedling/cacheinator.rb
ceedling-0.20.2 lib/ceedling/cacheinator.rb
ceedling-0.19.0 lib/ceedling/cacheinator.rb
ceedling-0.18.0 lib/ceedling/cacheinator.rb
ceedling-0.17.0 lib/ceedling/cacheinator.rb
ceedling-0.16.0 lib/ceedling/cacheinator.rb
ceedling-0.15.6 lib/ceedling/cacheinator.rb
ceedling-0.15.5 lib/ceedling/cacheinator.rb
ceedling-0.15.4 lib/ceedling/cacheinator.rb
ceedling-0.15.3 lib/ceedling/cacheinator.rb
ceedling-0.15.2 lib/ceedling/cacheinator.rb
ceedling-0.15.1 lib/ceedling/cacheinator.rb