From 0527976cee5d575efe67efa6adb141dfccf4d758 Mon Sep 17 00:00:00 2001 From: Aidan Feldman Date: Wed, 23 Oct 2013 00:07:51 -0700 Subject: [PATCH] add HTML::Proofer --- CONTRIBUTING.md | 9 +++++++++ Gemfile | 5 +++++ Gemfile.lock | 18 ++++++++++++++++++ Rakefile | 6 ++++++ 4 files changed, 38 insertions(+) create mode 100644 Rakefile diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ba55c10..afc29b2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,3 +30,12 @@ changes, type in a commit message, and click the `Propose File Change` button. That’s it! For more advanced changes, check out [the bootstrap instructions](https://github.com/github/choosealicense.com#run-it-on-your-machine) in the [project's readme](https://github.com/github/choosealicense.com/blob/master/README.md). + +## Testing + +[HTML::Proofer](https://github.com/gjtorikian/html-proofer) is set up to validate all links within the project. You can run this locally to ensure that your changes are valid: + +```shell +bundle install +bundle exec rake test +``` diff --git a/Gemfile b/Gemfile index 98a042b..05020f6 100644 --- a/Gemfile +++ b/Gemfile @@ -2,3 +2,8 @@ source 'https://rubygems.org' ruby File.read('.ruby-version').strip gem "github-pages" + +group :test do + gem "html-proofer" + gem "rake" +end diff --git a/Gemfile.lock b/Gemfile.lock index 2ad15af..f10679a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,10 +5,15 @@ GEM classifier (1.3.3) fast-stemmer (>= 1.0.0) colorator (0.1) + colored (1.2) commander (4.1.5) highline (~> 1.6.11) directory_watcher (1.4.1) + ethon (0.6.1) + ffi (>= 1.3.0) + mime-types (~> 1.18) fast-stemmer (1.0.2) + ffi (1.9.0) github-pages (4) RedCloth (= 4.2.9) jekyll (= 1.1.2) @@ -18,6 +23,10 @@ GEM rdiscount (= 1.6.8) redcarpet (= 2.2.2) highline (1.6.19) + html-proofer (0.1.1) + colored (~> 1.2) + nokogiri (= 1.6.0) + typhoeus (~> 0.6.3) jekyll (1.1.2) classifier (~> 1.3) colorator (~> 0.1) @@ -33,14 +42,21 @@ GEM liquid (2.5.1) maruku (0.6.1) syntax (>= 1.0.0) + mime-types (1.25) + mini_portile (0.5.1) + nokogiri (1.6.0) + mini_portile (~> 0.5.0) posix-spawn (0.3.6) pygments.rb (0.5.2) posix-spawn (~> 0.3.6) yajl-ruby (~> 1.1.0) + rake (10.1.0) rdiscount (1.6.8) redcarpet (2.2.2) safe_yaml (0.7.1) syntax (1.0.0) + typhoeus (0.6.5) + ethon (~> 0.6.1) yajl-ruby (1.1.0) PLATFORMS @@ -48,3 +64,5 @@ PLATFORMS DEPENDENCIES github-pages + html-proofer + rake diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..8feeb72 --- /dev/null +++ b/Rakefile @@ -0,0 +1,6 @@ +require "html/proofer" + +task :test do + sh "bundle exec jekyll build" + HTML::Proofer.new("./_site").run +end