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 +4 -4
- data/README.md +25 -10
- data/lib/html/proofer/checkable.rb +1 -1
- data/lib/html/proofer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d582fc037bc612dee8f91f0c6cae8ce69add076e
|
4
|
+
data.tar.gz: ab0c71aed1e108da6ea8101c865cbdaebdf74c7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c82827dada38e85814a4cfe6e09bef5b9559f4aeca9a8bd2929b36a01ea0665dd0fff4b51b0815b9b5ec7eec2b5f8df861aa6423164852543a8184a4823b56ad
|
7
|
+
data.tar.gz: 5c33939c0b8f1f0a6ede99a946ce61b1f3a3000be4bf2a4f77b6706766ded159d6502f4751955a599a6394591105331cea5536d9f0a0a1641a51435385c8f7d3
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# HTML::Proofer
|
2
2
|
|
3
|
-
|
3
|
+
If you generate HTML files, _then this tool might be for you_.
|
4
4
|
|
5
|
-
|
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
|
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
|
-
|
53
|
-
tester.run
|
52
|
+
HTML::Proofer.new("./out").run
|
54
53
|
```
|
55
54
|
|
56
|
-
|
55
|
+
## Usage with Jekyll
|
57
56
|
|
58
|
-
|
59
|
-
|
60
|
-
|
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`)
|
data/lib/html/proofer/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2013-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|