httplog 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 +4 -4
- data/lib/httplog/adapters/httpclient.rb +17 -4
- data/lib/httplog/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62e9129265a40691ce4b016c6883c68d1d3962bb
|
4
|
+
data.tar.gz: 33d81b489ec890a844ead102eb3b475a4e51fdbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f418fcf451cc347381b112ba5433cd1f542e0fe402c137801c6eab9385959666b13e051b62784acf545d767b4a14e0d8994198d53b083e8101d898bcea5322aa
|
7
|
+
data.tar.gz: a5061bd6083a73d61129fff9adea0070740490cbfcc231e40e989d295f8bee28f4d805626749eec9a783bd3c1d0aad02de207f3e6997d43baa2523202eeba323
|
@@ -36,11 +36,24 @@ if defined?(::HTTPClient)
|
|
36
36
|
|
37
37
|
class Session
|
38
38
|
alias_method :orig_create_socket, :create_socket
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
|
40
|
+
# up to version 2.6, the method signature is `create_socket(site)`; after that,
|
41
|
+
# it's `create_socket(hort, port)`
|
42
|
+
if instance_method(:create_socket).arity == 1
|
43
|
+
def create_socket(site)
|
44
|
+
if HttpLog.url_approved?("#{site.host}:#{site.port}")
|
45
|
+
HttpLog.log_connection(site.host, site.port)
|
46
|
+
end
|
47
|
+
orig_create_socket(site)
|
48
|
+
end
|
49
|
+
|
50
|
+
else
|
51
|
+
def create_socket(host, port)
|
52
|
+
if HttpLog.url_approved?("#{host}:#{port}")
|
53
|
+
HttpLog.log_connection(host, port)
|
54
|
+
end
|
55
|
+
orig_create_socket(host,port)
|
42
56
|
end
|
43
|
-
orig_create_socket(site)
|
44
57
|
end
|
45
58
|
end
|
46
59
|
end
|
data/lib/httplog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httplog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thilo Rusche
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|