lib/openstudio/analysis/translator/workflow.rb in openstudio-analysis-1.0.0.rc9 vs lib/openstudio/analysis/translator/workflow.rb in openstudio-analysis-1.0.0.rc10

- old
+ new

@@ -1,9 +1,8 @@ module OpenStudio module Analysis module Translator - class Workflow attr_reader :osa_filename attr_reader :root_path attr_reader :analysis attr_reader :osa @@ -22,11 +21,11 @@ # try to read the osa json file if File.exist?(@osa_filename) @osa = ::JSON.parse(File.read(@osa_filename), symbolize_names: true)[:analysis] else - fail "File #{@osa_filename} does not exist" + raise "File #{@osa_filename} does not exist" end # Initialize some other instance variables @osw_version = '0.0.1' @options = options @@ -66,14 +65,14 @@ osd = nil if File.exist?(osd_filename) # warn('data_point selector in ods will be changed to datapoint in version 1.0') # NL this isn't true anymore. osd = ::JSON.parse(File.read(osd_filename), symbolize_names: true)[:data_point] else - fail "File #{osd_filename} does not exist" + raise "File #{osd_filename} does not exist" end # Parse the osd hash based off of the osa hash. First check that the analysis id matches - fail "File #{osd_filename} does not reference #{@osa_id}." unless @osa_id == osd[:analysis_id] + raise "File #{osd_filename} does not reference #{@osa_id}." unless @osa_id == osd[:analysis_id] # @todo (rhorsey) Fix the spec so this line can be uncommented osw_steps_instance = @steps osw_steps_instance.each_with_index do |step, i| next unless @osa[:problem][:workflow][i][:variables] @osa[:problem][:workflow][i][:variables].each do |var|