html-proofer 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/lib/html/proofer/checks/links.rb +1 -1
  3. metadata +5 -168
  4. data/.gitignore +0 -26
  5. data/.travis.yml +0 -6
  6. data/Gemfile +0 -3
  7. data/LICENSE.txt +0 -22
  8. data/README.md +0 -177
  9. data/Rakefile +0 -8
  10. data/html-proofer.gemspec +0 -28
  11. data/spec/html/proofer/favicon_spec.rb +0 -46
  12. data/spec/html/proofer/fixtures/favicon/favicon_absent.html +0 -4
  13. data/spec/html/proofer/fixtures/favicon/favicon_absent_apple.html +0 -7
  14. data/spec/html/proofer/fixtures/favicon/favicon_broken.html +0 -7
  15. data/spec/html/proofer/fixtures/favicon/favicon_broken_but_ignored.html +0 -7
  16. data/spec/html/proofer/fixtures/favicon/favicon_present.html +0 -7
  17. data/spec/html/proofer/fixtures/favicon/favicon_present_shortcut.html +0 -7
  18. data/spec/html/proofer/fixtures/images/existingImageExternal.html +0 -9
  19. data/spec/html/proofer/fixtures/images/gpl.png +0 -0
  20. data/spec/html/proofer/fixtures/images/ignorableAltViaOptions.html +0 -13
  21. data/spec/html/proofer/fixtures/images/ignorableImages.html +0 -10
  22. data/spec/html/proofer/fixtures/images/ignoreAltButNotLink.html +0 -13
  23. data/spec/html/proofer/fixtures/images/image_missing_protocol_invalid.html +0 -9
  24. data/spec/html/proofer/fixtures/images/image_missing_protocol_valid.html +0 -9
  25. data/spec/html/proofer/fixtures/images/missingImageAlt.html +0 -9
  26. data/spec/html/proofer/fixtures/images/missingImageAltText.html +0 -9
  27. data/spec/html/proofer/fixtures/images/missingImageExternal.html +0 -9
  28. data/spec/html/proofer/fixtures/images/missingImageInternal.html +0 -9
  29. data/spec/html/proofer/fixtures/images/missingImageSrc.html +0 -9
  30. data/spec/html/proofer/fixtures/images/relativeToSelf.html +0 -2
  31. data/spec/html/proofer/fixtures/images/rootRelativeImages.html +0 -2
  32. data/spec/html/proofer/fixtures/images/terribleImageName.html +0 -9
  33. data/spec/html/proofer/fixtures/images/workingDataURIImage.html +0 -3
  34. data/spec/html/proofer/fixtures/links/anchors_in_pre.html +0 -12
  35. data/spec/html/proofer/fixtures/links/blank_mailto_link.html +0 -9
  36. data/spec/html/proofer/fixtures/links/blank_tel_link.html +0 -9
  37. data/spec/html/proofer/fixtures/links/brokenHashExternal.html +0 -11
  38. data/spec/html/proofer/fixtures/links/brokenHashInternal.html +0 -14
  39. data/spec/html/proofer/fixtures/links/brokenInternalLink.html +0 -0
  40. data/spec/html/proofer/fixtures/links/brokenLinkExternal.html +0 -11
  41. data/spec/html/proofer/fixtures/links/brokenLinkInternal.html +0 -10
  42. data/spec/html/proofer/fixtures/links/brokenLinkWithNumber.html +0 -8
  43. data/spec/html/proofer/fixtures/links/checkSSLLinks.html +0 -1
  44. data/spec/html/proofer/fixtures/links/folder/anchorLink.html +0 -0
  45. data/spec/html/proofer/fixtures/links/folder/assets/barrel.png +0 -0
  46. data/spec/html/proofer/fixtures/links/folder/index.html +0 -0
  47. data/spec/html/proofer/fixtures/links/folder/relativeImage.html +0 -2
  48. data/spec/html/proofer/fixtures/links/gpl.png +0 -0
  49. data/spec/html/proofer/fixtures/links/head_link_href.html +0 -7
  50. data/spec/html/proofer/fixtures/links/head_link_href_absent.html +0 -7
  51. data/spec/html/proofer/fixtures/links/head_link_href_empty.html +0 -7
  52. data/spec/html/proofer/fixtures/links/ignorableLinks.html +0 -13
  53. data/spec/html/proofer/fixtures/links/ignorableLinksViaOptions.html +0 -13
  54. data/spec/html/proofer/fixtures/links/index.html +0 -1
  55. data/spec/html/proofer/fixtures/links/javascript_link.html +0 -9
  56. data/spec/html/proofer/fixtures/links/linkToFolder.html +0 -9
  57. data/spec/html/proofer/fixtures/links/linkTranslatedViaHrefSwap.html +0 -9
  58. data/spec/html/proofer/fixtures/links/linkWithHttps.html +0 -9
  59. data/spec/html/proofer/fixtures/links/linkWithRedirect.html +0 -12
  60. data/spec/html/proofer/fixtures/links/link_directory_without_slash.html +0 -1
  61. data/spec/html/proofer/fixtures/links/link_missing_protocol_invalid.html +0 -9
  62. data/spec/html/proofer/fixtures/links/link_missing_protocol_valid.html +0 -9
  63. data/spec/html/proofer/fixtures/links/links_in_pre.html +0 -13
  64. data/spec/html/proofer/fixtures/links/mailto_link.html +0 -9
  65. data/spec/html/proofer/fixtures/links/missingLinkHref.html +0 -9
  66. data/spec/html/proofer/fixtures/links/multipleProblems.html +0 -11
  67. data/spec/html/proofer/fixtures/links/notarealhash.html +0 -0
  68. data/spec/html/proofer/fixtures/links/relativeLinks.html +0 -4
  69. data/spec/html/proofer/fixtures/links/rootLink.html +0 -10
  70. data/spec/html/proofer/fixtures/links/tel_link.html +0 -9
  71. data/spec/html/proofer/fixtures/resources/Screen Shot 2012-08-09 at 7.51.18 AM.png +0 -0
  72. data/spec/html/proofer/fixtures/resources/books/assets/getting-good-with-git.jpg +0 -0
  73. data/spec/html/proofer/fixtures/resources/books/assets/pro-git.jpg +0 -0
  74. data/spec/html/proofer/fixtures/resources/books/assets/version-control-with-git.jpg +0 -0
  75. data/spec/html/proofer/fixtures/resources/books/nestedRelativeImages.html +0 -5
  76. data/spec/html/proofer/fixtures/resources/gpl.png +0 -0
  77. data/spec/html/proofer/fixtures/scripts/script.js +0 -1
  78. data/spec/html/proofer/fixtures/scripts/script_broken_external.html +0 -9
  79. data/spec/html/proofer/fixtures/scripts/script_content.html +0 -9
  80. data/spec/html/proofer/fixtures/scripts/script_content_absent.html +0 -9
  81. data/spec/html/proofer/fixtures/scripts/script_in_pre.html +0 -5
  82. data/spec/html/proofer/fixtures/scripts/script_missing_internal.html +0 -9
  83. data/spec/html/proofer/fixtures/scripts/script_valid_internal.html +0 -9
  84. data/spec/html/proofer/images_spec.rb +0 -98
  85. data/spec/html/proofer/links_spec.rb +0 -192
  86. data/spec/html/proofer/scripts_spec.rb +0 -41
  87. data/spec/html/proofer_spec.rb +0 -12
  88. data/spec/spec_helper.rb +0 -30
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
3
-
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- task :default => :spec
data/html-proofer.gemspec DELETED
@@ -1,28 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.name = "html-proofer"
6
- gem.version = "1.1.4"
7
- gem.authors = ["Garen Torikian"]
8
- gem.email = ["gjtorikian@gmail.com"]
9
- gem.description = %q{Test your rendered HTML files to make sure they're accurate.}
10
- gem.summary = %q{A set of tests to validate your HTML output. These tests check if your image references are legitimate, if they have alt tags, if your internal links are working, and so on. It's intended to be an all-in-one checker for your documentation output.}
11
- gem.homepage = "https://github.com/gjtorikian/html-proofer"
12
- gem.license = "MIT"
13
- gem.executables = ["htmlproof"]
14
- gem.files = `git ls-files`.split($/)
15
- gem.test_files = gem.files.grep(%r{^(spec)/})
16
- gem.require_paths = ["lib"]
17
-
18
- gem.add_dependency "mercenary", "~> 0.3.2"
19
- gem.add_dependency "nokogiri", "~> 1.6.0"
20
- gem.add_dependency "colored", "~> 1.2"
21
- gem.add_dependency "typhoeus", "~> 0.6.7"
22
- gem.add_dependency "yell", "~> 2.0"
23
-
24
- gem.add_development_dependency "html-pipeline", "~> 1.8"
25
- gem.add_development_dependency "escape_utils", "~> 1.0" # Ruby 2.1 fix
26
- gem.add_development_dependency "rspec", "~> 2.13.0"
27
- gem.add_development_dependency "rake"
28
- end
@@ -1,46 +0,0 @@
1
- require "spec_helper"
2
-
3
- describe "Favicons test" do
4
- it "ignores for absent favicon by default" do
5
- absent = "#{FIXTURES_DIR}/favicon/favicon_absent.html"
6
- output = capture_stderr { HTML::Proofer.new(absent).run }
7
- output.should == ""
8
- end
9
-
10
- it "fails for absent favicon" do
11
- absent = "#{FIXTURES_DIR}/favicon/favicon_absent.html"
12
- output = capture_stderr { HTML::Proofer.new(absent, {:favicon => true}).run }
13
- output.should match /no favicon specified/
14
- end
15
-
16
- it "fails for absent favicon but present apple touch icon" do
17
- absent = "#{FIXTURES_DIR}/favicon/favicon_absent_apple.html"
18
- output = capture_stderr { HTML::Proofer.new(absent, {:favicon => true}).run }
19
- output.should match /no favicon specified/
20
- end
21
-
22
- it "fails for broken favicon" do
23
- broken = "#{FIXTURES_DIR}/favicon/favicon_broken.html"
24
- output = capture_stderr { HTML::Proofer.new(broken, {:favicon => true}).run }
25
- output.should match /internally linking to asdadaskdalsdk.png/
26
- end
27
-
28
- it "passes for present favicon" do
29
- present = "#{FIXTURES_DIR}/favicon/favicon_present.html"
30
- output = capture_stderr { HTML::Proofer.new(present, {:favicon => true}).run }
31
- output.should == ""
32
- end
33
-
34
- it "passes for present favicon with shortcut notation" do
35
- present = "#{FIXTURES_DIR}/favicon/favicon_present_shortcut.html"
36
- output = capture_stderr { HTML::Proofer.new(present, {:favicon => true}).run }
37
- output.should == ""
38
- end
39
-
40
- it "passes for broken favicon with data-proofer-ignore" do
41
- broken_but_ignored = "#{FIXTURES_DIR}/favicon/favicon_broken_but_ignored.html"
42
- output = capture_stderr { HTML::Proofer.new(broken_but_ignored, {:favicon => true}).run }
43
- output.should == ""
44
- end
45
-
46
- end
@@ -1,4 +0,0 @@
1
- <html>
2
- <body>
3
- </body>
4
- </html>
@@ -1,7 +0,0 @@
1
- <html>
2
- <head>
3
- <link rel="apple-touch-icon" href="gpl.png">
4
- </head>
5
- <body>
6
- </body>
7
- </html>
@@ -1,7 +0,0 @@
1
- <html>
2
- <head>
3
- <link rel="icon" href="asdadaskdalsdk.png">
4
- </head>
5
- <body>
6
- </body>
7
- </html>
@@ -1,7 +0,0 @@
1
- <html>
2
- <head>
3
- <link rel="icon" href="asdadaskdalsdk.png" data-proofer-ignore>
4
- </head>
5
- <body>
6
- </body>
7
- </html>
@@ -1,7 +0,0 @@
1
- <html>
2
- <head>
3
- <link rel="icon" href="../resources/gpl.png">
4
- </head>
5
- <body>
6
- </body>
7
- </html>
@@ -1,7 +0,0 @@
1
- <html>
2
- <head>
3
- <link rel="shortcut icon" href="../resources/gpl.png">
4
- </head>
5
- <body>
6
- </body>
7
- </html>
@@ -1,9 +0,0 @@
1
- <html>
2
-
3
- <body>
4
-
5
- <p>Blah blah blah. <img alt="An existing image" src="http://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>
@@ -1,13 +0,0 @@
1
- <html>
2
-
3
- <body>
4
-
5
-
6
- <img src="gpl.png"/>Relative to self
7
-
8
-
9
- <p>Blah blah blah. <img src="//upload.wikimedia.org/wikipedia/en/thumb/2/22/Heckert_GNU_white.svg/256px-Heckert_GNU_white.svg.png" /> </p>
10
-
11
- </body>
12
-
13
- </html>
@@ -1,10 +0,0 @@
1
- <html>
2
-
3
- <body>
4
-
5
- <p>Blah blah blah. <img alt="A broken image" src="http://www.whatthehell" data-proofer-ignore="true" /> </p>
6
-
7
-
8
- </body>
9
-
10
- </html>
@@ -1,13 +0,0 @@
1
- <html>
2
-
3
- <body>
4
-
5
-
6
- <img src="gpl.png"/>Image.
7
-
8
-
9
- <p>Blah blah blah. <a href="http://www.kakakakakaakkakakakakakakaakakak.biz.foo.net" /> </p>
10
-
11
- </body>
12
-
13
- </html>
@@ -1,9 +0,0 @@
1
- <html>
2
-
3
- <body>
4
-
5
- <p>Blah blah blah. <img alt="An existing image" src="//upload.wikimedia.org/wikipedia/en/thumb/fooooof.png" /> </p>
6
-
7
- </body>
8
-
9
- </html>
@@ -1,9 +0,0 @@
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>
@@ -1,9 +0,0 @@
1
- <html>
2
-
3
- <body>
4
-
5
- <p>Blah blah blah. <img src="./gpl.png" /> </p>
6
-
7
- </body>
8
-
9
- </html>
@@ -1,9 +0,0 @@
1
- <html>
2
-
3
- <body>
4
-
5
- <p>Blah blah blah. <img src="./gpl.png" alt/> </p>
6
-
7
- </body>
8
-
9
- </html>
@@ -1,9 +0,0 @@
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>
@@ -1,9 +0,0 @@
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>
@@ -1,9 +0,0 @@
1
- <html>
2
-
3
- <body>
4
-
5
- <p>Blah blah blah. <img alt="A broken image" src="" /> </p>
6
-
7
- </body>
8
-
9
- </html>
@@ -1,2 +0,0 @@
1
-
2
- <img alt="sure thing" src="gpl.png"/>Relative to self
@@ -1,2 +0,0 @@
1
-
2
- <img alt="sure thing" src="/gpl.png"/>Relative to root
@@ -1,9 +0,0 @@
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>
@@ -1,3 +0,0 @@
1
- <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA
2
- AAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO
3
- 9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
@@ -1,12 +0,0 @@
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>
@@ -1,9 +0,0 @@
1
- <html>
2
-
3
- <body>
4
-
5
- <a href="mailto:">Mail me</a>
6
-
7
- </body>
8
-
9
- </html>
@@ -1,9 +0,0 @@
1
- <html>
2
-
3
- <body>
4
-
5
- <a href="tel:">Tel me</a>
6
-
7
- </body>
8
-
9
- </html>
@@ -1,11 +0,0 @@
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>
@@ -1,14 +0,0 @@
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>
@@ -1,11 +0,0 @@
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>
@@ -1,10 +0,0 @@
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>
@@ -1,8 +0,0 @@
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>
@@ -1 +0,0 @@
1
- <a href="https://developers.google.com/university">Some link</a>
File without changes
@@ -1,2 +0,0 @@
1
-
2
- <ing alt="sure thing" src="assets/barrel.png">Folder relative to self</a>
@@ -1,7 +0,0 @@
1
- <html>
2
- <head>
3
- <link rel="icon" href="gpl.png">
4
- </head>
5
- <body>
6
- </body>
7
- </html>
@@ -1,7 +0,0 @@
1
- <html>
2
- <head>
3
- <link rel="icon">
4
- </head>
5
- <body>
6
- </body>
7
- </html>
@@ -1,7 +0,0 @@
1
- <html>
2
- <head>
3
- <link rel="icon" href="">
4
- </head>
5
- <body>
6
- </body>
7
- </html>