bad_link_finder 0.3.1 → 0.3.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: 8043b2bdbf6388c865a5df0b2df8c3c11d4bfd19
4
- data.tar.gz: bf52e9188c38476b68cf198e92534ea77a2da19b
3
+ metadata.gz: eb79f23c7fabe10bbd9654a4eadfffde34ed2cac
4
+ data.tar.gz: bf8da7c36a356b4bf2281d78a872a897afc2d94a
5
5
  SHA512:
6
- metadata.gz: 67b3140911740a7775053a45f879a065b331422edf99c4820990844967da2efaededcca5873fd8521cdd4b8a8e18df6b007a10e49608652a85179fd7ac914b20
7
- data.tar.gz: a9c53982fb8e726f1df1a248043d58edf122fece52f16e35db8392a8a1b4e13ecee9d4d9e8ea9a819272456115323636bab4f0bb49a405c22529a986dba41a95
6
+ metadata.gz: 97e222a53897c800715cec1c16c322213c9c563cde70aa483abda47aaf99e1ae8c8eefa2659969fc4260f9c8cc9999affdac0d2ff89ad18ff5f0de430653b664
7
+ data.tar.gz: fb7db07dbf3b04e1804c9e3ea555796fa47734dc2e1c2613bab2d7df3a338c9221dae8ce059a253e1f907217a18fdc5f7fade1e15f6736252b0dd01b07c9b10b
@@ -1,4 +1,5 @@
1
1
  require 'mechanize'
2
+ require 'openssl'
2
3
 
3
4
  module BadLinkFinder
4
5
  class Link
@@ -33,6 +34,8 @@ module BadLinkFinder
33
34
  Errno::ECONNRESET, Errno::ETIMEDOUT, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError,
34
35
  Net::ProtocolError, OpenSSL::SSL::SSLError, SocketError => exception # Thanks Net::HTTP
35
36
  record_error("The server failed to serve this page properly", exception)
37
+ rescue Exception => exception
38
+ record_error("Some other exception happened", exception)
36
39
  end
37
40
 
38
41
  def valid?
@@ -49,6 +52,8 @@ module BadLinkFinder
49
52
  browser.user_agent = 'GOV.UK link checker'
50
53
  browser.keep_alive = false
51
54
  browser.history.max_size = 0
55
+ browser.agent.http.verify_mode = OpenSSL::SSL::VERIFY_NONE
56
+ browser.agent.open_timeout = 15
52
57
 
53
58
  if @head_unsupported
54
59
  browser.get(@url)
@@ -1,3 +1,3 @@
1
1
  module BadLinkFinder
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bad_link_finder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliot Crosby-McCullough
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-03 00:00:00.000000000 Z
11
+ date: 2014-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize