html-proofer 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb18390b6e8107e566191736a04b0bd6209ca1fe
4
- data.tar.gz: b82303dfc0e7972ffd8145e6465cfa03a03d3397
3
+ metadata.gz: d582fc037bc612dee8f91f0c6cae8ce69add076e
4
+ data.tar.gz: ab0c71aed1e108da6ea8101c865cbdaebdf74c7d
5
5
  SHA512:
6
- metadata.gz: 1fff02cdf9e240950924f36ce0eef6333e82c58075dbaf17e83f52a7314fe2a18d42ce619a5b887d338312699a24df83eb5853142e4d7ed91c0fef00213005c2
7
- data.tar.gz: 125e1869d4ca0b448f36a0c36da4e4f601e9c8a7c959d8b44fa8532a491b52815b7e941db7d7c9623ce7f6106f7ba2b6d19125510a4d773f8a7d883e0d7b4965
6
+ metadata.gz: c82827dada38e85814a4cfe6e09bef5b9559f4aeca9a8bd2929b36a01ea0665dd0fff4b51b0815b9b5ec7eec2b5f8df861aa6423164852543a8184a4823b56ad
7
+ data.tar.gz: 5c33939c0b8f1f0a6ede99a946ce61b1f3a3000be4bf2a4f77b6706766ded159d6502f4751955a599a6394591105331cea5536d9f0a0a1641a51435385c8f7d3
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # HTML::Proofer
2
2
 
3
- Generate HTML files? Use them for documentation? Great, then this tool might be for you.
3
+ If you generate HTML files, _then this tool might be for you_.
4
4
 
5
- Here are a set of tests to validate your HTML output. These tests check if your image references are legitimate, if they have alt tags, if your internal links are working, and so on. It's intended to be an all-in-one checker for your documentation output.
5
+ `HTML::Proofer` is a set of tests to validate your HTML output. These tests check if your image references are legitimate, if they have alt tags, if your internal links are working, and so on. It's intended to be an all-in-one checker for your output.
6
6
 
7
- [![Build Status](https://travis-ci.org/gjtorikian/html-proofer.png?branch=master)](https://travis-ci.org/gjtorikian/html-proofer)
7
+ [![Build Status](https://travis-ci.org/gjtorikian/html-proofer.png?branch=master)](https://travis-ci.org/gjtorikian/html-proofer) [![Gem Version](https://badge.fury.io/rb/html-proofer.png)](http://badge.fury.io/rb/html-proofer)
8
8
 
9
9
  ## Installation
10
10
 
@@ -23,7 +23,7 @@ Or install it yourself as:
23
23
  ## Usage
24
24
 
25
25
  Require the gem; generate some HTML; create a new instance of the `HTML::Proofer` on
26
- your out folder; then `run` it:
26
+ your output folder; then `run` it. Here's a simple example:
27
27
 
28
28
  ```ruby
29
29
  require 'html/proofer'
@@ -49,15 +49,21 @@ Find.find("./docs") do |path|
49
49
  end
50
50
 
51
51
  # test your out dir!
52
- tester = HTML::Proofer.new("./out")
53
- tester.run
52
+ HTML::Proofer.new("./out").run
54
53
  ```
55
54
 
56
- The `HTML::Proofer` constructor takes an optional hash of additional options:
55
+ ## Usage with Jekyll
57
56
 
58
- * `:ext`: the extension (including the `.`) of your HTML files (default: `.html`)
59
- * `:href_swap`: a hash containing key-value pairs of `RegExp => String`. It transforms links that match `RegExp` into `String` via `gsub`.
60
- * `:href_ignore`: an array of Strings containing `href`s that are safe to ignore (default: `mailto`)
57
+ Want to use HTML Proofer with your Jekyll site? Awesome. Simply add `gem 'html-proofer'` to your `Gemfile` as described above, and add the following to your `Rakefile`, using `rake test` to execute:
58
+
59
+ ```ruby
60
+ require 'html/proofer'
61
+
62
+ task :test do
63
+ sh "bundle exec jekyll build"
64
+ HTML::Proofer.new("./_site").run
65
+ end
66
+ ```
61
67
 
62
68
  ## What's Tested?
63
69
 
@@ -66,3 +72,12 @@ The `HTML::Proofer` constructor takes an optional hash of additional options:
66
72
  * Whether external images are showing
67
73
  * Whether your internal links are not broken; this includes hash references (`#linkToMe`)
68
74
  * Whether external links are working
75
+
76
+ ## Configuration
77
+
78
+
79
+ The `HTML::Proofer` constructor takes an optional hash of additional options:
80
+
81
+ * `:ext`: the extension (including the `.`) of your HTML files (default: `.html`)
82
+ * `:href_swap`: a hash containing key-value pairs of `RegExp => String`. It transforms links that match `RegExp` into `String` via `gsub`.
83
+ * `:href_ignore`: an array of Strings containing `href`s that are safe to ignore (default: `mailto`)
@@ -11,7 +11,7 @@ module HTML
11
11
  @check = check
12
12
 
13
13
  if @href && @check.options[:href_swap]
14
- @options[:href_swap].each do |link, replace|
14
+ @check.options[:href_swap].each do |link, replace|
15
15
  @href = @href.gsub(link, replace)
16
16
  end
17
17
  end
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Proofer
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-proofer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-14 00:00:00.000000000 Z
11
+ date: 2013-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri