Sha256: 48ef059d457e63e372c926af159522dd3a7caf361b89624f286dfda731626694

Contents?: true

Size: 478 Bytes

Versions: 6

Compression:

Stored size: 478 Bytes

Contents

require 'yaml'

module YAMLConfig  
  def initialize
    super()
  end
  
  def load_config_by_task_name(task_name)
    task_config = "#{task_name}.yml"
    task_config = File.join(Albacore.configure.yaml_config_folder, task_config) unless Albacore.configure.yaml_config_folder.nil?
    configure(task_config) if File.exists?(task_config)
  end
  
  def configure(yml_file)
    config = YAML::load(File.open(yml_file))
    update_attributes config
  end  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
albacore-0.2.5 lib/albacore/support/yamlconfig.rb
albacore-0.2.4 lib/albacore/support/yamlconfig.rb
albacore-0.2.3 lib/albacore/support/yamlconfig.rb
albacore-0.2.2 lib/albacore/support/yamlconfig.rb
albacore-0.2.0.preview2 lib/albacore/support/yamlconfig.rb
albacore-0.2.0.preview1 lib/albacore/support/yamlconfig.rb