manticore 0.5.1-java → 0.5.2-java
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +4 -2
- data/lib/manticore.rb +3 -0
- data/lib/manticore/client.rb +6 -1
- data/lib/manticore/response.rb +6 -0
- data/lib/manticore/version.rb +1 -1
- data/spec/manticore/client_spec.rb +8 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cad5f48dc039ab74b4f2b3fa2b89dd89d191e698
|
4
|
+
data.tar.gz: 073c3ffc96fd07f1f890dbd92941402499e78231
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51eb9d51f07dbed5c006ced4e136790c1332aef91ed4ba0fe2325c30434b9390576ff32e7810dd21e7e809da2d97a02b644a4d2f586999e61265088f4e87b467
|
7
|
+
data.tar.gz: fce752a1928db522306e13b93e673cf5c6f67fd51ff83b7345ba5a3a8562992cd6274b1c383200ef304f7fa913964d4b13969f9e329490fd5d616a37ea540acc
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
## v0.5
|
2
2
|
|
3
|
-
### v0.5.
|
3
|
+
### v0.5.2 (pending)
|
4
4
|
|
5
|
-
|
5
|
+
* Added Client#close to shut down the connection pool.
|
6
|
+
|
7
|
+
### v0.5.1
|
6
8
|
|
7
9
|
* Upgrade to HTTPClient and HTTPCore 4.5
|
8
10
|
* BREAKING CHANGE: Background request usage has changed. See [this commit](https://github.com/cheald/manticore/commit/174e2004d1865c201daf77494d50ab66527c12aa) for details.
|
data/lib/manticore.rb
CHANGED
@@ -27,6 +27,9 @@ module Manticore
|
|
27
27
|
# Is something flat out malformed (bad port number?)
|
28
28
|
class InvalidArgumentException < ManticoreException; end
|
29
29
|
|
30
|
+
# The client has been closed so it's no longer usable
|
31
|
+
class ClientStoppedException < ManticoreException; end
|
32
|
+
|
30
33
|
# Socket breaks, etc
|
31
34
|
class SocketException < ManticoreException; end
|
32
35
|
|
data/lib/manticore/client.rb
CHANGED
@@ -327,6 +327,11 @@ module Manticore
|
|
327
327
|
end
|
328
328
|
end
|
329
329
|
|
330
|
+
# Free resources associated with the CloseableHttpClient
|
331
|
+
def close
|
332
|
+
@client.close if @client
|
333
|
+
end
|
334
|
+
|
330
335
|
# Get at the underlying ExecutorService used to invoke asynchronous calls.
|
331
336
|
def executor
|
332
337
|
create_executor_if_needed
|
@@ -590,7 +595,7 @@ module Manticore
|
|
590
595
|
KEY_EXTRACTION_REGEXP = /(?:^-----BEGIN(.* )PRIVATE KEY-----\n)(.*?)(?:-----END\1PRIVATE KEY.*$)/m
|
591
596
|
def setup_key_store(ssl_options, context)
|
592
597
|
key_store = get_store(:keystore, ssl_options) if ssl_options.key?(:keystore)
|
593
|
-
keystore_password = ssl_options
|
598
|
+
keystore_password = (ssl_options[:keystore_password] || "").to_java.toCharArray
|
594
599
|
|
595
600
|
# Support OpenSSL-style bare X.509 certs with an RSA key
|
596
601
|
# This is really dumb - we have to b64-decode the key ourselves, and we can only support PKCS8
|
data/lib/manticore/response.rb
CHANGED
@@ -61,6 +61,12 @@ module Manticore
|
|
61
61
|
ex = Manticore::ResolutionFailure
|
62
62
|
rescue Java::JavaLang::IllegalArgumentException => e
|
63
63
|
ex = Manticore::InvalidArgumentException
|
64
|
+
rescue Java::JavaLang::IllegalStateException => e
|
65
|
+
if e.message.match(/Connection pool shut down/)
|
66
|
+
ex = Manticore::ClientStoppedException
|
67
|
+
else
|
68
|
+
@exception = e
|
69
|
+
end
|
64
70
|
rescue Java::JavaLang::Exception => e # Handle anything we may have missed from java
|
65
71
|
ex = Manticore::UnknownException
|
66
72
|
rescue StandardError => e
|
data/lib/manticore/version.rb
CHANGED
@@ -602,6 +602,14 @@ describe Manticore::Client do
|
|
602
602
|
end
|
603
603
|
end
|
604
604
|
|
605
|
+
describe "#close" do
|
606
|
+
it "makes the client unusable" do
|
607
|
+
client.close
|
608
|
+
response = client.head(local_server)
|
609
|
+
expect { response.body }.to raise_error(Manticore::ClientStoppedException)
|
610
|
+
end
|
611
|
+
end
|
612
|
+
|
605
613
|
describe "keepalive" do
|
606
614
|
let(:url) { "http://www.facebook.com/" }
|
607
615
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manticore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Chris Heald
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
cnyabLOcGIKZNxvnSfwOuCBnjgoSOyJi/n48n1s+OPB/OmPJoWmhKu2DO4sUb4+K
|
31
31
|
/3Mhp5UWSl9SmDR1
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-
|
33
|
+
date: 2015-12-02 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|