Class: OpsAsk::Main

Inherits:
Thor
  • Object
show all
Defined in:
lib/opsask/main.rb

Instance Method Summary collapse

Instance Method Details

#artObject



11
12
13
14
15
16
17
18
# File 'lib/opsask/main.rb', line 11

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

#serverObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/opsask/main.rb', line 28

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

#versionObject



21
22
23
# File 'lib/opsask/main.rb', line 21

def version
  puts OpsAsk::VERSION
end