httpclient 2.2.0.1 → 2.2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/httpclient.rb +17 -1
- data/lib/httpclient/cacert.p7s +12 -12
- data/lib/httpclient/cacert_sha1.p7s +12 -12
- data/lib/httpclient/util.rb +8 -8
- metadata +2 -2
data/lib/httpclient.rb
CHANGED
@@ -229,7 +229,7 @@ require 'httpclient/cookie'
|
|
229
229
|
# ruby -rhttpclient -e 'p HTTPClient.head(ARGV.shift).header["last-modified"]' http://dev.ctor.org/
|
230
230
|
#
|
231
231
|
class HTTPClient
|
232
|
-
VERSION = '2.2.0.
|
232
|
+
VERSION = '2.2.0.2'
|
233
233
|
RUBY_VERSION_STRING = "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
|
234
234
|
/: (\S+) (\S+)/ =~ %q$Id$
|
235
235
|
LIB_NAME = "(#{$1}/#{$2}, #{RUBY_VERSION_STRING})"
|
@@ -389,6 +389,22 @@ class HTTPClient
|
|
389
389
|
@follow_redirect_count = 10
|
390
390
|
load_environment
|
391
391
|
self.proxy = proxy if proxy
|
392
|
+
keep_webmock_compat
|
393
|
+
end
|
394
|
+
|
395
|
+
# webmock 1.6.2 depends on HTTP::Message#body.content to work.
|
396
|
+
# let's keep it work iif webmock is loaded for a while.
|
397
|
+
def keep_webmock_compat
|
398
|
+
if respond_to?(:do_get_block_with_webmock)
|
399
|
+
::HTTP::Message.module_eval do
|
400
|
+
def body
|
401
|
+
def (o = self.content).content
|
402
|
+
self
|
403
|
+
end
|
404
|
+
o
|
405
|
+
end
|
406
|
+
end
|
407
|
+
end
|
392
408
|
end
|
393
409
|
|
394
410
|
# Returns debug device if exists. See debug_dev=.
|
data/lib/httpclient/cacert.p7s
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
MIME-Version: 1.0
|
2
|
-
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha1"; boundary="----
|
2
|
+
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha1"; boundary="----FD1775D1D9127483D5635511E610AF67"
|
3
3
|
|
4
4
|
This is an S/MIME signed message
|
5
5
|
|
6
|
-
------
|
6
|
+
------FD1775D1D9127483D5635511E610AF67
|
7
7
|
-----BEGIN CERTIFICATE-----
|
8
8
|
MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEU
|
9
9
|
MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
|
@@ -1813,7 +1813,7 @@ lRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4mJO3
|
|
1813
1813
|
7M2CYfE45k+XmCpajQ==
|
1814
1814
|
-----END CERTIFICATE-----
|
1815
1815
|
|
1816
|
-
------
|
1816
|
+
------FD1775D1D9127483D5635511E610AF67
|
1817
1817
|
Content-Type: application/pkcs7-signature; name="smime.p7s"
|
1818
1818
|
Content-Transfer-Encoding: base64
|
1819
1819
|
Content-Disposition: attachment; filename="smime.p7s"
|
@@ -1843,16 +1843,16 @@ BO7mpwMLMIdsjTvnkx2b/WEokIPiXr2Hcnc6FEgRQ8l8ec+8znC2LILZ1wT2K3AT
|
|
1843
1843
|
o3whsSOELB++JcWKxWsM3/6llkYx/rtlpjGCAiswggInAgEBMFAwSzELMAkGA1UE
|
1844
1844
|
BhMCSlAxETAPBgNVBAoMCGN0b3Iub3JnMRQwEgYDVQQLDAtEZXZlbG9wbWVudDET
|
1845
1845
|
MBEGA1UEAwwKaHR0cGNsaWVudAIBATAJBgUrDgMCGgUAoIGxMBgGCSqGSIb3DQEJ
|
1846
|
-
|
1846
|
+
AzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTExMDQxOTEzMTk1MFowIwYJ
|
1847
1847
|
KoZIhvcNAQkEMRYEFB6px2QzZcvvEHTjt2rAmZJQzfDEMFIGCSqGSIb3DQEJDzFF
|
1848
1848
|
MEMwCgYIKoZIhvcNAwcwDgYIKoZIhvcNAwICAgCAMA0GCCqGSIb3DQMCAgFAMAcG
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1849
|
+
BSsOAwIHMA0GCCqGSIb3DQMCAgEoMA0GCSqGSIb3DQEBAQUABIIBAD4EMqXaqm6w
|
1850
|
+
loVOMuk2Etbhp9jBFykE3fOB5WUTTkEH9sgI04Ajoc6CBjud97ngG+WVfK9JK1zG
|
1851
|
+
D5uEI+8IV5l4N38kzV/CJ3oomMtXlwPvzXYXcHeN3FAPcNwHxKSswMEOyCmn1Xh7
|
1852
|
+
3UBvJBiMuqZfCuM63n0ozj5fiYCBUUnhX3fb2pcmswhO8PDEuA2XoYS5sLAmqA20
|
1853
|
+
4mklFS4ejN1dmWcJY+cHaS45+pYfzFXtZDaOR7WU+vYIydMoTxBOgVbrjnlciZc0
|
1854
|
+
eomLCA65FMf8adnS658gfqzstjp7Sq81G7uniUQdipK4BA6uU+Qeg0LRbMSaV4VG
|
1855
|
+
8ML4DnOTXME=
|
1856
1856
|
|
1857
|
-
------
|
1857
|
+
------FD1775D1D9127483D5635511E610AF67--
|
1858
1858
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
MIME-Version: 1.0
|
2
|
-
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha1"; boundary="----
|
2
|
+
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha1"; boundary="----A7A3ED9F71494B934F978FF49CCFDAA8"
|
3
3
|
|
4
4
|
This is an S/MIME signed message
|
5
5
|
|
6
|
-
------
|
6
|
+
------A7A3ED9F71494B934F978FF49CCFDAA8
|
7
7
|
-----BEGIN CERTIFICATE-----
|
8
8
|
MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEU
|
9
9
|
MBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3
|
@@ -1813,7 +1813,7 @@ lRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4mJO3
|
|
1813
1813
|
7M2CYfE45k+XmCpajQ==
|
1814
1814
|
-----END CERTIFICATE-----
|
1815
1815
|
|
1816
|
-
------
|
1816
|
+
------A7A3ED9F71494B934F978FF49CCFDAA8
|
1817
1817
|
Content-Type: application/pkcs7-signature; name="smime.p7s"
|
1818
1818
|
Content-Transfer-Encoding: base64
|
1819
1819
|
Content-Disposition: attachment; filename="smime.p7s"
|
@@ -1843,16 +1843,16 @@ YMEtiMT3acFCZEjamCfXIcfLu6Jr7dYc6bvZqLd8tKkKFy01dOSEXIgHtDsthHbv
|
|
1843
1843
|
t9v4ZZy8AJlYcuqOLLbIs9nL0lnCcKLjITGCAiswggInAgEBMFAwSzELMAkGA1UE
|
1844
1844
|
BhMCSlAxETAPBgNVBAoMCGN0b3Iub3JnMRQwEgYDVQQLDAtEZXZlbG9wbWVudDET
|
1845
1845
|
MBEGA1UEAwwKaHR0cGNsaWVudAIBAjAJBgUrDgMCGgUAoIGxMBgGCSqGSIb3DQEJ
|
1846
|
-
|
1846
|
+
AzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTExMDQxOTEzMjAwNFowIwYJ
|
1847
1847
|
KoZIhvcNAQkEMRYEFB6px2QzZcvvEHTjt2rAmZJQzfDEMFIGCSqGSIb3DQEJDzFF
|
1848
1848
|
MEMwCgYIKoZIhvcNAwcwDgYIKoZIhvcNAwICAgCAMA0GCCqGSIb3DQMCAgFAMAcG
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1849
|
+
BSsOAwIHMA0GCCqGSIb3DQMCAgEoMA0GCSqGSIb3DQEBAQUABIIBACVjHueimi/s
|
1850
|
+
rHZxaiZMz45S2uXLynpAco67tGw/iguWTk3hKHQ3Dwp2iFmqIYaAPjNeYt/eV7qr
|
1851
|
+
A+3DVL64tTxSvnNU/lgFOTmq1p8jITrKwdVYBvwWaSNURvTy3bpt3W962hdfmqAL
|
1852
|
+
CXOdo7h7nXL5haHLFPPw4Hca9Z9mFpM6x1fIjSk/zSRo2W1RgXxva/4F2LKHREcD
|
1853
|
+
OPfDbTN517z7u+mQ/J7D+4JU8zLQZA8khM0JF/PhuKzy2PxPqrEREZcx+EFy3JHA
|
1854
|
+
Q6Fdof6LYHrDEZppOrEtJB7UVhoQ1Ksw25T9dMjB2PqLK3hafUtC10iOAQxIfEDH
|
1855
|
+
ANx4tC98GH8=
|
1856
1856
|
|
1857
|
-
------
|
1857
|
+
------A7A3ED9F71494B934F978FF49CCFDAA8--
|
1858
1858
|
|
data/lib/httpclient/util.rb
CHANGED
@@ -42,10 +42,10 @@ class HTTPClient
|
|
42
42
|
# end
|
43
43
|
#
|
44
44
|
def keyword_argument(args, *field)
|
45
|
-
if args.size == 1 and args[0]
|
46
|
-
|
47
|
-
|
48
|
-
return
|
45
|
+
if args.size == 1 and Hash === args[0]
|
46
|
+
h = args[0]
|
47
|
+
if field.any? { |f| h.key?(f) }
|
48
|
+
return h.values_at(*field)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
args
|
@@ -60,10 +60,10 @@ class HTTPClient
|
|
60
60
|
# includes defined keys.
|
61
61
|
def argument_to_hash(args, *field)
|
62
62
|
return nil if args.empty?
|
63
|
-
if args.size == 1 and args[0]
|
64
|
-
|
65
|
-
|
66
|
-
return
|
63
|
+
if args.size == 1 and Hash === args[0]
|
64
|
+
h = args[0]
|
65
|
+
if field.any? { |f| h.key?(f) }
|
66
|
+
return h
|
67
67
|
end
|
68
68
|
end
|
69
69
|
h = {}
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: httpclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 2.2.0.
|
5
|
+
version: 2.2.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- NAKAMURA, Hiroshi
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-04-
|
13
|
+
date: 2011-04-25 00:00:00 Z
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description:
|