Class: Pronto::CLI
- Inherits:
-
Thor
- Object
- Thor
- Pronto::CLI
- Defined in:
- lib/pronto/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.is_thor_reserved_word?(word, type) ⇒ Boolean
9 10 11 12 |
# File 'lib/pronto/cli.rb', line 9 def is_thor_reserved_word?(word, type) return false if word == 'run' super end |
Instance Method Details
#run ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/pronto/cli.rb', line 35 def run gem_names = [:runner].any? ? [:runner] : ::Pronto.gem_names gem_names.each do |gem_name| require "pronto/#{gem_name}" end formatter = ::Pronto::Formatter.get([:formatter]) puts ::Pronto.run([:commit], '.', formatter) rescue Rugged::RepositoryError puts '"pronto" should be run from a git repository' end |