html-proofer 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,56 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: https://help.github.com/articles/searching-issues#no
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
+ - Mon, 06 Jul 2015 03:57:13 GMT
23
+ Access-Control-Allow-Origin:
24
+ - "*"
25
+ Expires:
26
+ - Mon, 06 Jul 2015 05:18:07 GMT
27
+ Cache-Control:
28
+ - max-age=600
29
+ Content-Length:
30
+ - '29824'
31
+ Accept-Ranges:
32
+ - bytes
33
+ Date:
34
+ - Mon, 06 Jul 2015 05:08:07 GMT
35
+ Via:
36
+ - 1.1 varnish
37
+ Age:
38
+ - '0'
39
+ Connection:
40
+ - keep-alive
41
+ X-Served-By:
42
+ - cache-sjc3121-SJC
43
+ X-Cache:
44
+ - MISS
45
+ X-Cache-Hits:
46
+ - '0'
47
+ Vary:
48
+ - Accept-Encoding
49
+ body:
50
+ encoding: UTF-8
51
+ string: ''
52
+ http_version: '1.1'
53
+ adapter_metadata:
54
+ effective_url: https://help.github.com/articles/searching-issues/
55
+ recorded_at: Mon, 06 Jul 2015 05:08:07 GMT
56
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,96 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: http://www.asdo3irj395295jsingrkrg4.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: 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/
23
+ recorded_at: Mon, 06 Jul 2015 05:07:53 GMT
24
+ - request:
25
+ method: get
26
+ uri: http://www.asdo3irj395295jsingrkrg4.com/
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/
44
+ recorded_at: Mon, 06 Jul 2015 05:07:53 GMT
45
+ - request:
46
+ method: head
47
+ uri: http://www.google.com/
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ User-Agent:
53
+ - Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
54
+ response:
55
+ status:
56
+ code: 200
57
+ message: OK
58
+ headers:
59
+ Date:
60
+ - Mon, 06 Jul 2015 05:07:53 GMT
61
+ Expires:
62
+ - "-1"
63
+ Cache-Control:
64
+ - private, max-age=0
65
+ Content-Type:
66
+ - text/html; charset=UTF-8
67
+ P3P:
68
+ - CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657
69
+ for more info."
70
+ Server:
71
+ - gws
72
+ X-XSS-Protection:
73
+ - 1; mode=block
74
+ X-Frame-Options:
75
+ - SAMEORIGIN
76
+ Set-Cookie:
77
+ - PREF=ID=1111111111111111:FF=0:TM=1436159273:LM=1436159273:V=1:S=L7AYhOwAU0NaEkaR;
78
+ expires=Wed, 05-Jul-2017 05:07:53 GMT; path=/; domain=.google.com
79
+ - NID=69=oaJ62-bDo0SNFTD49vFrs3d1HUFvrR9NW98mIgA6NF5TUtidfFFRiVrrBcU7pC9P2rVJwQhLqR_dvOBu94zpC6hfP6LYH8I4X6vbB8ZuZMkIsLB4H2-OmTd8CFWm4asU;
80
+ expires=Tue, 05-Jan-2016 05:07:53 GMT; path=/; domain=.google.com; HttpOnly
81
+ Alternate-Protocol:
82
+ - 80:quic,p=0
83
+ Transfer-Encoding:
84
+ - chunked
85
+ Accept-Ranges:
86
+ - none
87
+ Vary:
88
+ - Accept-Encoding
89
+ body:
90
+ encoding: UTF-8
91
+ string: ''
92
+ http_version: '1.1'
93
+ adapter_metadata:
94
+ effective_url: http://www.google.com/
95
+ recorded_at: Mon, 06 Jul 2015 05:07:53 GMT
96
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,156 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: http://rtyley.github.io/bfg-repo-cleaner/#usage
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
+ - Tue, 28 Apr 2015 15:43:28 GMT
23
+ Access-Control-Allow-Origin:
24
+ - "*"
25
+ Expires:
26
+ - Mon, 06 Jul 2015 05:18:02 GMT
27
+ Cache-Control:
28
+ - max-age=600
29
+ Content-Length:
30
+ - '16521'
31
+ Accept-Ranges:
32
+ - bytes
33
+ Date:
34
+ - Mon, 06 Jul 2015 05:08:02 GMT
35
+ Via:
36
+ - 1.1 varnish
37
+ Age:
38
+ - '0'
39
+ Connection:
40
+ - keep-alive
41
+ X-Served-By:
42
+ - cache-sjc3129-SJC
43
+ X-Cache:
44
+ - MISS
45
+ X-Cache-Hits:
46
+ - '0'
47
+ X-Timer:
48
+ - S1436159282.742022,VS0,VE148
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://rtyley.github.io/bfg-repo-cleaner/
57
+ recorded_at: Mon, 06 Jul 2015 05:08:03 GMT
58
+ - request:
59
+ method: head
60
+ uri: http://jekyllrb.com/docs/configuration/#markdown-options
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
+ Date:
75
+ - Mon, 06 Jul 2015 05:08:03 GMT
76
+ Content-Type:
77
+ - text/html; charset=utf-8
78
+ Content-Length:
79
+ - '56749'
80
+ Last-Modified:
81
+ - Wed, 20 May 2015 06:17:48 GMT
82
+ Access-Control-Allow-Origin:
83
+ - "*"
84
+ Expires:
85
+ - Mon, 06 Jul 2015 05:18:03 GMT
86
+ Cache-Control:
87
+ - max-age=600
88
+ Accept-Ranges:
89
+ - bytes
90
+ body:
91
+ encoding: UTF-8
92
+ string: ''
93
+ http_version: '1.1'
94
+ adapter_metadata:
95
+ effective_url: http://jekyllrb.com/docs/configuration/
96
+ recorded_at: Mon, 06 Jul 2015 05:08:03 GMT
97
+ - request:
98
+ method: head
99
+ uri: http://en.wikipedia.org/wiki/Phase-locked_loop#Clock_generation
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: 200
109
+ message: OK
110
+ headers:
111
+ Server:
112
+ - nginx/1.9.2
113
+ Date:
114
+ - Mon, 06 Jul 2015 05:08:03 GMT
115
+ Content-Type:
116
+ - text/html; charset=UTF-8
117
+ Connection:
118
+ - keep-alive
119
+ X-Content-Type-Options:
120
+ - nosniff
121
+ X-Powered-By:
122
+ - HHVM/3.6.1
123
+ Content-language:
124
+ - en
125
+ X-UA-Compatible:
126
+ - IE=Edge
127
+ Vary:
128
+ - Accept-Encoding,Cookie
129
+ Last-Modified:
130
+ - Fri, 26 Jun 2015 22:53:16 GMT
131
+ X-Varnish:
132
+ - 3815777312 3795371646, 3831112198 3825044843
133
+ Via:
134
+ - 1.1 varnish, 1.1 varnish
135
+ Age:
136
+ - '17798'
137
+ X-Cache:
138
+ - cp1067 hit (6), cp1055 frontend hit (4)
139
+ Strict-Transport-Security:
140
+ - max-age=31536000
141
+ Cache-Control:
142
+ - private, s-maxage=0, max-age=0, must-revalidate
143
+ Set-Cookie:
144
+ - GeoIP=:::::v6; Path=/; Domain=.wikipedia.org
145
+ - WMF-Last-Access=06-Jul-2015;Path=/;HttpOnly;Expires=Fri, 07 Aug 2015 00:00:00
146
+ GMT
147
+ X-Analytics:
148
+ - page_id=41548;ns=0;https=1
149
+ body:
150
+ encoding: UTF-8
151
+ string: ''
152
+ http_version: '1.1'
153
+ adapter_metadata:
154
+ effective_url: https://en.wikipedia.org/wiki/Phase-locked_loop
155
+ recorded_at: Mon, 06 Jul 2015 05:08:04 GMT
156
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,50 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: https://developers.google.com/university
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
+ Strict-Transport-Security:
18
+ - max-age=31536000; includeSubdomains
19
+ X-Content-Type-Options:
20
+ - nosniff
21
+ Content-Language:
22
+ - en
23
+ Expires:
24
+ - Mon, 06 Jul 2015 06:07:50 GMT
25
+ Vary:
26
+ - Accept-Language
27
+ Last-Modified:
28
+ - Wed, 20 May 2015 15:23:14 GMT
29
+ Cache-Control:
30
+ - must_revalidate, public, max-age=3600
31
+ X-Frame-Options:
32
+ - SAMEORIGIN
33
+ Content-Type:
34
+ - text/html; charset=utf-8
35
+ Date:
36
+ - Mon, 06 Jul 2015 05:07:50 GMT
37
+ Server:
38
+ - Google Frontend
39
+ Alternate-Protocol:
40
+ - 443:quic,p=1
41
+ Transfer-Encoding:
42
+ - chunked
43
+ body:
44
+ encoding: UTF-8
45
+ string: ''
46
+ http_version: '1.1'
47
+ adapter_metadata:
48
+ effective_url: https://developers.google.com/university/
49
+ recorded_at: Mon, 06 Jul 2015 05:07:50 GMT
50
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,40 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: https://blog.patternsinthevoid.net/
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
+ Set-Cookie:
18
+ - TRACKID=cdfbe67e17b35ca53b2cd0adef854ba1; Path=/; Version=1
19
+ Content-Type:
20
+ - text/html; charset=utf-8
21
+ Accept-Ranges:
22
+ - bytes
23
+ ETag:
24
+ - '"2287405067"'
25
+ Last-Modified:
26
+ - Fri, 19 Jun 2015 22:27:15 GMT
27
+ Content-Length:
28
+ - '33026'
29
+ Date:
30
+ - Mon, 06 Jul 2015 05:08:05 GMT
31
+ Server:
32
+ - fuck your bits
33
+ body:
34
+ encoding: UTF-8
35
+ string: ''
36
+ http_version: '1.1'
37
+ adapter_metadata:
38
+ effective_url: https://blog.patternsinthevoid.net/
39
+ recorded_at: Mon, 06 Jul 2015 05:08:05 GMT
40
+ recorded_with: VCR 2.9.3
@@ -0,0 +1,52 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: head
5
+ uri: https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400
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
+ Content-Type:
18
+ - text/css
19
+ Access-Control-Allow-Origin:
20
+ - "*"
21
+ Timing-Allow-Origin:
22
+ - "*"
23
+ Expires:
24
+ - Mon, 06 Jul 2015 05:07:48 GMT
25
+ Date:
26
+ - Mon, 06 Jul 2015 05:07:48 GMT
27
+ Cache-Control:
28
+ - private, max-age=86400
29
+ X-Content-Type-Options:
30
+ - nosniff
31
+ X-Frame-Options:
32
+ - SAMEORIGIN
33
+ X-XSS-Protection:
34
+ - 1; mode=block
35
+ Server:
36
+ - GSE
37
+ Alternate-Protocol:
38
+ - 443:quic,p=1
39
+ Transfer-Encoding:
40
+ - chunked
41
+ Accept-Ranges:
42
+ - none
43
+ Vary:
44
+ - Accept-Encoding
45
+ body:
46
+ encoding: UTF-8
47
+ string: ''
48
+ http_version: '1.1'
49
+ adapter_metadata:
50
+ effective_url: https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400
51
+ recorded_at: Mon, 06 Jul 2015 05:07:49 GMT
52
+ recorded_with: VCR 2.9.3