Class: Fuel::CLI::Main

Inherits:
Thor
  • Object
show all
Includes:
Util
Defined in:
lib/fuel/cli/main.rb

Instance Method Summary collapse

Instance Method Details

#configObject

Raises:

  • (Thor::Error)


27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/fuel/cli/main.rb', line 27

def config
  raise Thor::Error, set_color("Provide at least one key-value pair!", :red) if options.empty?
  if options.has_key?('gerrit_url')
    Config.set('gerrit', 'url', options['gerrit_url'])
  end
  if options.has_key?('jira_url')
    Config.set('jira', 'url', options['jira_url'])
  end
  if options.has_key?('jenkins_url')
    Config.set('jenkins', :server_url, options['jenkins_url'])
  end
end

#setupObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/fuel/cli/main.rb', line 9

def setup
  say   "############################################\n\n", [:cyan, :bold]
  say flame, [:cyan, :bold]
  say "\n########### Welcome to Fuel-CLI! ###########\n\n", [:cyan, :bold]

  setup_gerrit
  setup_jira
  setup_jenkins

  say "You are good to go!", [:green, :bold]
  say 'You have "fuel", "gerrit", "jira" and "jenkins" executables in your PATH.', :green
  say 'Use the "help" command (e.g. "gerrit help") to get started.', :green
end