html-proofer 2.0.1 → 2.0.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: aee485ba8978958d84b407bcba3d7dd82fac38aa
4
- data.tar.gz: ce729a21fe16f5490b0aebb16b913f82090c75a5
3
+ metadata.gz: 92d3a9b5a60fa16dbdf3fbb0509293481adbb1a8
4
+ data.tar.gz: 49e79fc314857d7e11107559494f5594c19343a3
5
5
  SHA512:
6
- metadata.gz: 2edea8968dabdca93daea01b7e8e0122b99139c710d3fc2ca138c8183dfd31984e39d979332dc62238b5f232e436a00a1b3bf57c5454e67687cb56182172dbeb
7
- data.tar.gz: bb814a98dcb5d69e38c7b5205d2e504f727192988c3fa96c5df5c9886edcc200b8766c4349b392188f2bf9f0673414f60d4a1348e1eb3a272282d93eac8dd517
6
+ metadata.gz: e92076d0ffb93e6c1d22f14867382d2aacdc320993fa97227736293a37c0f372d0043498e0bb0e51fe6f13e2d5798e29d7c9ddbb684d758221da40aa1497d6a4
7
+ data.tar.gz: 51a0029c8f6ba3d930dfae9d5502c6834764fa4beb2898991593c45e615430d4fdf63b6385381ff76bfe14ecf9783ccc56d9805029c0e323684de8cd29458216
@@ -10,11 +10,9 @@ module HTML
10
10
 
11
11
  def initialize(obj, check)
12
12
  obj.attributes.each_pair do |attribute, value|
13
- next if attribute == 'data-proofer-ignore' # TODO: not quite sure why this doesn't work
14
- instance_variable_set("@#{attribute}".to_sym, value.value)
13
+ instance_variable_set("@#{attribute.tr('-', '_')}".to_sym, value.value)
15
14
  end
16
15
 
17
- @data_ignore_proofer = obj['data-proofer-ignore']
18
16
  @content = obj.content
19
17
  @check = check
20
18
  @checked_paths = {}
@@ -66,7 +64,7 @@ module HTML
66
64
  end
67
65
 
68
66
  def ignore?
69
- return true if @data_ignore_proofer
67
+ return true if @data_proofer_ignore
70
68
 
71
69
  case @type
72
70
  when 'FaviconCheckable'
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Proofer
3
- VERSION = '2.0.1'
3
+ VERSION = '2.0.2'
4
4
  end
5
5
  end
@@ -0,0 +1,8 @@
1
+ <a
2
+ id="electriccars"
3
+ data-columns="3"
4
+ data-index-number="12314"
5
+ data-parent="cars"
6
+ href="https://www.github.com">
7
+ Hullo
8
+ </a>
@@ -349,4 +349,10 @@ describe 'Links test' do
349
349
  proofer = run_proofer(fixture)
350
350
  expect(proofer.failed_tests.first).to match(/post.htm\?id=63009224 failed: 404 No error/)
351
351
  end
352
+
353
+ it 'does not complain for files with attributes containing dashes' do
354
+ fixture = "#{FIXTURES_DIR}/links/attributeWithDash.html"
355
+ proofer = run_proofer(fixture)
356
+ expect(proofer.failed_tests).to eq []
357
+ end
352
358
  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: 2.0.1
4
+ version: 2.0.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: 2015-01-29 00:00:00.000000000 Z
11
+ date: 2015-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mercenary
@@ -230,6 +230,7 @@ files:
230
230
  - spec/html/proofer/fixtures/images/workingDataURIImage.html
231
231
  - spec/html/proofer/fixtures/links/_site/folder.html/index.html
232
232
  - spec/html/proofer/fixtures/links/anchors_in_pre.html
233
+ - spec/html/proofer/fixtures/links/attributeWithDash.html
233
234
  - spec/html/proofer/fixtures/links/blank_mailto_link.html
234
235
  - spec/html/proofer/fixtures/links/blank_tel_link.html
235
236
  - spec/html/proofer/fixtures/links/brokenHashExternal.html
@@ -382,6 +383,7 @@ test_files:
382
383
  - spec/html/proofer/fixtures/images/workingDataURIImage.html
383
384
  - spec/html/proofer/fixtures/links/_site/folder.html/index.html
384
385
  - spec/html/proofer/fixtures/links/anchors_in_pre.html
386
+ - spec/html/proofer/fixtures/links/attributeWithDash.html
385
387
  - spec/html/proofer/fixtures/links/blank_mailto_link.html
386
388
  - spec/html/proofer/fixtures/links/blank_tel_link.html
387
389
  - spec/html/proofer/fixtures/links/brokenHashExternal.html