html-proofer 1.6.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +74 -56
- data/Rakefile +4 -6
- data/bin/htmlproof +46 -36
- data/html-proofer.gemspec +22 -22
- data/lib/html/proofer/check_runner/issue.rb +62 -0
- data/lib/html/proofer/{check.rb → check_runner.rb} +11 -19
- data/lib/html/proofer/checkable.rb +42 -28
- data/lib/html/proofer/checks/favicon.rb +6 -6
- data/lib/html/proofer/checks/html.rb +11 -12
- data/lib/html/proofer/checks/images.rb +11 -11
- data/lib/html/proofer/checks/links.rb +30 -28
- data/lib/html/proofer/checks/scripts.rb +7 -8
- data/lib/html/proofer/log.rb +38 -0
- data/lib/html/proofer/url_validator.rb +135 -0
- data/lib/html/proofer/utils.rb +24 -0
- data/lib/html/proofer/version.rb +1 -1
- data/lib/html/proofer.rb +95 -199
- data/spec/html/proofer/command_spec.rb +82 -0
- data/spec/html/proofer/favicon_spec.rb +20 -20
- data/spec/html/proofer/fixtures/images/srcSetCheck.html +7 -0
- data/spec/html/proofer/fixtures/images/srcSetIgnorable.html +13 -0
- data/spec/html/proofer/fixtures/images/srcSetMissingAlt.html +7 -0
- data/spec/html/proofer/fixtures/images/srcSetMissingImage.html +7 -0
- data/spec/html/proofer/fixtures/links/erstiebegru/314/210/303/237ung.html +1 -0
- data/spec/html/proofer/fixtures/links/erstiebegr/303/274/303/237ung.html +1 -0
- data/spec/html/proofer/fixtures/links/file.foo +11 -0
- data/spec/html/proofer/fixtures/links/folder/multiples/catalog/file.html +8 -0
- data/spec/html/proofer/fixtures/links/folder/multiples/javadoc/file.html +8 -0
- data/spec/html/proofer/fixtures/links/nodupe.html +1 -1
- data/spec/html/proofer/fixtures/links/redirected_error.html +1 -0
- data/spec/html/proofer/fixtures/links/rootLink/rootLink.html +0 -1
- data/spec/html/proofer/fixtures/links/urlencoded-href.html +2 -0
- data/spec/html/proofer/fixtures/links/utf8Link.html +2 -0
- data/spec/html/proofer/fixtures/utils/lang-jp.html +1 -0
- data/spec/html/proofer/html_spec.rb +25 -25
- data/spec/html/proofer/images_spec.rb +59 -35
- data/spec/html/proofer/links_spec.rb +152 -109
- data/spec/html/proofer/scripts_spec.rb +17 -17
- data/spec/html/proofer/utils_spec.rb +14 -0
- data/spec/html/proofer_spec.rb +58 -38
- data/spec/spec_helper.rb +13 -6
- metadata +39 -7
- data/lib/html/proofer/checks.rb +0 -15
- data/lib/html/proofer/issue.rb +0 -21
data/spec/html/proofer_spec.rb
CHANGED
@@ -2,31 +2,31 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe HTML::Proofer do
|
4
4
|
|
5
|
-
describe
|
6
|
-
it
|
5
|
+
describe '#failed_tests' do
|
6
|
+
it 'is a list of the formatted errors' do
|
7
7
|
brokenLinkInternalFilepath = "#{FIXTURES_DIR}/links/brokenLinkInternal.html"
|
8
|
-
proofer =
|
9
|
-
expect(proofer.failed_tests).to eq(["
|
8
|
+
proofer = run_proofer(brokenLinkInternalFilepath)
|
9
|
+
expect(proofer.failed_tests).to eq(["spec/html/proofer/fixtures/links/brokenLinkInternal.html: internally linking to ./notreal.html, which does not exist (line 5)", "spec/html/proofer/fixtures/links/brokenLinkInternal.html: internally linking to ./missingImageAlt.html, which does not exist (line 6)"])
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
describe
|
14
|
-
it
|
13
|
+
describe '#files' do
|
14
|
+
it 'works for directory that ends with .html' do
|
15
15
|
folder = "#{FIXTURES_DIR}/links/_site/folder.html"
|
16
16
|
proofer = HTML::Proofer.new folder
|
17
17
|
expect(proofer.files).to eq(["#{folder}/index.html"])
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
describe
|
22
|
-
it
|
21
|
+
describe '#options' do
|
22
|
+
it 'strips out undesired Typhoeus options' do
|
23
23
|
folder = "#{FIXTURES_DIR}/links/_site/folder.html"
|
24
24
|
proofer = HTML::Proofer.new folder, :verbose => true
|
25
25
|
expect(proofer.options[:verbose]).to eq(true)
|
26
26
|
expect(proofer.typhoeus_opts[:verbose]).to eq(nil)
|
27
27
|
end
|
28
28
|
|
29
|
-
it
|
29
|
+
it 'takes options for Parallel' do
|
30
30
|
folder = "#{FIXTURES_DIR}/links/_site/folder.html"
|
31
31
|
proofer = HTML::Proofer.new folder, :parallel => { :in_processes => 3 }
|
32
32
|
expect(proofer.parallel_opts[:in_processes]).to eq(3)
|
@@ -34,69 +34,89 @@ describe HTML::Proofer do
|
|
34
34
|
expect(proofer.options[:parallel]).to eq(nil)
|
35
35
|
end
|
36
36
|
|
37
|
-
describe
|
38
|
-
|
39
|
-
it "understands sorting by path", :skip => ENV['TRAVIS'] do
|
37
|
+
describe 'sorting' do
|
38
|
+
it 'understands sorting by path' do
|
40
39
|
output = send_proofer_output("#{FIXTURES_DIR}/sorting/path")
|
41
40
|
|
42
|
-
expect(output.strip).to eq(
|
41
|
+
expect(output.strip).to eq('''
|
43
42
|
- spec/html/proofer/fixtures/sorting/path/multiple_issues.html
|
44
|
-
*
|
45
|
-
* internal image gpl.png does not exist
|
46
|
-
*
|
43
|
+
* image gpl.png does not have an alt attribute (line 7)
|
44
|
+
* internal image gpl.png does not exist (line 7)
|
45
|
+
* tel: contains no phone number (line 5)
|
47
46
|
- spec/html/proofer/fixtures/sorting/path/single_issue.html
|
48
|
-
* image has a terrible filename (./Screen Shot 2012-08-09 at 7.51.18 AM.png)
|
49
|
-
|
47
|
+
* image has a terrible filename (./Screen Shot 2012-08-09 at 7.51.18 AM.png) (line 1)
|
48
|
+
'''.strip)
|
50
49
|
end
|
51
50
|
|
52
|
-
it
|
51
|
+
it 'understands sorting by issue' do
|
53
52
|
output = send_proofer_output("#{FIXTURES_DIR}/sorting/issue", :error_sort => :desc)
|
54
|
-
expect(output.strip).to eq(
|
53
|
+
expect(output.strip).to eq('''
|
55
54
|
- image ./gpl.png does not have an alt attribute
|
56
|
-
* spec/html/proofer/fixtures/sorting/issue/broken_image_one.html
|
57
|
-
* spec/html/proofer/fixtures/sorting/issue/broken_image_two.html
|
55
|
+
* spec/html/proofer/fixtures/sorting/issue/broken_image_one.html (line 1)
|
56
|
+
* spec/html/proofer/fixtures/sorting/issue/broken_image_two.html (line 1)
|
58
57
|
- internal image ./gpl.png does not exist
|
59
|
-
* spec/html/proofer/fixtures/sorting/issue/broken_image_one.html
|
60
|
-
* spec/html/proofer/fixtures/sorting/issue/broken_image_two.html
|
58
|
+
* spec/html/proofer/fixtures/sorting/issue/broken_image_one.html (line 1)
|
59
|
+
* spec/html/proofer/fixtures/sorting/issue/broken_image_two.html (line 1)
|
61
60
|
- internal image NOT_AN_IMAGE does not exist
|
62
|
-
* spec/html/proofer/fixtures/sorting/issue/broken_image_two.html
|
63
|
-
|
61
|
+
* spec/html/proofer/fixtures/sorting/issue/broken_image_two.html (line 4)
|
62
|
+
'''.strip)
|
64
63
|
end
|
65
64
|
|
66
65
|
|
67
|
-
it
|
68
|
-
output = send_proofer_output("#{FIXTURES_DIR}/sorting/status", :followlocation => false, :error_sort => :status)
|
69
|
-
expect(output.strip).to eq(
|
66
|
+
it 'understands sorting by status' do
|
67
|
+
output = send_proofer_output("#{FIXTURES_DIR}/sorting/status", :typhoeus => { :followlocation => false }, :error_sort => :status)
|
68
|
+
expect(output.strip).to eq('''
|
70
69
|
- -1
|
71
|
-
* spec/html/proofer/fixtures/sorting/status/broken_link.html: internally linking to nowhere.fooof, which does not exist
|
70
|
+
* spec/html/proofer/fixtures/sorting/status/broken_link.html: internally linking to nowhere.fooof, which does not exist (line 3)
|
72
71
|
- 404
|
73
72
|
* spec/html/proofer/fixtures/sorting/status/a_404.html: External link http://upload.wikimedia.org/wikipedia/en/thumb/not_here.png failed: 404 No error
|
74
73
|
* spec/html/proofer/fixtures/sorting/status/broken_link.html: External link http://upload.wikimedia.org/wikipedia/en/thumb/fooooof.png failed: 404 No error
|
75
|
-
|
74
|
+
'''.strip)
|
76
75
|
end
|
77
76
|
end
|
78
77
|
|
79
|
-
describe
|
80
|
-
it
|
78
|
+
describe 'file ignores' do
|
79
|
+
it 'knows how to ignore a file by string' do
|
81
80
|
options = { :file_ignore => ["#{FIXTURES_DIR}/links/brokenHashInternal.html"] }
|
82
81
|
brokenHashInternalFilepath = "#{FIXTURES_DIR}/links/brokenHashInternal.html"
|
83
|
-
proofer =
|
82
|
+
proofer = run_proofer(brokenHashInternalFilepath, options)
|
84
83
|
expect(proofer.failed_tests).to eq []
|
85
84
|
end
|
86
85
|
|
87
|
-
it
|
86
|
+
it 'knows how to ignore a file by regexp' do
|
88
87
|
options = { :file_ignore => [/brokenHash/] }
|
89
88
|
brokenHashInternalFilepath = "#{FIXTURES_DIR}/links/brokenHashInternal.html"
|
90
|
-
proofer =
|
89
|
+
proofer = run_proofer(brokenHashInternalFilepath, options)
|
91
90
|
expect(proofer.failed_tests).to eq []
|
92
91
|
end
|
93
92
|
|
94
|
-
it
|
93
|
+
it 'knows how to ignore multiple files by regexp' do
|
94
|
+
options = { :file_ignore => [%r{.*/javadoc/.*}, %r{.*/catalog/.*}] }
|
95
|
+
brokenFolders = "#{FIXTURES_DIR}/links/folder/multiples"
|
96
|
+
proofer = run_proofer(brokenFolders, options)
|
97
|
+
expect(proofer.failed_tests).to eq []
|
98
|
+
end
|
99
|
+
|
100
|
+
it 'knows how to ignore a directory by regexp' do
|
95
101
|
options = { :file_ignore => [/\S\.html/] }
|
96
102
|
linksDir = "#{FIXTURES_DIR}/links"
|
97
|
-
proofer =
|
103
|
+
proofer = run_proofer(linksDir, options)
|
98
104
|
expect(proofer.failed_tests).to eq []
|
99
105
|
end
|
100
106
|
end
|
101
107
|
end
|
108
|
+
|
109
|
+
describe 'ignored checks' do
|
110
|
+
it 'knows how to ignore checks' do
|
111
|
+
options = { :checks_to_ignore => ['ImageRunner'] }
|
112
|
+
proofer = make_proofer('', options)
|
113
|
+
expect(proofer.checks).to_not include 'ImageRunner'
|
114
|
+
end
|
115
|
+
|
116
|
+
it 'does not care about phoney ignored checks' do
|
117
|
+
options = { :checks_to_ignore => ['This is nothing.'] }
|
118
|
+
proofer = make_proofer('', options)
|
119
|
+
expect(proofer.checks.length).to eq 3
|
120
|
+
end
|
121
|
+
end
|
102
122
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -17,7 +17,7 @@ RSpec.configure do |config|
|
|
17
17
|
config.order = :random
|
18
18
|
end
|
19
19
|
|
20
|
-
def capture_stderr(
|
20
|
+
def capture_stderr(*)
|
21
21
|
original_stderr = $stderr
|
22
22
|
original_stdout = $stdout
|
23
23
|
$stderr = fake_err = StringIO.new
|
@@ -32,14 +32,21 @@ def capture_stderr(&block)
|
|
32
32
|
fake_err.string
|
33
33
|
end
|
34
34
|
|
35
|
-
def make_proofer(file, opts
|
36
|
-
|
35
|
+
def make_proofer(file, opts)
|
36
|
+
HTML::Proofer.new(file, opts)
|
37
|
+
end
|
38
|
+
|
39
|
+
def run_proofer(file, opts = {})
|
40
|
+
proofer = make_proofer(file, opts)
|
37
41
|
capture_stderr { proofer.run }
|
38
|
-
# proofer.run # when I want to see output
|
39
42
|
proofer
|
40
43
|
end
|
41
44
|
|
42
|
-
def send_proofer_output(file, opts={})
|
43
|
-
proofer =
|
45
|
+
def send_proofer_output(file, opts = {})
|
46
|
+
proofer = make_proofer(file, opts)
|
44
47
|
capture_stderr { proofer.run }
|
45
48
|
end
|
49
|
+
|
50
|
+
def make_bin(cmd, path=nil)
|
51
|
+
`bin/htmlproof #{cmd} #{path}`
|
52
|
+
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:
|
4
|
+
version: 2.0.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:
|
11
|
+
date: 2015-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mercenary
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 3.1
|
131
|
+
version: '3.1'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 3.1
|
138
|
+
version: '3.1'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: rake
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,16 +181,19 @@ files:
|
|
181
181
|
- bin/htmlproof
|
182
182
|
- html-proofer.gemspec
|
183
183
|
- lib/html/proofer.rb
|
184
|
-
- lib/html/proofer/
|
184
|
+
- lib/html/proofer/check_runner.rb
|
185
|
+
- lib/html/proofer/check_runner/issue.rb
|
185
186
|
- lib/html/proofer/checkable.rb
|
186
|
-
- lib/html/proofer/checks.rb
|
187
187
|
- lib/html/proofer/checks/favicon.rb
|
188
188
|
- lib/html/proofer/checks/html.rb
|
189
189
|
- lib/html/proofer/checks/images.rb
|
190
190
|
- lib/html/proofer/checks/links.rb
|
191
191
|
- lib/html/proofer/checks/scripts.rb
|
192
|
-
- lib/html/proofer/
|
192
|
+
- lib/html/proofer/log.rb
|
193
|
+
- lib/html/proofer/url_validator.rb
|
194
|
+
- lib/html/proofer/utils.rb
|
193
195
|
- lib/html/proofer/version.rb
|
196
|
+
- spec/html/proofer/command_spec.rb
|
194
197
|
- spec/html/proofer/favicon_spec.rb
|
195
198
|
- spec/html/proofer/fixtures/favicon/favicon_absent.html
|
196
199
|
- spec/html/proofer/fixtures/favicon/favicon_absent_apple.html
|
@@ -219,6 +222,10 @@ files:
|
|
219
222
|
- spec/html/proofer/fixtures/images/missingImageSrc.html
|
220
223
|
- spec/html/proofer/fixtures/images/relativeToSelf.html
|
221
224
|
- spec/html/proofer/fixtures/images/rootRelativeImages.html
|
225
|
+
- spec/html/proofer/fixtures/images/srcSetCheck.html
|
226
|
+
- spec/html/proofer/fixtures/images/srcSetIgnorable.html
|
227
|
+
- spec/html/proofer/fixtures/images/srcSetMissingAlt.html
|
228
|
+
- spec/html/proofer/fixtures/images/srcSetMissingImage.html
|
222
229
|
- spec/html/proofer/fixtures/images/terribleImageName.html
|
223
230
|
- spec/html/proofer/fixtures/images/workingDataURIImage.html
|
224
231
|
- spec/html/proofer/fixtures/links/_site/folder.html/index.html
|
@@ -236,11 +243,16 @@ files:
|
|
236
243
|
- spec/html/proofer/fixtures/links/broken_hash_with_query.html
|
237
244
|
- spec/html/proofer/fixtures/links/checkSSLLinks.html
|
238
245
|
- spec/html/proofer/fixtures/links/ensure_typhoeus_options.html
|
246
|
+
- spec/html/proofer/fixtures/links/erstiebegrüßung.html
|
247
|
+
- spec/html/proofer/fixtures/links/erstiebegrüßung.html
|
239
248
|
- spec/html/proofer/fixtures/links/escape_pipes.html
|
249
|
+
- spec/html/proofer/fixtures/links/file.foo
|
240
250
|
- spec/html/proofer/fixtures/links/folder-php/index.php
|
241
251
|
- spec/html/proofer/fixtures/links/folder/anchorLink.html
|
242
252
|
- spec/html/proofer/fixtures/links/folder/assets/barrel.png
|
243
253
|
- spec/html/proofer/fixtures/links/folder/index.html
|
254
|
+
- spec/html/proofer/fixtures/links/folder/multiples/catalog/file.html
|
255
|
+
- spec/html/proofer/fixtures/links/folder/multiples/javadoc/file.html
|
244
256
|
- spec/html/proofer/fixtures/links/folder/relativeImage.html
|
245
257
|
- spec/html/proofer/fixtures/links/githubHash.html
|
246
258
|
- spec/html/proofer/fixtures/links/gpl.png
|
@@ -270,11 +282,14 @@ files:
|
|
270
282
|
- spec/html/proofer/fixtures/links/placeholder_with_empty_id.html
|
271
283
|
- spec/html/proofer/fixtures/links/placeholder_with_id.html
|
272
284
|
- spec/html/proofer/fixtures/links/placeholder_with_name.html
|
285
|
+
- spec/html/proofer/fixtures/links/redirected_error.html
|
273
286
|
- spec/html/proofer/fixtures/links/relativeLinks.html
|
274
287
|
- spec/html/proofer/fixtures/links/rootLink/folder/index.html
|
275
288
|
- spec/html/proofer/fixtures/links/rootLink/index.html
|
276
289
|
- spec/html/proofer/fixtures/links/rootLink/rootLink.html
|
277
290
|
- spec/html/proofer/fixtures/links/tel_link.html
|
291
|
+
- spec/html/proofer/fixtures/links/urlencoded-href.html
|
292
|
+
- spec/html/proofer/fixtures/links/utf8Link.html
|
278
293
|
- spec/html/proofer/fixtures/resources/Screen Shot 2012-08-09 at 7.51.18 AM.png
|
279
294
|
- spec/html/proofer/fixtures/resources/books/assets/getting-good-with-git.jpg
|
280
295
|
- spec/html/proofer/fixtures/resources/books/assets/pro-git.jpg
|
@@ -295,10 +310,12 @@ files:
|
|
295
310
|
- spec/html/proofer/fixtures/sorting/status/a_404.html
|
296
311
|
- spec/html/proofer/fixtures/sorting/status/broken_link.html
|
297
312
|
- spec/html/proofer/fixtures/sorting/status/missing_redirect.html
|
313
|
+
- spec/html/proofer/fixtures/utils/lang-jp.html
|
298
314
|
- spec/html/proofer/html_spec.rb
|
299
315
|
- spec/html/proofer/images_spec.rb
|
300
316
|
- spec/html/proofer/links_spec.rb
|
301
317
|
- spec/html/proofer/scripts_spec.rb
|
318
|
+
- spec/html/proofer/utils_spec.rb
|
302
319
|
- spec/html/proofer_spec.rb
|
303
320
|
- spec/spec_helper.rb
|
304
321
|
homepage: https://github.com/gjtorikian/html-proofer
|
@@ -328,6 +345,7 @@ summary: A set of tests to validate your HTML output. These tests check if your
|
|
328
345
|
references are legitimate, if they have alt tags, if your internal links are working,
|
329
346
|
and so on. It's intended to be an all-in-one checker for your documentation output.
|
330
347
|
test_files:
|
348
|
+
- spec/html/proofer/command_spec.rb
|
331
349
|
- spec/html/proofer/favicon_spec.rb
|
332
350
|
- spec/html/proofer/fixtures/favicon/favicon_absent.html
|
333
351
|
- spec/html/proofer/fixtures/favicon/favicon_absent_apple.html
|
@@ -356,6 +374,10 @@ test_files:
|
|
356
374
|
- spec/html/proofer/fixtures/images/missingImageSrc.html
|
357
375
|
- spec/html/proofer/fixtures/images/relativeToSelf.html
|
358
376
|
- spec/html/proofer/fixtures/images/rootRelativeImages.html
|
377
|
+
- spec/html/proofer/fixtures/images/srcSetCheck.html
|
378
|
+
- spec/html/proofer/fixtures/images/srcSetIgnorable.html
|
379
|
+
- spec/html/proofer/fixtures/images/srcSetMissingAlt.html
|
380
|
+
- spec/html/proofer/fixtures/images/srcSetMissingImage.html
|
359
381
|
- spec/html/proofer/fixtures/images/terribleImageName.html
|
360
382
|
- spec/html/proofer/fixtures/images/workingDataURIImage.html
|
361
383
|
- spec/html/proofer/fixtures/links/_site/folder.html/index.html
|
@@ -373,11 +395,16 @@ test_files:
|
|
373
395
|
- spec/html/proofer/fixtures/links/broken_hash_with_query.html
|
374
396
|
- spec/html/proofer/fixtures/links/checkSSLLinks.html
|
375
397
|
- spec/html/proofer/fixtures/links/ensure_typhoeus_options.html
|
398
|
+
- spec/html/proofer/fixtures/links/erstiebegrüßung.html
|
399
|
+
- spec/html/proofer/fixtures/links/erstiebegrüßung.html
|
376
400
|
- spec/html/proofer/fixtures/links/escape_pipes.html
|
401
|
+
- spec/html/proofer/fixtures/links/file.foo
|
377
402
|
- spec/html/proofer/fixtures/links/folder-php/index.php
|
378
403
|
- spec/html/proofer/fixtures/links/folder/anchorLink.html
|
379
404
|
- spec/html/proofer/fixtures/links/folder/assets/barrel.png
|
380
405
|
- spec/html/proofer/fixtures/links/folder/index.html
|
406
|
+
- spec/html/proofer/fixtures/links/folder/multiples/catalog/file.html
|
407
|
+
- spec/html/proofer/fixtures/links/folder/multiples/javadoc/file.html
|
381
408
|
- spec/html/proofer/fixtures/links/folder/relativeImage.html
|
382
409
|
- spec/html/proofer/fixtures/links/githubHash.html
|
383
410
|
- spec/html/proofer/fixtures/links/gpl.png
|
@@ -407,11 +434,14 @@ test_files:
|
|
407
434
|
- spec/html/proofer/fixtures/links/placeholder_with_empty_id.html
|
408
435
|
- spec/html/proofer/fixtures/links/placeholder_with_id.html
|
409
436
|
- spec/html/proofer/fixtures/links/placeholder_with_name.html
|
437
|
+
- spec/html/proofer/fixtures/links/redirected_error.html
|
410
438
|
- spec/html/proofer/fixtures/links/relativeLinks.html
|
411
439
|
- spec/html/proofer/fixtures/links/rootLink/folder/index.html
|
412
440
|
- spec/html/proofer/fixtures/links/rootLink/index.html
|
413
441
|
- spec/html/proofer/fixtures/links/rootLink/rootLink.html
|
414
442
|
- spec/html/proofer/fixtures/links/tel_link.html
|
443
|
+
- spec/html/proofer/fixtures/links/urlencoded-href.html
|
444
|
+
- spec/html/proofer/fixtures/links/utf8Link.html
|
415
445
|
- spec/html/proofer/fixtures/resources/Screen Shot 2012-08-09 at 7.51.18 AM.png
|
416
446
|
- spec/html/proofer/fixtures/resources/books/assets/getting-good-with-git.jpg
|
417
447
|
- spec/html/proofer/fixtures/resources/books/assets/pro-git.jpg
|
@@ -432,9 +462,11 @@ test_files:
|
|
432
462
|
- spec/html/proofer/fixtures/sorting/status/a_404.html
|
433
463
|
- spec/html/proofer/fixtures/sorting/status/broken_link.html
|
434
464
|
- spec/html/proofer/fixtures/sorting/status/missing_redirect.html
|
465
|
+
- spec/html/proofer/fixtures/utils/lang-jp.html
|
435
466
|
- spec/html/proofer/html_spec.rb
|
436
467
|
- spec/html/proofer/images_spec.rb
|
437
468
|
- spec/html/proofer/links_spec.rb
|
438
469
|
- spec/html/proofer/scripts_spec.rb
|
470
|
+
- spec/html/proofer/utils_spec.rb
|
439
471
|
- spec/html/proofer_spec.rb
|
440
472
|
- spec/spec_helper.rb
|
data/lib/html/proofer/checks.rb
DELETED
data/lib/html/proofer/issue.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require 'colored'
|
3
|
-
|
4
|
-
class HTML::Proofer::Checks
|
5
|
-
|
6
|
-
class Issue
|
7
|
-
|
8
|
-
attr_reader :path, :desc, :status
|
9
|
-
|
10
|
-
def initialize(path, desc, status = -1)
|
11
|
-
@path = path
|
12
|
-
@desc = desc
|
13
|
-
@status = status
|
14
|
-
end
|
15
|
-
|
16
|
-
def to_s
|
17
|
-
"#{HTML::colorize(:blue, @path)}: #{desc}"
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
end
|