html-proofer 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e94fed7b3cb30e272c5de25511ad9604e2a9663
4
- data.tar.gz: d2ba44ef2943e993d69906089e374ae51013ff4b
3
+ metadata.gz: aee485ba8978958d84b407bcba3d7dd82fac38aa
4
+ data.tar.gz: ce729a21fe16f5490b0aebb16b913f82090c75a5
5
5
  SHA512:
6
- metadata.gz: 9f65536fcc74006b51ca34ecc77b048ea59608a2a055c4961afaa086d92c3fe09cc2056de5b7d2a5546f37ec0d6586bec29d1fd7fd05607aaaae3c777cf60172
7
- data.tar.gz: ca131c1f0a7d06da44a40a7e714ece99821102153c158f130d909d226a86347ce10745d87b62954cdf71657188459fffef8b7410a949a5134b0ee9236ead3ec9
6
+ metadata.gz: 2edea8968dabdca93daea01b7e8e0122b99139c710d3fc2ca138c8183dfd31984e39d979332dc62238b5f232e436a00a1b3bf57c5454e67687cb56182172dbeb
7
+ data.tar.gz: bb814a98dcb5d69e38c7b5205d2e504f727192988c3fa96c5df5c9886edcc200b8766c4349b392188f2bf9f0673414f60d4a1348e1eb3a272282d93eac8dd517
@@ -1,56 +1,56 @@
1
1
  # encoding: utf-8
2
2
 
3
- class HTML::Proofer
4
-
5
- # Mostly handles issue management and collecting of external URLs.
6
- class CheckRunner
7
-
8
- attr_reader :issues, :src, :path, :options, :external_urls, :href_ignores, :alt_ignores
9
-
10
- def initialize(src, path, html, opts={})
11
- @src = src
12
- @path = path
13
- @html = remove_ignored(html)
14
- @options = opts
15
- @issues = []
16
- @href_ignores = @options[:href_ignore]
17
- @alt_ignores = @options[:alt_ignore]
18
- @external_urls = {}
19
- end
3
+ module HTML
4
+ class Proofer
5
+ # Mostly handles issue management and collecting of external URLs.
6
+ class CheckRunner
7
+
8
+ attr_reader :issues, :src, :path, :options, :external_urls, :href_ignores, :alt_ignores
9
+
10
+ def initialize(src, path, html, opts={})
11
+ @src = src
12
+ @path = path
13
+ @html = remove_ignored(html)
14
+ @options = opts
15
+ @issues = []
16
+ @href_ignores = @options[:href_ignore]
17
+ @alt_ignores = @options[:alt_ignore]
18
+ @external_urls = {}
19
+ end
20
20
 
21
- def run
22
- fail NotImplementedError, 'HTML::Proofer::CheckRunner subclasses must implement #run'
23
- end
21
+ def run
22
+ fail NotImplementedError, 'HTML::Proofer::CheckRunner subclasses must implement #run'
23
+ end
24
24
 
25
- def add_issue(desc, line_number = nil, status = -1)
26
- @issues << Issue.new(@path, desc, line_number, status)
27
- end
25
+ def add_issue(desc, line_number = nil, status = -1)
26
+ @issues << Issue.new(@path, desc, line_number, status)
27
+ end
28
28
 
29
- def add_to_external_urls(href)
30
- if @external_urls[href]
31
- @external_urls[href] << @path
32
- else
33
- @external_urls[href] = [@path]
29
+ def add_to_external_urls(href)
30
+ if @external_urls[href]
31
+ @external_urls[href] << @path
32
+ else
33
+ @external_urls[href] = [@path]
34
+ end
34
35
  end
35
- end
36
36
 
37
- def self.checks
38
- classes = []
37
+ def self.checks
38
+ classes = []
39
39
 
40
- ObjectSpace.each_object(Class) do |c|
41
- next unless c.superclass == self
42
- classes << c
43
- end
40
+ ObjectSpace.each_object(Class) do |c|
41
+ next unless c.superclass == self
42
+ classes << c
43
+ end
44
44
 
45
- classes
46
- end
45
+ classes
46
+ end
47
47
 
48
- private
48
+ private
49
49
 
50
- def remove_ignored(html)
51
- html.css('code, pre').each(&:unlink)
52
- html
50
+ def remove_ignored(html)
51
+ html.css('code, pre').each(&:unlink)
52
+ html
53
+ end
53
54
  end
54
-
55
55
  end
56
56
  end
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Proofer
3
- VERSION = '2.0.0'
3
+ VERSION = '2.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-proofer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian