Sha256: f36ce69a7fee1dd3401c184098a2d1e850ff1e060470bf95dc6e3dede7369c68

Contents?: true

Size: 594 Bytes

Versions: 8

Compression:

Stored size: 594 Bytes

Contents

require 'wax_tasks'
require 'html-proofer'

namespace :wax do
  desc 'run htmlproofer, rspec if exists'
  task :test do
    opts = {
      :check_external_hash => true,
      :allow_hash_href => true,
      :check_html => true,
      :disable_external => true,
      :empty_alt_ignore => true,
      :only_4xx => true,
      :verbose => true
    }
    begin
      HTMLProofer.check_directory('./_site', opts).run
    rescue StandardError
      puts('Failed to run wax:texts. Make sure you are using `bundle exec`.').magenta
    end
    sh 'bundle exec rspec' if File.exist?('.rspec')
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wax_tasks-0.0.47 lib/tasks/test.rake
wax_tasks-0.0.46 lib/tasks/test.rake
wax_tasks-0.0.45 lib/tasks/test.rake
wax_tasks-0.0.44 lib/tasks/test.rake
wax_tasks-0.0.43 lib/tasks/test.rake
wax_tasks-0.0.42 lib/tasks/test.rake
wax_tasks-0.0.41 lib/tasks/test.rake
wax_tasks-0.0.40 lib/tasks/test.rake