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
#list ⇒ Object
54 55 56 |
# File 'lib/pronto/cli.rb', line 54 def list puts ::Pronto.gem_names end |
#run ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/pronto/cli.rb', line 39 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]) = ::Pronto.run([:commit], '.', formatter) exit(.count) if [:'exit-code'] rescue Rugged::RepositoryError puts '"pronto" should be run from a git repository' end |
#version ⇒ Object
61 62 63 |
# File 'lib/pronto/cli.rb', line 61 def version puts "Pronto version #{::Pronto::VERSION}" end |