wat_catcher 0.8.7 → 0.8.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wat_catcher/rack_middleware.rb +4 -6
- data/lib/wat_catcher/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: 997f89f5b4e763ac5cd9a416d082eeb9ee5c4d89
|
4
|
+
data.tar.gz: 6e8d1d94f5f8d548f4d6fe1aff783c5439ed9a10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdf9afec5b1c809ce3e84f56844095a5f16a92592914fe0735f9453ad070af80c53456b113cf49036e0bdd978c5cc47f908893dc4a0c4e69ee0e1985f2fb04bf
|
7
|
+
data.tar.gz: bea02f162c197382de2a9debbd51481722152e743a3f9ca51efadc9307d220c4b11f825a4f6e7012ae1ebcea3a296e7ef74cc98003bf7fa2f10ec047d08b4a73
|
@@ -1,18 +1,17 @@
|
|
1
1
|
module WatCatcher
|
2
2
|
class RackMiddleware
|
3
3
|
class WatCatcher::Request
|
4
|
-
attr_accessor :url, :method, :
|
4
|
+
attr_accessor :url, :method, :headers, :session
|
5
5
|
|
6
|
-
def initialize(url, method,
|
6
|
+
def initialize(url, method, headers, session)
|
7
7
|
@url = url
|
8
8
|
@method = method
|
9
|
-
@params = params
|
10
9
|
@headers = headers
|
11
10
|
@session = session
|
12
11
|
end
|
13
12
|
|
14
13
|
def filtered_parameters
|
15
|
-
|
14
|
+
nil
|
16
15
|
end
|
17
16
|
end
|
18
17
|
|
@@ -32,7 +31,6 @@ module WatCatcher
|
|
32
31
|
else
|
33
32
|
rack_env = env
|
34
33
|
rack_request = ::Rack::Request.new(env)
|
35
|
-
params = rack_request.params rescue {}
|
36
34
|
|
37
35
|
# Build the clean url (hide the port if it is obvious)
|
38
36
|
url = "#{rack_request.scheme}://#{rack_request.host}"
|
@@ -46,7 +44,7 @@ module WatCatcher
|
|
46
44
|
end
|
47
45
|
|
48
46
|
end
|
49
|
-
request = WatCatcher::Request.new(url, rack_request.request_method,
|
47
|
+
request = WatCatcher::Request.new(url, rack_request.request_method, headers, rack_env["rack.session"])
|
50
48
|
end
|
51
49
|
ensure
|
52
50
|
WatCatcher::Report.new(e, user: user, request: request)
|
data/lib/wat_catcher/version.rb
CHANGED