Sha256: 1c23e38450d3803d70e4c69230d7d3928d9fb0e7327e50dfde7319b1555474b1

Contents?: true

Size: 421 Bytes

Versions: 1

Compression:

Stored size: 421 Bytes

Contents

require 'json'
require 'rubocop/rake_task'
$LOAD_PATH.unshift(__dir__)
require 'support/console'

RuboCop::RakeTask.new

task :coverage_check do
  required_percentage = 100
  percentage = JSON(File.read("#{__dir__}/../coverage/.last_run.json"))['result']['covered_percent']
  unless percentage == required_percentage
    Console.error "Expected coverage: #{required_percentage}% got: #{percentage}%"
    exit 1
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sitehub-0.4.3 tasks/code_quality.rake