Sha256: f9beba75c6ffa6e597b98faf88711a7438dedf07d05435c73c02c46467e56fe6

Contents?: true

Size: 487 Bytes

Versions: 7

Compression:

Stored size: 487 Bytes

Contents

require 'colorize'
require 'English'

module SafePusher
  class ProntoRunner
    def call
      run_pronto
      exit_status = $CHILD_STATUS.exitstatus

      if exit_status != 0
        warn 'Pronto found somme errors... '\
             'Fix them before pushing to master!'.red
      else
        puts 'No errors found by pronto, go for next step!'.green
      end

      exit_status
    end

    private

    def run_pronto
      system('bin/pronto run --exit-code')
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
safe_pusher-0.2.2 lib/safe_pusher/pronto_runner.rb
safe_pusher-0.2.1 lib/safe_pusher/pronto_runner.rb
safe_pusher-0.2.0 lib/safe_pusher/pronto_runner.rb
safe_pusher-0.1.3 lib/safe_pusher/pronto_runner.rb
safe_pusher-0.1.2 lib/safe_pusher/pronto_runner.rb
safe_pusher-0.1.1 lib/safe_pusher/pronto_runner.rb
safe_pusher-0.1.0 lib/safe_pusher/pronto_runner.rb