Sha256: 0c610fbff6b33d264fdc5bddfbcd1519fbb514e4fd8b4db14dabb6a06ab3310d

Contents?: true

Size: 898 Bytes

Versions: 4

Compression:

Stored size: 898 Bytes

Contents

require 'ceedling/constants'


class ProjectConfigManager

  attr_reader   :options_files, :release_config_changed, :test_config_changed
  attr_accessor :config_hash

  constructor :cacheinator, :yaml_wrapper


  def setup
    @options_files = []
    @release_config_changed = false
    @test_config_changed    = false
  end


  def merge_options(config_hash, option_filepath)
    @options_files << File.basename( option_filepath )
    config_hash.deep_merge!( @yaml_wrapper.load( option_filepath ) )
  end 
  

  
  def process_release_config_change
    # has project configuration changed since last release build
    @release_config_changed = @cacheinator.diff_cached_release_config?( @config_hash )
  end


  def process_test_config_change
    # has project configuration changed since last test build
    @test_config_changed = @cacheinator.diff_cached_test_config?( @config_hash )
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ceedling-0.28.3 lib/ceedling/project_config_manager.rb
ceedling-0.28.2 lib/ceedling/project_config_manager.rb
ceedling-0.28.1 lib/ceedling/project_config_manager.rb
ceedling-0.27.0 lib/ceedling/project_config_manager.rb