Method: Commiter::CommiterCli.start_cli

Defined in:
lib/commiter.rb

.start_cliObject



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/commiter.rb', line 54

def self.start_cli
  cliParameters = ARGV
  should_show_debug_messages = false
  puts "########################### - Commiter Cli Starter -#################################"
  puts "Welcome To Commiter Version : #{Commiter::VERSION}"
  puts "This CLI Will Change Your Git Settings Commit Messages"
  puts "#####################################################################################"
  puts ""

  # Find Debug Option
  cliParameters.each do |item|
    if item == "-d"
      should_show_debug_messages = true
    end
  end

  if should_show_debug_messages
    puts "Commiter Arguments Validation Started ... With Input : #{cliParameters}"
  end

  # Start Validate CLI Params
  cliParameters.each do |item|
    self.validate_command_args(item, should_show_debug_messages)
  end

  puts ""
  # Start Generate If -g Found
  cliParameters.each do |item|
    if item == "-g"
      if should_show_debug_messages
        puts "Command [-g] Found Will Start The Generator ..."
      end
      CommiterGenerator::CommiterCliGenerator::start
    end
  end

end