Sha256: 93ea2197eb7aaeea1c7fd2bc7c5ff407e93623121eea2b87d7841249b86e92bb
Contents?: true
Size: 1.51 KB
Versions: 10
Compression:
Stored size: 1.51 KB
Contents
require 'thor' require 'sinatra/base' require_relative 'app' require_relative 'metadata' module OpsAsk class Main < Thor desc 'art', 'Show the application art' def art max_line_len = OpsAsk::ART.lines.sort_by { |l| l.length }.last.length description = "OpsAsk #{OpsAsk::VERSION} / #{OpsAsk::SUMMARY} / #{OpsAsk::AUTHOR} (#{OpsAsk::EMAIL})" puts puts OpsAsk::ART puts description.center(max_line_len) puts end desc 'version', 'Show the application version' def version puts OpsAsk::VERSION end desc 'server', 'Start application web server' option :port, default: 3000, aliases: :p option :config, default: nil, aliases: :c def server config = { ops_group: 'change-network-operations', agile_board: '169', # Operations assignee: 'denimcores', jira_user: nil, jira_pass: nil, jira_url: 'http://jira.bluejeansnet.com', queue_size: 10, cutoff_hour: 18, # 6pm project_key: 'INF', project_name: 'Infrastructure', issue_type: 'Task', version: 'Un-targeted', jira_private_key: 'opsask.pem', jira_consumer_key: 'opsask-test', app_version: OpsAsk::VERSION, require_label: nil } if options[:config] config.merge! JSON::parse(File.read(options[:config]), symbolize_names: true) end App.run! port: options[:port], config: config, \ environment: 'production', raise_errors: true end end end
Version data entries
10 entries across 10 versions & 1 rubygems