lib/rundock/builder/scenario_builder.rb in rundock-1.2.0 vs lib/rundock/builder/scenario_builder.rb in rundock-1.2.1
- old
+ new
@@ -28,20 +28,21 @@
private
def build_scenario_with_cli
raise CommandArgNotFoundError, %("--command or -c" option is not specified.) unless @options[:command]
+
ope = OperationBuilder.new(@options)
ope.build_cli
end
def build_scenario_with_file
if @scenario_file
type = %i[main target_info tasks hooks]
scenario_data = {}
- YAML.load_documents(@scenario_file).each_with_index do |data, idx|
+ YAML.load_stream(@scenario_file).each_with_index do |data, idx|
if idx == 0
scenario_data[type[idx]] = data
else
scenario_data[type[idx]] = data.deep_symbolize_keys unless data.nil?
end