Module: Pronto

Defined in:
lib/pronto.rb,
lib/pronto/cli.rb,
lib/pronto/plugin.rb,
lib/pronto/runner.rb,
lib/pronto/message.rb,
lib/pronto/version.rb,
lib/pronto/formatter/formatter.rb,
lib/pronto/formatter/json_formatter.rb,
lib/pronto/formatter/text_formatter.rb,
lib/pronto/formatter/github_formatter.rb,
lib/pronto/rake_task/travis_pull_request.rb

Defined Under Namespace

Modules: Formatter, Plugin, RakeTask Classes: CLI, Message, Runner

Constant Summary collapse

VERSION =
'0.1.2'

Class Method Summary collapse

Class Method Details

.gem_namesObject



28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/pronto.rb', line 28

def self.gem_names
  gems = Gem::Specification.find_all.select do |gem|
    if gem.name =~ /^pronto-/
      true
    elsif gem.name != 'pronto'
      runner_path = File.join(gem.full_gem_path, "lib/pronto/#{gem.name}.rb")
      File.exists?(runner_path)
    end
  end

  gems.map { |gem| gem.name.sub(/^pronto-/, '') }
      .uniq
      .sort
end

.run(commit = 'master', repo_path = '.', formatter = nil) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/pronto.rb', line 20

def self.run(commit = 'master', repo_path = '.', formatter = nil)
  patches = diff(repo_path, commit)
  result = run_all_runners(patches)

  formatter ||= default_formatter
  formatter.format(result)
end