html-proofer 1.5.1 → 1.5.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c622a3354112dd4ac8d59a58292741dc24a150d
4
- data.tar.gz: b8307e82ef4e1ae216fca8abc1b94bb803ba4d42
3
+ metadata.gz: edf96e9bdedd63b9b700d52bae4dd93d0b17c393
4
+ data.tar.gz: bcfcc2e0cf7563cebc1fbd0a7f991e10a83f63ad
5
5
  SHA512:
6
- metadata.gz: c8b3ba745f522ff5f93978eb9f487b328b8da581d8780120cfe8fd553cf5e0a065186371e0f1db142da901b62a8d7785e258f7a0103a53ebb3126964b30aef9f
7
- data.tar.gz: fd978b7e7cbca7c92f7e2b181f94f4750ae4301d53d7e5ae8c1c561998c22f05d4f0e1425d22dcf03b2b3ee08aa35ba9984d00176ac4b0a7b38b9a0360a1e7f7
6
+ metadata.gz: 608cc7ce5c9612b126510d17338b7cd36cc8aa70bcc26c7c4d460ebb5b0ca9c1c2bc6c80e6401dfd2371478bf4149cdcd2d0b40da6348a9853e00f652335bafc
7
+ data.tar.gz: e592af9119c26b3d9ea83e4fa7ab2d96c49456fbabe4e0e78acc221b135bb997397862ce86d428a3a0c0b07ee7d4f9e53f95d5063155b03f893bb051aa0fa964
@@ -67,6 +67,7 @@ class Links < ::HTML::Proofer::Checks::Check
67
67
  # does the file even exist?
68
68
  if link.remote?
69
69
  add_to_external_urls link.href
70
+ next
70
71
  elsif !link.internal?
71
72
  self.add_issue "internally linking to #{link.href}, which does not exist" unless link.exists?
72
73
  end
@@ -79,9 +80,7 @@ class Links < ::HTML::Proofer::Checks::Check
79
80
 
80
81
  # verify the target hash
81
82
  if link.hash
82
- if link.remote?
83
- add_to_external_urls link.href
84
- elsif link.internal?
83
+ if link.internal?
85
84
  self.add_issue "linking to internal hash ##{link.hash} that does not exist" unless hash_check @html, link.hash
86
85
  elsif link.external?
87
86
  unless link.exists?
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Proofer
3
- VERSION = "1.5.1"
3
+ VERSION = "1.5.2"
4
4
  end
5
5
  end
@@ -0,0 +1 @@
1
+ <a href="https://help.github.com/articles/generating-ssh-keys#step-3-add-your-ssh-key-to-github">add ssh</a>
@@ -288,4 +288,10 @@ describe "Links test" do
288
288
  proofer = make_proofer(fixture)
289
289
  expect(proofer.failed_tests).to eq []
290
290
  end
291
+
292
+ it "does not dupe errors" do
293
+ fixture = "#{FIXTURES_DIR}/links/nodupe.html"
294
+ proofer = make_proofer(fixture)
295
+ expect(proofer.failed_tests.length).to eq 1
296
+ end
291
297
  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: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-11 00:00:00.000000000 Z
11
+ date: 2014-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mercenary
@@ -262,6 +262,7 @@ files:
262
262
  - spec/html/proofer/fixtures/links/mailto_link.html
263
263
  - spec/html/proofer/fixtures/links/missingLinkHref.html
264
264
  - spec/html/proofer/fixtures/links/multipleProblems.html
265
+ - spec/html/proofer/fixtures/links/nodupe.html
265
266
  - spec/html/proofer/fixtures/links/non_standard_characters.html
266
267
  - spec/html/proofer/fixtures/links/notarealhash.html
267
268
  - spec/html/proofer/fixtures/links/other_protocols.html
@@ -397,6 +398,7 @@ test_files:
397
398
  - spec/html/proofer/fixtures/links/mailto_link.html
398
399
  - spec/html/proofer/fixtures/links/missingLinkHref.html
399
400
  - spec/html/proofer/fixtures/links/multipleProblems.html
401
+ - spec/html/proofer/fixtures/links/nodupe.html
400
402
  - spec/html/proofer/fixtures/links/non_standard_characters.html
401
403
  - spec/html/proofer/fixtures/links/notarealhash.html
402
404
  - spec/html/proofer/fixtures/links/other_protocols.html