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 +4 -4
- data/acceptance/client_spec.rb +8 -0
- data/lib/sslcheck/client.rb +2 -0
- data/lib/sslcheck/validators/errors.rb +1 -0
- data/lib/sslcheck/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e95e8af9f709c97fc7821e5b9dedecd95ef01e0c
|
4
|
+
data.tar.gz: 961224561da2b1bf950543eb879ec4f68dfe19ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c91f73a624a7008bb6ac5dccc17142c91584026f6746373f1aa7f686104ecc58d202f6677e4902e1fdf75ef7c99b7c7930ba69d4a5f0f99bc1b69c1a72dea175
|
7
|
+
data.tar.gz: c0ffd510d900404be65cb5b1ae1451a92ed18cf2c5dbc5364f4c72a9da49e9bac44d3d3aeb8030defc3e10eb87dc102aadae66dc2a45ae70d857b6034901a948
|
data/acceptance/client_spec.rb
CHANGED
@@ -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
|
data/lib/sslcheck/client.rb
CHANGED
@@ -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
|
data/lib/sslcheck/version.rb
CHANGED