Sha256: 29b8c4408af86bb52330cd21ca3ed975fb1f614f836bebc721443df996c1e66a
Contents?: true
Size: 1.26 KB
Versions: 1
Compression:
Stored size: 1.26 KB
Contents
#!/usr/bin/env ruby require 'rbbt/util/simpleopt' require 'rbbt/workflow' require 'zurb-foundation' require 'modular-scale' require 'rbbt/rest/main' require 'rbbt/rest/entity' require 'rbbt/rest/workflow' require 'rbbt/rest/file_server' require 'rbbt/rest/knowledge_base' require 'rbbt/rest/helpers' options = SOPT.get "-e--environment*:-p--port*:-s--server*:-b--bind*:-e--environment*:-R--RServe_session*:--finder" workflow = ARGV.first ENV["RBBT_FINDER"] = "true" if options.include?(:finder) ENV["RServe-session"] = options[:RServe_session] || workflow raise rbbt_usage unless workflow wf = Workflow.require_workflow workflow $title = wf.to_s load Rbbt.etc['app.d/init.rb'].find app = class WorkflowRest < Sinatra::Base; self end app.register Sinatra::RbbtRESTWorkflow app.get '/' do redirect to(File.join('/', wf.to_s)) end app.instance_eval Rbbt.etc['app.d/base.rb'].read app.use Rack::Deflater load Rbbt.etc['app.d/resources.rb'].find app.class_eval do eval Rbbt.etc['app.d/finder.rb'].read end WorkflowRest.add_workflow wf, true WorkflowRest.port = options[:port] || 4567 WorkflowRest.bind = options[:bind] || "0.0.0.0" WorkflowRest.environment = options[:environment] || "development" WorkflowRest.server = options[:server] if options[:server] WorkflowRest.run!
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rbbt-util-5.15.1 | share/rbbt_commands/workflow/server |