lib/cli/server_task.rb in factor-0.1.07 vs lib/cli/server_task.rb in factor-0.1.09

- old
+ new

@@ -6,10 +6,11 @@ class ServerTask < Command desc "start", "start the server" method_option :tags, :alias=>"-t", :type=>:hash, :desc=>"Optional tags to identify from workflow" method_option :channels, :type=>:array, :desc=>"Optional channel ruby file list for development" method_option :verbose, :type=>:boolean, :desc=>"Display everything" + method_option :key, :type=>:string, :desc=>"File reference containing the symmetric key for encryption" def start engine = Factor::Runtime::Engine.new(get_config[:email],get_config[:token]) options.tags.each {|tag,value| engine.tag(tag,value)} if options.tags? @@ -38,10 +39,14 @@ say " #{message}" if options.verbose? end say "loading workflows complete" if options.verbose? say "loading credentials from server" if options.verbose? - engine = @client.load_credentials(engine) do |message| + securet=nil + if options[:key] + secret=File.read(options[:key]) + end + engine = @client.load_credentials(engine,secret) do |message| say " #{message}" if options.verbose? end say "loading credentials complete" if options.verbose? say "starting the server...", :green \ No newline at end of file