html-proofer 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/bin/htmlproof +4 -2
  4. data/html-proofer.gemspec +1 -0
  5. data/lib/html/proofer.rb +5 -2
  6. data/lib/html/proofer/check_runner.rb +3 -2
  7. data/lib/html/proofer/checks/html.rb +7 -3
  8. data/lib/html/proofer/version.rb +1 -1
  9. data/spec/html/proofer/fixtures/html/ignore_script_embeds.html +3 -0
  10. data/spec/html/proofer/fixtures/links/linkWithRedirect.html +2 -0
  11. data/spec/html/proofer/fixtures/vcr_cassettes/images/existingImageExternal_html.yml +62 -0
  12. data/spec/html/proofer/fixtures/vcr_cassettes/images/ignoreAltButNotLink_html_alt_ignore_/_/_.yml +45 -0
  13. data/spec/html/proofer/fixtures/vcr_cassettes/images/image_missing_protocol_invalid_html.yml +117 -0
  14. data/spec/html/proofer/fixtures/vcr_cassettes/images/image_missing_protocol_valid_html.yml +62 -0
  15. data/spec/html/proofer/fixtures/vcr_cassettes/images/missingImageExternal_html.yml +45 -0
  16. data/spec/html/proofer/fixtures/vcr_cassettes/links/attributeWithDash_html.yml +73 -0
  17. data/spec/html/proofer/fixtures/vcr_cassettes/links/brokenHashOnTheWeb_html.yml +56 -0
  18. data/spec/html/proofer/fixtures/vcr_cassettes/links/brokenHashOnTheWeb_html_check_external_hash_true_.yml +719 -0
  19. data/spec/html/proofer/fixtures/vcr_cassettes/links/brokenHashOnTheWeb_html_only_4xx_true_.yml +56 -0
  20. data/spec/html/proofer/fixtures/vcr_cassettes/links/brokenLinkExternal_html.yml +96 -0
  21. data/spec/html/proofer/fixtures/vcr_cassettes/links/brokenUnixLinks_html.yml +156 -0
  22. data/spec/html/proofer/fixtures/vcr_cassettes/links/checkSSLLinks_html.yml +50 -0
  23. data/spec/html/proofer/fixtures/vcr_cassettes/links/ensure_typhoeus_options_html_typhoeus_ssl_verifypeer_false_.yml +40 -0
  24. data/spec/html/proofer/fixtures/vcr_cassettes/links/escape_pipes_html.yml +52 -0
  25. data/spec/html/proofer/fixtures/vcr_cassettes/links/file_foo_ext_foo_.yml +96 -0
  26. data/spec/html/proofer/fixtures/vcr_cassettes/links/githubHash_html.yml +73 -0
  27. data/spec/html/proofer/fixtures/vcr_cassettes/links/linkWithHttps_html.yml +73 -0
  28. data/spec/html/proofer/fixtures/vcr_cassettes/links/linkWithRedirect_html.yml +236 -0
  29. data/spec/html/proofer/fixtures/vcr_cassettes/links/linkWithRedirect_html_only_4xx_true_typhoeus_followlocation_false_.yml +318 -0
  30. data/spec/html/proofer/fixtures/vcr_cassettes/links/linkWithRedirect_html_typhoeus_followlocation_false_.yml +318 -0
  31. data/spec/html/proofer/fixtures/vcr_cassettes/links/link_missing_protocol_invalid_html.yml +45 -0
  32. data/spec/html/proofer/fixtures/vcr_cassettes/links/link_missing_protocol_valid_html.yml +73 -0
  33. data/spec/html/proofer/fixtures/vcr_cassettes/links/nodupe_html.yml +182 -0
  34. data/spec/html/proofer/fixtures/vcr_cassettes/links/non_standard_characters_html.yml +113 -0
  35. data/spec/html/proofer/fixtures/vcr_cassettes/links/redirected_error_html.yml +1044 -0
  36. data/spec/html/proofer/fixtures/vcr_cassettes/links/utf8Link_html.yml +113 -0
  37. data/spec/html/proofer/fixtures/vcr_cassettes/scripts/script_broken_external_html.yml +45 -0
  38. data/spec/html/proofer/fixtures/vcr_cassettes/sorting/status_typhoeus_followlocation_false_error_sort_status_.yml +244 -0
  39. data/spec/html/proofer/fixtures/vcr_cassettes/www_garbalarba_com_href_swap_/garbalarba/_github_.yml +73 -0
  40. data/spec/html/proofer/fixtures/vcr_cassettes/www_github_com_foofoofoo_biz.yml +115 -0
  41. data/spec/html/proofer/html_spec.rb +12 -5
  42. data/spec/html/proofer/images_spec.rb +3 -3
  43. data/spec/html/proofer/links_spec.rb +6 -6
  44. data/spec/html/proofer/scripts_spec.rb +1 -2
  45. data/spec/html/proofer_spec.rb +3 -3
  46. data/spec/spec_helper.rb +27 -5
  47. metadata +78 -2
@@ -0,0 +1,113 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: http://ben.balter.com/2014/09/29/source-disclosed-%E2%89%A0-open-source/
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - GitHub.com
19
+ Content-Type:
20
+ - text/html; charset=utf-8
21
+ Last-Modified:
22
+ - Sat, 04 Jul 2015 14:06:15 GMT
23
+ Access-Control-Allow-Origin:
24
+ - "*"
25
+ Expires:
26
+ - Mon, 06 Jul 2015 05:08:05 GMT
27
+ Cache-Control:
28
+ - max-age=600
29
+ Content-Length:
30
+ - '13402'
31
+ Accept-Ranges:
32
+ - bytes
33
+ Date:
34
+ - Mon, 06 Jul 2015 05:07:53 GMT
35
+ Via:
36
+ - 1.1 varnish
37
+ Age:
38
+ - '588'
39
+ Connection:
40
+ - keep-alive
41
+ X-Served-By:
42
+ - cache-lax1420-LAX
43
+ X-Cache:
44
+ - HIT
45
+ X-Cache-Hits:
46
+ - '2'
47
+ X-Timer:
48
+ - S1436159273.405572,VS0,VE0
49
+ Vary:
50
+ - Accept-Encoding
51
+ body:
52
+ encoding: UTF-8
53
+ string: ''
54
+ http_version: '1.1'
55
+ adapter_metadata:
56
+ effective_url: http://ben.balter.com/2014/09/29/source-disclosed-%E2%89%A0-open-source/
57
+ recorded_at: Mon, 06 Jul 2015 05:07:53 GMT
58
+ - request:
59
+ method: head
60
+ uri: http://ben.balter.com/2014/09/29/source-disclosed-%E2%89%A0-open-source/
61
+ body:
62
+ encoding: US-ASCII
63
+ string: ''
64
+ headers:
65
+ User-Agent:
66
+ - Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
67
+ response:
68
+ status:
69
+ code: 200
70
+ message: OK
71
+ headers:
72
+ Server:
73
+ - GitHub.com
74
+ Content-Type:
75
+ - text/html; charset=utf-8
76
+ Last-Modified:
77
+ - Sat, 04 Jul 2015 14:06:15 GMT
78
+ Access-Control-Allow-Origin:
79
+ - "*"
80
+ Expires:
81
+ - Mon, 06 Jul 2015 05:17:53 GMT
82
+ Cache-Control:
83
+ - max-age=600
84
+ Content-Length:
85
+ - '13402'
86
+ Accept-Ranges:
87
+ - bytes
88
+ Date:
89
+ - Mon, 06 Jul 2015 05:07:53 GMT
90
+ Via:
91
+ - 1.1 varnish
92
+ Age:
93
+ - '0'
94
+ Connection:
95
+ - keep-alive
96
+ X-Served-By:
97
+ - cache-lax1434-LAX
98
+ X-Cache:
99
+ - MISS
100
+ X-Cache-Hits:
101
+ - '0'
102
+ X-Timer:
103
+ - S1436159273.405799,VS0,VE68
104
+ Vary:
105
+ - Accept-Encoding
106
+ body:
107
+ encoding: UTF-8
108
+ string: ''
109
+ http_version: '1.1'
110
+ adapter_metadata:
111
+ effective_url: http://ben.balter.com/2014/09/29/source-disclosed-%E2%89%A0-open-source/
112
+ recorded_at: Mon, 06 Jul 2015 05:07:53 GMT
113
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: http://www.asdo3irj395295jsingrkrg4.com/asdo3IRJ.js
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
12
+ response:
13
+ status:
14
+ code: 0
15
+ message:
16
+ headers: {}
17
+ body:
18
+ encoding: UTF-8
19
+ string: ''
20
+ http_version:
21
+ adapter_metadata:
22
+ effective_url: http://www.asdo3irj395295jsingrkrg4.com/asdo3IRJ.js
23
+ recorded_at: Mon, 06 Jul 2015 05:08:12 GMT
24
+ - request:
25
+ method: get
26
+ uri: http://www.asdo3irj395295jsingrkrg4.com/asdo3IRJ.js
27
+ body:
28
+ encoding: US-ASCII
29
+ string: ''
30
+ headers:
31
+ User-Agent:
32
+ - Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
33
+ response:
34
+ status:
35
+ code: 0
36
+ message:
37
+ headers: {}
38
+ body:
39
+ encoding: UTF-8
40
+ string: ''
41
+ http_version:
42
+ adapter_metadata:
43
+ effective_url: http://www.asdo3irj395295jsingrkrg4.com/asdo3IRJ.js
44
+ recorded_at: Mon, 06 Jul 2015 05:08:12 GMT
45
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,244 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: http://upload.wikimedia.org/wikipedia/en/thumb/fooooof.png
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
12
+ response:
13
+ status:
14
+ code: 301
15
+ message: TLS Redirect
16
+ headers:
17
+ Server:
18
+ - Varnish
19
+ Location:
20
+ - https://upload.wikimedia.org/wikipedia/en/thumb/fooooof.png
21
+ Content-Length:
22
+ - '0'
23
+ Accept-Ranges:
24
+ - bytes
25
+ Date:
26
+ - Mon, 06 Jul 2015 05:07:30 GMT
27
+ X-Varnish:
28
+ - '1435679284'
29
+ Age:
30
+ - '0'
31
+ Via:
32
+ - 1.1 varnish
33
+ Connection:
34
+ - close
35
+ X-Cache:
36
+ - cp1099 frontend miss (0)
37
+ Access-Control-Allow-Origin:
38
+ - "*"
39
+ Access-Control-Expose-Headers:
40
+ - Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish
41
+ Timing-Allow-Origin:
42
+ - "*"
43
+ body:
44
+ encoding: UTF-8
45
+ string: ''
46
+ http_version: '1.1'
47
+ adapter_metadata:
48
+ effective_url: http://upload.wikimedia.org/wikipedia/en/thumb/fooooof.png
49
+ recorded_at: Mon, 06 Jul 2015 05:07:30 GMT
50
+ - request:
51
+ method: head
52
+ uri: http://upload.wikimedia.org/wikipedia/en/thumb/not_here.png
53
+ body:
54
+ encoding: US-ASCII
55
+ string: ''
56
+ headers:
57
+ User-Agent:
58
+ - Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
59
+ response:
60
+ status:
61
+ code: 301
62
+ message: TLS Redirect
63
+ headers:
64
+ Server:
65
+ - Varnish
66
+ Location:
67
+ - https://upload.wikimedia.org/wikipedia/en/thumb/not_here.png
68
+ Content-Length:
69
+ - '0'
70
+ Accept-Ranges:
71
+ - bytes
72
+ Date:
73
+ - Mon, 06 Jul 2015 05:07:30 GMT
74
+ X-Varnish:
75
+ - '3079602659'
76
+ Age:
77
+ - '0'
78
+ Via:
79
+ - 1.1 varnish
80
+ Connection:
81
+ - close
82
+ X-Cache:
83
+ - cp1073 frontend miss (0)
84
+ Access-Control-Allow-Origin:
85
+ - "*"
86
+ Access-Control-Expose-Headers:
87
+ - Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish
88
+ Timing-Allow-Origin:
89
+ - "*"
90
+ body:
91
+ encoding: UTF-8
92
+ string: ''
93
+ http_version: '1.1'
94
+ adapter_metadata:
95
+ effective_url: http://upload.wikimedia.org/wikipedia/en/thumb/not_here.png
96
+ recorded_at: Mon, 06 Jul 2015 05:07:30 GMT
97
+ - request:
98
+ method: get
99
+ uri: http://upload.wikimedia.org/wikipedia/en/thumb/not_here.png
100
+ body:
101
+ encoding: US-ASCII
102
+ string: ''
103
+ headers:
104
+ User-Agent:
105
+ - Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
106
+ response:
107
+ status:
108
+ code: 301
109
+ message: TLS Redirect
110
+ headers:
111
+ Server:
112
+ - Varnish
113
+ Location:
114
+ - https://upload.wikimedia.org/wikipedia/en/thumb/not_here.png
115
+ Content-Length:
116
+ - '0'
117
+ Accept-Ranges:
118
+ - bytes
119
+ Date:
120
+ - Mon, 06 Jul 2015 05:07:30 GMT
121
+ X-Varnish:
122
+ - '2488600998'
123
+ Age:
124
+ - '0'
125
+ Via:
126
+ - 1.1 varnish
127
+ Connection:
128
+ - close
129
+ X-Cache:
130
+ - cp1049 frontend miss (0)
131
+ Access-Control-Allow-Origin:
132
+ - "*"
133
+ Access-Control-Expose-Headers:
134
+ - Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish
135
+ Timing-Allow-Origin:
136
+ - "*"
137
+ body:
138
+ encoding: UTF-8
139
+ string: ''
140
+ http_version: '1.1'
141
+ adapter_metadata:
142
+ effective_url: http://upload.wikimedia.org/wikipedia/en/thumb/not_here.png
143
+ recorded_at: Mon, 06 Jul 2015 05:07:30 GMT
144
+ - request:
145
+ method: head
146
+ uri: https://help.github.com/changing-author-info/
147
+ body:
148
+ encoding: US-ASCII
149
+ string: ''
150
+ headers:
151
+ User-Agent:
152
+ - Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
153
+ response:
154
+ status:
155
+ code: 200
156
+ message: OK
157
+ headers:
158
+ Server:
159
+ - GitHub.com
160
+ Content-Type:
161
+ - text/html; charset=utf-8
162
+ Last-Modified:
163
+ - Mon, 06 Jul 2015 03:57:12 GMT
164
+ Access-Control-Allow-Origin:
165
+ - "*"
166
+ Expires:
167
+ - Mon, 06 Jul 2015 05:17:30 GMT
168
+ Cache-Control:
169
+ - max-age=600
170
+ Content-Length:
171
+ - '458'
172
+ Accept-Ranges:
173
+ - bytes
174
+ Date:
175
+ - Mon, 06 Jul 2015 05:07:30 GMT
176
+ Via:
177
+ - 1.1 varnish
178
+ Age:
179
+ - '0'
180
+ Connection:
181
+ - keep-alive
182
+ X-Served-By:
183
+ - cache-sjc3129-SJC
184
+ X-Cache:
185
+ - MISS
186
+ X-Cache-Hits:
187
+ - '0'
188
+ Vary:
189
+ - Accept-Encoding
190
+ body:
191
+ encoding: UTF-8
192
+ string: ''
193
+ http_version: '1.1'
194
+ adapter_metadata:
195
+ effective_url: https://help.github.com/changing-author-info/
196
+ recorded_at: Mon, 06 Jul 2015 05:07:31 GMT
197
+ - request:
198
+ method: get
199
+ uri: http://upload.wikimedia.org/wikipedia/en/thumb/fooooof.png
200
+ body:
201
+ encoding: US-ASCII
202
+ string: ''
203
+ headers:
204
+ User-Agent:
205
+ - Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
206
+ response:
207
+ status:
208
+ code: 301
209
+ message: TLS Redirect
210
+ headers:
211
+ Server:
212
+ - Varnish
213
+ Location:
214
+ - https://upload.wikimedia.org/wikipedia/en/thumb/fooooof.png
215
+ Content-Length:
216
+ - '0'
217
+ Accept-Ranges:
218
+ - bytes
219
+ Date:
220
+ - Mon, 06 Jul 2015 05:07:30 GMT
221
+ X-Varnish:
222
+ - '1166051818'
223
+ Age:
224
+ - '0'
225
+ Via:
226
+ - 1.1 varnish
227
+ Connection:
228
+ - close
229
+ X-Cache:
230
+ - cp1051 frontend miss (0)
231
+ Access-Control-Allow-Origin:
232
+ - "*"
233
+ Access-Control-Expose-Headers:
234
+ - Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish
235
+ Timing-Allow-Origin:
236
+ - "*"
237
+ body:
238
+ encoding: UTF-8
239
+ string: ''
240
+ http_version: '1.1'
241
+ adapter_metadata:
242
+ effective_url: http://upload.wikimedia.org/wikipedia/en/thumb/fooooof.png
243
+ recorded_at: Mon, 06 Jul 2015 05:07:31 GMT
244
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,73 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: www.github.com
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
12
+ response:
13
+ status:
14
+ code: 200
15
+ message: OK
16
+ headers:
17
+ Server:
18
+ - GitHub.com
19
+ Date:
20
+ - Mon, 06 Jul 2015 05:10:25 GMT
21
+ Content-Type:
22
+ - text/html; charset=utf-8
23
+ Status:
24
+ - 200 OK
25
+ Content-Security-Policy:
26
+ - 'default-src *; script-src assets-cdn.github.com collector-cdn.github.com;
27
+ object-src assets-cdn.github.com; style-src ''self'' ''unsafe-inline'' ''unsafe-eval''
28
+ assets-cdn.github.com; img-src ''self'' data: assets-cdn.github.com identicons.github.com
29
+ www.google-analytics.com collector.githubapp.com *.githubusercontent.com *.gravatar.com
30
+ *.wp.com; media-src ''none''; frame-src ''self'' render.githubusercontent.com
31
+ gist.github.com www.youtube.com player.vimeo.com checkout.paypal.com; font-src
32
+ assets-cdn.github.com; connect-src ''self'' live.github.com wss://live.github.com
33
+ uploads.github.com status.github.com api.github.com www.google-analytics.com
34
+ github-cloud.s3.amazonaws.com'
35
+ Public-Key-Pins:
36
+ - max-age=300; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="JbQbUG5JMJUoI6brnx0x3vZF6jilxsapbXGVfjhN8Fg=";
37
+ includeSubDomains
38
+ Cache-Control:
39
+ - no-cache
40
+ Vary:
41
+ - X-PJAX
42
+ - Accept-Encoding
43
+ X-UA-Compatible:
44
+ - IE=Edge,chrome=1
45
+ Set-Cookie:
46
+ - logged_in=no; domain=.github.com; path=/; expires=Fri, 06 Jul 2035 05:10:25
47
+ -0000; secure; HttpOnly
48
+ - _gh_sess=eyJzZXNzaW9uX2lkIjoiNzA3ZmQzMmVhNGE1NDQ4YzUxOGFkMjZkMjk4YThiMjkiLCJfY3NyZl90b2tlbiI6IklTYjRZRUh5dWhra3M3SXRKU0RMVVNTTzYwOXc0MEhSQS85bnJmWCtwT2M9In0%3D--598600b6d119d1c5da32745e013cf915e81b53bf;
49
+ path=/; secure; HttpOnly
50
+ X-Request-Id:
51
+ - 223cae55bc9682cb3b30c3a559c5d2aa
52
+ X-Runtime:
53
+ - '0.009497'
54
+ X-GitHub-Request-Id:
55
+ - 490F8465:506F:2609878:559A0DC0
56
+ Strict-Transport-Security:
57
+ - max-age=31536000; includeSubdomains; preload
58
+ X-Content-Type-Options:
59
+ - nosniff
60
+ X-XSS-Protection:
61
+ - 1; mode=block
62
+ X-Frame-Options:
63
+ - deny
64
+ X-Served-By:
65
+ - a0387c52951b3c2853740ef9cede1dec
66
+ body:
67
+ encoding: UTF-8
68
+ string: ''
69
+ http_version: '1.1'
70
+ adapter_metadata:
71
+ effective_url: https://github.com/
72
+ recorded_at: Mon, 06 Jul 2015 05:10:25 GMT
73
+ recorded_with: VCR 2.9.3