console-adapter-rails 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/console/adapter/rails/version.rb +1 -1
- data/lib/console/adapter/rails.rb +10 -7
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4ac07fd43868aee0fc4cbeecadabca68f88d80e61c4c302dfc5ba2ba767c0cc
|
4
|
+
data.tar.gz: d328344e57cd0b1df839b9fdc2a8eb4cf08eb3d8a430b5eb8e590c7ae4564992
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b0dc2506c7a559ba2e8fa65d48348185b5d5ca4cd34c7cc2fd94bcc6963f112408fab74584c8f5d1d63f9527d9235c80836403116bcb5803cb35b59d6e0f0fb
|
7
|
+
data.tar.gz: c991e45b0d39912407a3169c0083630d38bea211aa70b12ac78b91620e753951509b25ee92c80dea60ad14068344d9ec614dfec92b6f7901c57763937c639b8f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -4,6 +4,7 @@
|
|
4
4
|
# Copyright, 2023, by Samuel Williams.
|
5
5
|
|
6
6
|
require 'console'
|
7
|
+
require 'console/compatible/logger'
|
7
8
|
|
8
9
|
require 'active_support/log_subscriber'
|
9
10
|
require 'action_controller/log_subscriber'
|
@@ -28,11 +29,11 @@ module Console
|
|
28
29
|
# - `method`: The HTTP method of the request.
|
29
30
|
# - `path`: The path of the request.
|
30
31
|
# - `status`: The HTTP status code of the response.
|
31
|
-
# - `view_runtime`: The time spent rendering views.
|
32
|
-
# - `db_runtime`: The time spent querying the database.
|
32
|
+
# - `view_runtime`: The time spent rendering views in milliseconds.
|
33
|
+
# - `db_runtime`: The time spent querying the database in milliseconds.
|
33
34
|
# - `location`: The redirect location if any.
|
34
35
|
# - `allocations`: The number of allocations performed.
|
35
|
-
# - `duration`: The total time spent processing the request.
|
36
|
+
# - `duration`: The total time spent processing the request in milliseconds.
|
36
37
|
def process_action(event)
|
37
38
|
payload = event.payload.dup
|
38
39
|
|
@@ -44,10 +45,12 @@ module Console
|
|
44
45
|
request = payload.delete(:request)
|
45
46
|
response = payload.delete(:response)
|
46
47
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
if response and headers = response.headers
|
49
|
+
# Extract redirect location if any:
|
50
|
+
location = response.headers['Location'] || response.headers['location']
|
51
|
+
if location
|
52
|
+
payload[:location] = location
|
53
|
+
end
|
51
54
|
end
|
52
55
|
|
53
56
|
payload[:allocations] = event.allocations
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: console-adapter-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
38
38
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
39
39
|
-----END CERTIFICATE-----
|
40
|
-
date: 2023-08-
|
40
|
+
date: 2023-08-03 00:00:00.000000000 Z
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: console
|
metadata.gz.sig
CHANGED
Binary file
|