html-proofer 1.1.5 → 1.1.6

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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +26 -0
  3. data/.travis.yml +6 -0
  4. data/Gemfile +3 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +177 -0
  7. data/Rakefile +8 -0
  8. data/html-proofer.gemspec +28 -0
  9. data/spec/html/proofer/favicon_spec.rb +46 -0
  10. data/spec/html/proofer/fixtures/favicon/favicon_absent.html +4 -0
  11. data/spec/html/proofer/fixtures/favicon/favicon_absent_apple.html +7 -0
  12. data/spec/html/proofer/fixtures/favicon/favicon_broken.html +7 -0
  13. data/spec/html/proofer/fixtures/favicon/favicon_broken_but_ignored.html +7 -0
  14. data/spec/html/proofer/fixtures/favicon/favicon_present.html +7 -0
  15. data/spec/html/proofer/fixtures/favicon/favicon_present_shortcut.html +7 -0
  16. data/spec/html/proofer/fixtures/images/existingImageExternal.html +9 -0
  17. data/spec/html/proofer/fixtures/images/gpl.png +0 -0
  18. data/spec/html/proofer/fixtures/images/ignorableAltViaOptions.html +13 -0
  19. data/spec/html/proofer/fixtures/images/ignorableImages.html +10 -0
  20. data/spec/html/proofer/fixtures/images/ignoreAltButNotLink.html +13 -0
  21. data/spec/html/proofer/fixtures/images/image_missing_protocol_invalid.html +9 -0
  22. data/spec/html/proofer/fixtures/images/image_missing_protocol_valid.html +9 -0
  23. data/spec/html/proofer/fixtures/images/missingImageAlt.html +9 -0
  24. data/spec/html/proofer/fixtures/images/missingImageAltText.html +9 -0
  25. data/spec/html/proofer/fixtures/images/missingImageExternal.html +9 -0
  26. data/spec/html/proofer/fixtures/images/missingImageInternal.html +9 -0
  27. data/spec/html/proofer/fixtures/images/missingImageSrc.html +9 -0
  28. data/spec/html/proofer/fixtures/images/relativeToSelf.html +2 -0
  29. data/spec/html/proofer/fixtures/images/rootRelativeImages.html +2 -0
  30. data/spec/html/proofer/fixtures/images/terribleImageName.html +9 -0
  31. data/spec/html/proofer/fixtures/images/workingDataURIImage.html +3 -0
  32. data/spec/html/proofer/fixtures/links/anchors_in_pre.html +12 -0
  33. data/spec/html/proofer/fixtures/links/blank_mailto_link.html +9 -0
  34. data/spec/html/proofer/fixtures/links/blank_tel_link.html +9 -0
  35. data/spec/html/proofer/fixtures/links/brokenHashExternal.html +11 -0
  36. data/spec/html/proofer/fixtures/links/brokenHashInternal.html +14 -0
  37. data/spec/html/proofer/fixtures/links/brokenInternalLink.html +0 -0
  38. data/spec/html/proofer/fixtures/links/brokenLinkExternal.html +11 -0
  39. data/spec/html/proofer/fixtures/links/brokenLinkInternal.html +10 -0
  40. data/spec/html/proofer/fixtures/links/brokenLinkWithNumber.html +8 -0
  41. data/spec/html/proofer/fixtures/links/checkSSLLinks.html +1 -0
  42. data/spec/html/proofer/fixtures/links/folder/anchorLink.html +0 -0
  43. data/spec/html/proofer/fixtures/links/folder/assets/barrel.png +0 -0
  44. data/spec/html/proofer/fixtures/links/folder/index.html +0 -0
  45. data/spec/html/proofer/fixtures/links/folder/relativeImage.html +2 -0
  46. data/spec/html/proofer/fixtures/links/gpl.png +0 -0
  47. data/spec/html/proofer/fixtures/links/head_link_href.html +7 -0
  48. data/spec/html/proofer/fixtures/links/head_link_href_absent.html +7 -0
  49. data/spec/html/proofer/fixtures/links/head_link_href_empty.html +7 -0
  50. data/spec/html/proofer/fixtures/links/ignorableLinks.html +13 -0
  51. data/spec/html/proofer/fixtures/links/ignorableLinksViaOptions.html +13 -0
  52. data/spec/html/proofer/fixtures/links/index.html +1 -0
  53. data/spec/html/proofer/fixtures/links/javascript_link.html +9 -0
  54. data/spec/html/proofer/fixtures/links/linkToFolder.html +9 -0
  55. data/spec/html/proofer/fixtures/links/linkTranslatedViaHrefSwap.html +9 -0
  56. data/spec/html/proofer/fixtures/links/linkWithHttps.html +9 -0
  57. data/spec/html/proofer/fixtures/links/linkWithRedirect.html +12 -0
  58. data/spec/html/proofer/fixtures/links/link_directory_without_slash.html +1 -0
  59. data/spec/html/proofer/fixtures/links/link_missing_protocol_invalid.html +9 -0
  60. data/spec/html/proofer/fixtures/links/link_missing_protocol_valid.html +9 -0
  61. data/spec/html/proofer/fixtures/links/links_in_pre.html +13 -0
  62. data/spec/html/proofer/fixtures/links/mailto_link.html +9 -0
  63. data/spec/html/proofer/fixtures/links/missingLinkHref.html +9 -0
  64. data/spec/html/proofer/fixtures/links/multipleProblems.html +11 -0
  65. data/spec/html/proofer/fixtures/links/notarealhash.html +0 -0
  66. data/spec/html/proofer/fixtures/links/relativeLinks.html +4 -0
  67. data/spec/html/proofer/fixtures/links/rootLink.html +10 -0
  68. data/spec/html/proofer/fixtures/links/tel_link.html +9 -0
  69. data/spec/html/proofer/fixtures/resources/Screen Shot 2012-08-09 at 7.51.18 AM.png +0 -0
  70. data/spec/html/proofer/fixtures/resources/books/assets/getting-good-with-git.jpg +0 -0
  71. data/spec/html/proofer/fixtures/resources/books/assets/pro-git.jpg +0 -0
  72. data/spec/html/proofer/fixtures/resources/books/assets/version-control-with-git.jpg +0 -0
  73. data/spec/html/proofer/fixtures/resources/books/nestedRelativeImages.html +5 -0
  74. data/spec/html/proofer/fixtures/resources/gpl.png +0 -0
  75. data/spec/html/proofer/fixtures/scripts/script.js +1 -0
  76. data/spec/html/proofer/fixtures/scripts/script_broken_external.html +9 -0
  77. data/spec/html/proofer/fixtures/scripts/script_content.html +9 -0
  78. data/spec/html/proofer/fixtures/scripts/script_content_absent.html +9 -0
  79. data/spec/html/proofer/fixtures/scripts/script_in_pre.html +5 -0
  80. data/spec/html/proofer/fixtures/scripts/script_missing_internal.html +9 -0
  81. data/spec/html/proofer/fixtures/scripts/script_valid_internal.html +9 -0
  82. data/spec/html/proofer/images_spec.rb +98 -0
  83. data/spec/html/proofer/links_spec.rb +192 -0
  84. data/spec/html/proofer/scripts_spec.rb +41 -0
  85. data/spec/html/proofer_spec.rb +12 -0
  86. data/spec/spec_helper.rb +30 -0
  87. metadata +166 -3
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <img alt="An existing image" src="//upload.wikimedia.org/wikipedia/en/thumb/2/22/Heckert_GNU_white.svg/256px-Heckert_GNU_white.svg.png" /> </p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <img src="./gpl.png" /> </p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <img src="./gpl.png" alt/> </p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <img alt="A broken image" src="http://www.whatthehell" /> </p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <img alt="A broken image" src="./doesnotexist.png" /> </p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <img alt="A broken image" src="" /> </p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,2 @@
1
+
2
+ <img alt="sure thing" src="gpl.png"/>Relative to self
@@ -0,0 +1,2 @@
1
+
2
+ <img alt="sure thing" src="/gpl.png"/>Relative to root
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <img src="./Screen Shot 2012-08-09 at 7.51.18 AM.png" alt="textbox"/> </p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,3 @@
1
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
2
+ AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
3
+ 9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
@@ -0,0 +1,12 @@
1
+ <pre>
2
+
3
+ <a href="http://www.asdo3IRJ395295jsingrkrg4.com">broken link!</a>
4
+ </pre>
5
+
6
+
7
+ <code>
8
+
9
+
10
+ <a href="http://www.asdo3IRJ395295jsingrkrg4.com">broken link!</a>
11
+
12
+ </code>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <a href="mailto:">Mail me</a>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <a href="tel:">Tel me</a>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,11 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a href="./notarealhash.html#noHash">Not a real file, don't even bother with hash!</a></p>
6
+ <p>Blah blah blah. <a href="../images/missingImageAlt.html#asdfasfdkafl">A real file, not a real hash!</a></p>
7
+ <a href="./brokenLinkInternal.html#safeHash">At last, a real hash link.</a>
8
+
9
+ </body>
10
+
11
+ </html>
@@ -0,0 +1,14 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a href="#noHash">Not a real hash!</a></p>
6
+ <p>Blah blah blah. <a href="./brokenInternalLink.html#safeHash">A real link!</a></p>
7
+ <a href="#myID">Let's go to the header, though.</a>
8
+
9
+
10
+ <a id="myID"></a>
11
+ <h1>Fake header.</h1>
12
+ </body>
13
+
14
+ </html>
@@ -0,0 +1,11 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a href="http://www.google.com">Working link!</a></p>
6
+
7
+
8
+ <a href="http://www.asdo3IRJ395295jsingrkrg4.com">broken link!</a>
9
+ </body>
10
+
11
+ </html>
@@ -0,0 +1,10 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a href="./notreal.html">Not a real link!</a></p>
6
+ <p id="safeHash">Blah blah blah. <a href="./missingImageAlt.html">A real link!</a></p>
7
+
8
+ </body>
9
+
10
+ </html>
@@ -0,0 +1,8 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a class="anchor" href="#25-method-not-allowed"><span class="mini-icon mini-icon-link"></span></a>25 Method not allowed</h4></p>
6
+ </body>
7
+
8
+ </html>
@@ -0,0 +1 @@
1
+ <a href="https://developers.google.com/university">Some link</a>
@@ -0,0 +1,2 @@
1
+
2
+ <ing alt="sure thing" src="assets/barrel.png">Folder relative to self</a>
@@ -0,0 +1,7 @@
1
+ <html>
2
+ <head>
3
+ <link rel="icon" href="gpl.png">
4
+ </head>
5
+ <body>
6
+ </body>
7
+ </html>
@@ -0,0 +1,7 @@
1
+ <html>
2
+ <head>
3
+ <link rel="icon">
4
+ </head>
5
+ <body>
6
+ </body>
7
+ </html>
@@ -0,0 +1,7 @@
1
+ <html>
2
+ <head>
3
+ <link rel="icon" href="">
4
+ </head>
5
+ <body>
6
+ </body>
7
+ </html>
@@ -0,0 +1,13 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <a href="http://www.asdo3IRJ395295jsingrkrg4.com" data-proofer-ignore="true">broken link!</a>
6
+
7
+ <a href="#anadaasdadsadschor" data-proofer-ignore=true>Anchor relative to nothing</a>
8
+
9
+ <a href="../whaadadt.html" data-proofer-ignore>Relative to nothing</a>
10
+
11
+ </body>
12
+
13
+ </html>
@@ -0,0 +1,13 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <a href="http://www.asdo3IRJ395295jsingrkrg4.com">broken link!</a>
6
+
7
+ <a href="#anadaasdadsadschor">Anchor relative to nothing</a>
8
+
9
+ <a href="../whaadadt.html">Relative to nothing</a>
10
+
11
+ </body>
12
+
13
+ </html>
@@ -0,0 +1 @@
1
+ <h1 id="anchor">root.</a>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <a href="javascript:if(typeof WZXYxe58==typeof alert)WZXYxe58();(function(){var s=document.createElement('link');s.setAttribute('href','/static/css/dyslexia.css');s.setAttribute('rel','stylesheet');s.setAttribute('type','text/css');document.getElementsByTagName('head')[0].appendChild(s);})();">Click me</a>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a href="folder/">A pretty permlaink!</a></p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <a href="/articles/linkToFolder">A real file, but the href should change!</a>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a href="https://github.com/octocat/Spoon-Knife/issues">An HTTPS link!</a></p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,12 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a href="http://github.github.com/github-flavored-markdown/">This is a redirect.</a>. </p>
6
+
7
+ <p>Blah blah blah. <a href="https://help.github.com/changing-author-info/">This is another redirect.</a>. </p>
8
+
9
+ <p>Blah blah blah. <a href="http://timclem.wordpress.com/2012/03/01/mind-the-end-of-your-line/">This is a third redirect.</a>. </p>
10
+ </body>
11
+
12
+ </html>
@@ -0,0 +1 @@
1
+ <a href="folder">Folder</a>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a href="//fofofo.biz.woo">An unreal link!</a></p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a href="//github.com/octocat/Spoon-Knife/issues">An HTTPS link!</a></p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,13 @@
1
+
2
+ <pre>
3
+
4
+ <link rel="icon" href="">
5
+ </pre>
6
+
7
+
8
+ <code>
9
+
10
+
11
+ <link rel="icon" href="">
12
+
13
+ </code>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <a href="mailto:whatever@whoever.com">Mail me</a>.
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a href="">No link, man</a></p>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,11 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <a href="http://www.asdo3IRJ395295jsingrkrg4.com" data-proofer-ignore="true">broken link!</a>
6
+
7
+ <a href="#anadaasdadsadschor">Anchor relative to nothing</a>
8
+
9
+ </body>
10
+
11
+ </html>
@@ -0,0 +1,4 @@
1
+ <a href="/index.html">Relative to root</a>
2
+ <a href="index.html">Relative to self</a>
3
+ <a href="folder/">Folder relative to self</a>
4
+ <a href="index.html#anchor">Anchor relative to self</a>
@@ -0,0 +1,10 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <p>Blah blah blah. <a href="/">I am root.</a></p>
6
+ <p>Blah blah blah. <a href="/folder">I am relative to root.</a></p>
7
+
8
+ </body>
9
+
10
+ </html>
@@ -0,0 +1,9 @@
1
+ <html>
2
+
3
+ <body>
4
+
5
+ <a href="tel:441234567,88">+44-1234-567 ext.88</a>
6
+
7
+ </body>
8
+
9
+ </html>
@@ -0,0 +1,5 @@
1
+ <img src="assets/pro-git.jpg" alt="Pro Git">
2
+
3
+ <img src="assets/getting-good-with-git.jpg" alt="Getting Good with Git">
4
+
5
+ <img src="assets/version-control-with-git.jpg" alt="Version Control with Git, 2nd Edition">