sslcheck 0.9.2 → 0.9.3

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: 1c3ce9df50f1a9a75dfb026a443247e70f2af5c0
4
- data.tar.gz: bc183a64ea589568f9040b5e1b3472ebd3b898e1
3
+ metadata.gz: e95e8af9f709c97fc7821e5b9dedecd95ef01e0c
4
+ data.tar.gz: 961224561da2b1bf950543eb879ec4f68dfe19ea
5
5
  SHA512:
6
- metadata.gz: e09b4272a3cbc40320f2e5d99d1bcebc8b5a94abdb0be054f5fb7964b68072923d071045e125a9c4bd80a7f99a30e8836a36e6cfbce3ac2759352cd1a3cfe8c0
7
- data.tar.gz: db41d48b91c4beabf136608d2b94290403d9e95d63fe5efc50dcd38ade28b1a732d882d0b603f9720a5585cdd0d344edf0f94678e485be2b54c3a0134519d762
6
+ metadata.gz: c91f73a624a7008bb6ac5dccc17142c91584026f6746373f1aa7f686104ecc58d202f6677e4902e1fdf75ef7c99b7c7930ba69d4a5f0f99bc1b69c1a72dea175
7
+ data.tar.gz: c0ffd510d900404be65cb5b1ae1451a92ed18cf2c5dbc5364f4c72a9da49e9bac44d3d3aeb8030defc3e10eb87dc102aadae66dc2a45ae70d857b6034901a948
@@ -39,6 +39,14 @@ module SSLCheck
39
39
  end
40
40
  end
41
41
 
42
+ context "When the URL is not a real TLD or gTLD" do
43
+ it 'should raise a connection error' do
44
+ sut = Client.new
45
+ response = sut.get("https://www.domain.does.not.exist.aljdahkqhb")
46
+ expect(response.errors.first).to be_a(SSLCheck::Errors::Connection::SocketError)
47
+ end
48
+ end
49
+
42
50
  context "When the URL is malformed" do
43
51
  it 'should raise an invalid URI error' do
44
52
  sut = Client.new
@@ -49,6 +49,8 @@ module SSLCheck
49
49
  end
50
50
 
51
51
  @socket.sysclose
52
+ rescue SocketError
53
+ @response.errors << SSLCheck::Errors::Connection::SocketError.new({:name => "Connection Error", :type => :socket_error, :message => "The connection to #{url} failed."})
52
54
  rescue URI::InvalidURIError
53
55
  @response.errors << SSLCheck::Errors::Connection::InvalidURI.new({:name => "Invalid URI Error", :type => :invalid_uri, :message => "The URI, #{url}, is not a valid URI."})
54
56
  rescue OpenSSL::SSL::SSLError
@@ -3,6 +3,7 @@ module SSLCheck
3
3
  module Connection
4
4
  class InvalidURI < GenericError; end
5
5
  class SSLVerify < GenericError; end
6
+ class SocketError < GenericError; end
6
7
  end
7
8
 
8
9
  module Validation
@@ -1,3 +1,3 @@
1
1
  module SSLCheck
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sslcheck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clayton Lengel-Zigich