Sha256: 1ccba25f57b73c8a2b004c6e98e4eba1f8fe2629a5d51b0ac9aa73d00bcf7cf9

Contents?: true

Size: 596 Bytes

Versions: 11

Compression:

Stored size: 596 Bytes

Contents

module SafePusher
  module Client
    class Pronto
      def lint
        run_pronto
        exit_status = $CHILD_STATUS.exitstatus

        if exit_status != 0
          warn 'Pronto found somme errors… ' \
               'Fix them before pushing to GitHub!'.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 -c #{base_branch}")
      end

      def base_branch
        SafePusher.configuration.base_branch
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
safe_pusher-0.5.7 lib/safe_pusher/client/pronto.rb
safe_pusher-0.5.6 lib/safe_pusher/client/pronto.rb
safe_pusher-0.5.5 lib/safe_pusher/client/pronto.rb
safe_pusher-0.5.4 lib/safe_pusher/client/pronto.rb
safe_pusher-0.5.3 lib/safe_pusher/client/pronto.rb
safe_pusher-0.5.2 lib/safe_pusher/client/pronto.rb
safe_pusher-0.5.1 lib/safe_pusher/client/pronto.rb
safe_pusher-0.5.0 lib/safe_pusher/client/pronto.rb
safe_pusher-0.4.3 lib/safe_pusher/client/pronto.rb
safe_pusher-0.4.2 lib/safe_pusher/client/pronto.rb
safe_pusher-0.4.1 lib/safe_pusher/client/pronto.rb