Sha256: 1a89a2f66db0a2435820480f2fd98a38a20ebf8c67ab6abd3320d49ca779b315

Contents?: true

Size: 460 Bytes

Versions: 13

Compression:

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

13 entries across 13 versions & 1 rubygems

Version Path
albacore-1.0.0 lib/albacore/support/yamlconfig.rb
albacore-1.0.0.rc.3 lib/albacore/support/yamlconfig.rb
albacore-0.3.6 lib/albacore/support/yamlconfig.rb
albacore-1.0.0.rc.2 lib/albacore/support/yamlconfig.rb
albacore-1.0.0.rc.1 lib/albacore/support/yamlconfig.rb
albacore-0.3.5 lib/albacore/support/yamlconfig.rb
albacore-0.3.4 lib/albacore/support/yamlconfig.rb
albacore-0.3.3 lib/albacore/support/yamlconfig.rb
albacore-0.3.2 lib/albacore/support/yamlconfig.rb
albacore-0.3.1 lib/albacore/support/yamlconfig.rb
albacore-0.3.0 lib/albacore/support/yamlconfig.rb
albacore-0.2.7 lib/albacore/support/yamlconfig.rb
albacore-0.2.6 lib/albacore/support/yamlconfig.rb