Class: Pronto::Runners
- Inherits:
-
Object
- Object
- Pronto::Runners
- Defined in:
- lib/pronto/runners.rb
Instance Method Summary collapse
-
#initialize(runners = Runner.runners, config = Config.new) ⇒ Runners
constructor
A new instance of Runners.
- #run(patches) ⇒ Object
Constructor Details
Instance Method Details
#run(patches) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/pronto/runners.rb', line 8 def run(patches) patches = reject_excluded(@config.excluded_files('all'), patches) return [] if patches.none? result = [] @runners.each do |runner| next if exceeds_max?(result) @config.logger.log("Running #{runner}") runner_patches = reject_excluded( @config.excluded_files(runner.title), patches ) next if runner_patches.none? result += runner.new(runner_patches, patches.commit).run.flatten.compact end result = result.take(@config.max_warnings) if @config.max_warnings result end |