Sha256: 678c283800900ad646d22ec12ea0ee504bc72c39efef50b06a5e5d4dd5c2371d

Contents?: true

Size: 1.39 KB

Versions: 26

Compression:

Stored size: 1.39 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

26 entries across 26 versions & 1 rubygems

Version Path
ceedling-0.13.0 lib/cacheinator.rb
ceedling-0.13.0.rc1 lib/cacheinator.rb
ceedling-0.12.2 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.12.1 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.12.0 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.11.2 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.11.1 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.11.0 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.10.0 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.9.4 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.9.2 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.9.0 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.0.18 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.0.17 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.0.16 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.0.15 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.0.14 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.0.13 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.0.12 new_project_template/vendor/ceedling/lib/cacheinator.rb
ceedling-0.0.8 new_project_template/vendor/ceedling/lib/cacheinator.rb