Method: Transpec::CLI#run

Defined in:
lib/transpec/cli.rb

#run(args) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/transpec/cli.rb', line 28

def run(args)
  begin
    paths = OptionParser.new(config).parse(args)
    validate_project!
  rescue => error
    warn error.message
    return false
  end

  begin
    process(paths)
  rescue DynamicAnalyzer::AnalysisError => error
    warn "\n" + error.message.color(:red)
    return false
  end

  display_summary
  generate_commit_message
  display_final_guide

  true
end