html-proofer 0.7.3 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/README.md +9 -0
- data/html-proofer.gemspec +1 -1
- data/lib/html/proofer/checks/links.rb +1 -1
- data/spec/html/proofer/fixtures/head_link_href.html +7 -0
- data/spec/html/proofer/fixtures/head_link_href_absent.html +7 -0
- data/spec/html/proofer/fixtures/head_link_href_empty.html +7 -0
- data/spec/html/proofer/links_spec.rb +18 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58e3804b2c58cfc45bef2a6de1a8a2e97ccd6132
|
4
|
+
data.tar.gz: f0cff86b5f52382e228090a6aa5992815ea3d9de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc7bc7d35c99e356ea94c69472957f923f117f18ac119c8ce147794ad6ba6cc9dab9369ef244c8cb9498a92e9a823e14f77e88a89d564a701af66dbc65d2d7ca
|
7
|
+
data.tar.gz: be3629b356a39521baa248e6e4a705ba625d9bca4dc697ba5dfdab7344228dbe2c4a104293a73019387eb0ab4593e8d1af96c95272c54393a2b285bc5b7d69dc
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -92,9 +92,18 @@ htmlproof ./_site
|
|
92
92
|
|
93
93
|
## What's Tested?
|
94
94
|
|
95
|
+
### Images
|
96
|
+
|
97
|
+
`img` elements:
|
98
|
+
|
95
99
|
* Whether all your images have alt tags
|
96
100
|
* Whether your internal image references are not broken
|
97
101
|
* Whether external images are showing
|
102
|
+
|
103
|
+
### Links
|
104
|
+
|
105
|
+
`a`, `link` elements:
|
106
|
+
|
98
107
|
* Whether your internal links are not broken; this includes hash references (`#linkToMe`)
|
99
108
|
* Whether external links are working
|
100
109
|
|
data/html-proofer.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.name = "html-proofer"
|
6
|
-
gem.version = "0.
|
6
|
+
gem.version = "0.8.0"
|
7
7
|
gem.authors = ["Garen Torikian"]
|
8
8
|
gem.email = ["gjtorikian@gmail.com"]
|
9
9
|
gem.description = %q{Test your rendered HTML files to make sure they're accurate.}
|
@@ -133,4 +133,22 @@ describe "Links tests" do
|
|
133
133
|
output = capture_stderr { HTML::Proofer.new(missingProtocolLink).run }
|
134
134
|
output.should match /Couldn't resolve host name/
|
135
135
|
end
|
136
|
+
|
137
|
+
it "works for valid href within link elements" do
|
138
|
+
head_link = "#{FIXTURES_DIR}/head_link_href.html"
|
139
|
+
output = capture_stderr { HTML::Proofer.new(head_link).run }
|
140
|
+
output.should == ""
|
141
|
+
end
|
142
|
+
|
143
|
+
it "fails for empty href within link elements" do
|
144
|
+
head_link = "#{FIXTURES_DIR}/head_link_href_empty.html"
|
145
|
+
output = capture_stderr { HTML::Proofer.new(head_link).run }
|
146
|
+
output.should match /link has no href attribute/
|
147
|
+
end
|
148
|
+
|
149
|
+
it "fails for absent href within link elements" do
|
150
|
+
head_link = "#{FIXTURES_DIR}/head_link_href_absent.html"
|
151
|
+
output = capture_stderr { HTML::Proofer.new(head_link).run }
|
152
|
+
output.should match /link has no href attribute/
|
153
|
+
end
|
136
154
|
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.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mercenary
|
@@ -174,6 +174,9 @@ files:
|
|
174
174
|
- spec/html/proofer/fixtures/folder/index.html
|
175
175
|
- spec/html/proofer/fixtures/folder/relativeImage.html
|
176
176
|
- spec/html/proofer/fixtures/gpl.png
|
177
|
+
- spec/html/proofer/fixtures/head_link_href.html
|
178
|
+
- spec/html/proofer/fixtures/head_link_href_absent.html
|
179
|
+
- spec/html/proofer/fixtures/head_link_href_empty.html
|
177
180
|
- spec/html/proofer/fixtures/ignorableImages.html
|
178
181
|
- spec/html/proofer/fixtures/ignorableLinks.html
|
179
182
|
- spec/html/proofer/fixtures/ignorableLinksViaOptions.html
|
@@ -252,6 +255,9 @@ test_files:
|
|
252
255
|
- spec/html/proofer/fixtures/folder/index.html
|
253
256
|
- spec/html/proofer/fixtures/folder/relativeImage.html
|
254
257
|
- spec/html/proofer/fixtures/gpl.png
|
258
|
+
- spec/html/proofer/fixtures/head_link_href.html
|
259
|
+
- spec/html/proofer/fixtures/head_link_href_absent.html
|
260
|
+
- spec/html/proofer/fixtures/head_link_href_empty.html
|
255
261
|
- spec/html/proofer/fixtures/ignorableImages.html
|
256
262
|
- spec/html/proofer/fixtures/ignorableLinks.html
|
257
263
|
- spec/html/proofer/fixtures/ignorableLinksViaOptions.html
|