bin/run_workflow.rb in rbbt-util-4.4.0 vs bin/run_workflow.rb in rbbt-util-5.0.0

- old
+ new

@@ -83,10 +83,11 @@ options = SOPT.get "-t--task*:-l--log*:-h--help:-n--name*:-cl--clean:-rcl-recursive_clean:-pn--printname:-srv--server:-p--port*" workflow = ARGV.first if options[:server] + require 'rbbt/util/log' require 'rbbt/workflow' require 'rbbt/workflow/rest' require 'sinatra' require 'compass' @@ -96,14 +97,20 @@ WorkflowREST.setup Sinatra::Application.port = options[:port] || 4567 Sinatra::Application.run = true + if File.exists? workflow Sinatra::Application.views = File.join(File.dirname(workflow), 'www/views') end + sinatra_file = './lib/sinatra.rb' + if File.exists? sinatra_file + require sinatra_file + end + else # Set log, fork, clean, recursive_clean and help Log.severity = options[:log].to_i if options.include? :log help = !!options.delete(:help) @@ -180,12 +187,9 @@ exit else Log.low "Job name: #{job.name}" end - #- error - - #print case when Array === res puts res * "\n" when TSV === res puts res