html-proofer 0.2.1 → 0.2.2

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: e33429fb9fa389bbbb8468fdd2c0d74b8077dac1
4
- data.tar.gz: d6177bdf7d4bcb8c277145bcf7e475b67d08f4d9
3
+ metadata.gz: 5e5909766c9238ff49f259614dbd5bfff830a920
4
+ data.tar.gz: 3a45a58edf7f65fc01aab97c7a0956832c0a34a0
5
5
  SHA512:
6
- metadata.gz: cb236e1f2aa2bd658d1a5ce002dc9a0f3ddab6e2d345dc40c9741421c2c5234b7e8d1a246455cc5908017fe4548c55a3aec2e0851c4880a48a1183f1a9fc3aee
7
- data.tar.gz: 705dd934e90654fb1e77c76e0c99e0c9c5757720b92071d28d8c206cda6961486b83efa1a27bf4af7ecb02e904243efc688e2c9bc1b0152691bd5da6e7d09caa
6
+ metadata.gz: c00c823d8dc440505d322a25837004746fdc82a0ddc7436ef9124e97482e6c47f3166a2b00df326e1c6b4169379d6baf86b794e15e258bb083e21e581d977de9
7
+ data.tar.gz: 4fa2d40727d56fc2db28d33e65666f5e91a48d1270736d023338eb98e6fc68d8d753dc72dadfa8aa13eadabc9ba3435c42169027ca5a49687a2d582b9386f725
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- html-proofer (0.2.0)
4
+ html-proofer (0.2.2)
5
5
  colored (~> 1.2)
6
6
  nokogiri (= 1.6.0)
7
7
  typhoeus (~> 0.6.3)
@@ -19,7 +19,7 @@ class HTML::Proofer::Checks
19
19
  @options = opts
20
20
  @issues = []
21
21
 
22
- @hydra = Typhoeus::Hydra.hydra
22
+ @hydra = Typhoeus::Hydra.new(:max_concurrency => 15)
23
23
  @additional_href_ignores = @options[:href_ignore] || []
24
24
  end
25
25
 
@@ -46,13 +46,8 @@ class HTML::Proofer::Checks
46
46
  # Could not get an http response, something's wrong.
47
47
  self.add_issue(issue_text + ". #{response.return_message}!")
48
48
  else
49
- if %w(420 503).include?(response.code.to_s)
50
- response = Typhoeus.get(href, {:followlocation => true})
51
- self.add_issue("#{issue_text} HTTP request failed: #{response.code.to_s}") unless response.success?
52
- else
53
- # Received a non-successful http response.
54
- self.add_issue("#{issue_text} HTTP request failed: #{response.code.to_s}")
55
- end
49
+ response_code = response.code.to_s
50
+ self.add_issue("#{issue_text} HTTP request failed: #{response_code}")
56
51
  end
57
52
  end
58
53
  hydra.queue(request)
@@ -43,8 +43,6 @@ class Images < ::HTML::Proofer::Checks::Check
43
43
 
44
44
  # check alt tag
45
45
  self.add_issue "image #{img.src} does not have an alt attribute" unless img.valid_alt_tag?
46
-
47
-
48
46
  end
49
47
  end
50
48
  end
@@ -1,5 +1,5 @@
1
1
  module HTML
2
2
  class Proofer
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
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: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian