1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-21 20:30:10 +01:00
2016-01-15 18:01:07 -05:00

28 lines
695 B
Ruby

require "html/proofer"
require 'rspec/core/rake_task'
desc "Run specs"
RSpec::Core::RakeTask.new do |t|
t.pattern = 'spec/**/*_spec.rb'
t.rspec_opts = ["--order", "rand", "--color"]
end
task :test do
sh "bundle exec jekyll build --trace"
HTML::Proofer.new("./_site", :check_html => true).run
Rake::Task["spec"].invoke
end
task :approved_licenses do
require './spec/spec_helper'
approved = approved_licenses
approved.select! { |l| spdx_ids.include?(l) }
puts "#{approved.count} approved licenses:"
puts approved.join(", ")
puts "\n"
potential = approved - licenses.map { |l| l["id"] }
puts "#{potential.count} potential additions:"
puts potential.join(", ")
end