lib/rundock/runner.rb in rundock-1.0.5 vs lib/rundock/runner.rb in rundock-1.0.6
- old
+ new
@@ -27,16 +27,14 @@
@scenario.run
end
def build(options)
if options[:scenario] || options[:targetgroup]
- raise ScenarioNotFoundError,
- "'#{options[:scenario]}' scenario file is not found." if options[:scenario] &&
- !FileTest.exist?(options[:scenario])
- raise ScenarioNotFoundError,
- "'#{options[:targetgroup]}' targetgroup file is not found." if options[:command] &&
- options[:targetgroup] &&
- !FileTest.exist?(options[:targetgroup])
+ raise ScenarioNotFoundError, "'#{options[:scenario]}' scenario file is not found." if options[:scenario] &&
+ !FileTest.exist?(options[:scenario])
+ raise ScenarioNotFoundError, "'#{options[:targetgroup]}' targetgroup file is not found." if options[:command] &&
+ options[:targetgroup] &&
+ !FileTest.exist?(options[:targetgroup])
options[:scenario] = options[:targetgroup] if options[:command] && options[:targetgroup]
# parse scenario
if options[:scenario] =~ %r{^(http|https)://}