Sha256: 0a43376e3dc8c22c77345ff5e9b29ddaa9956ff1fe9790f7a65c9e5cac173656
Contents?: true
Size: 800 Bytes
Versions: 16
Compression:
Stored size: 800 Bytes
Contents
require 'yaml' module Rundock module Builder class TaskBuilder < Base DEFAULT_TASKS_FILE_PATH = './tasks.yml' def build(scenario_tasks) tasks = {} unless scenario_tasks return scenario_tasks unless @options[:tasks] if FileTest.exist?(@options[:tasks]) tasks.merge!(YAML.load_file(@options[:tasks]).deep_symbolize_keys) Logger.info("merged tasks file #{@options[:tasks]}") elsif FileTest.exist?(DEFAULT_TASKS_FILE_PATH) Logger.warn("tasks file is not found. use #{DEFAULT_TASKS_FILE_PATH}") tasks.merge!(YAML.load_file(DEFAULT_TASKS_FILE_PATH).deep_symbolize_keys) else Logger.warn("Task path is not available. (#{@options[:tasks]})") end tasks end end end end
Version data entries
16 entries across 16 versions & 1 rubygems