44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/pronto/cli.rb', line 44
def run(path = nil)
gem_names = options[:runner].any? ? options[:runner] : ::Pronto.gem_names
gem_names.each do |gem_name|
require "pronto/#{gem_name}"
end
formatter = ::Pronto::Formatter.get(options[:formatter])
commit = options[:index] ? :index : options[:commit]
messages = ::Pronto.run(commit, '.', formatter, path)
exit(messages.count) if options[:'exit-code']
rescue Rugged::RepositoryError
puts '"pronto" should be run from a git repository'
end
|