console-adapter-rails 0.1.0 → 0.1.2
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/lib/console/adapter/rails/active_support.rb +15 -0
- data/lib/console/adapter/rails/version.rb +1 -1
- data/lib/console/adapter/rails.rb +6 -3
- data.tar.gz.sig +0 -0
- metadata +2 -1
- 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: b83029d181036c865ec489f6d59634fa975b3159664dc24d24638785e89c11d7
|
4
|
+
data.tar.gz: '039ca5efca96c8d0eece6892fed268cd60170f4573725cecb3c8779d68976fb9'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4f710f1c68b72c2a58036f199a308d023ffaa251da28ed1608ba2ddd1ce2377aa6682c24aa732b53d597052870debe46307707870d7f1d91715a7e0ca8cfdf2
|
7
|
+
data.tar.gz: 6b2ca0f6ba996643d01bc501e810369875485f8ef23321ca0185e4bb647c6d745f2e6fe5f3758600219eee87bf1b89f9d0d221ffef6c8ca067b9bd80d9f794ec
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Released under the MIT License.
|
4
|
+
# Copyright, 2023, by Samuel Williams.
|
5
|
+
|
6
|
+
require 'active_support/logger'
|
7
|
+
|
8
|
+
if ActiveSupport::Logger.respond_to?(:logger_outputs_to?)
|
9
|
+
# https://github.com/rails/rails/issues/44800
|
10
|
+
class ActiveSupport::Logger
|
11
|
+
def self.logger_outputs_to?(*)
|
12
|
+
true
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -4,12 +4,15 @@
|
|
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'
|
10
11
|
require 'action_view/log_subscriber'
|
11
12
|
require 'active_job/log_subscriber'
|
12
13
|
|
14
|
+
require_relative 'rails/active_support'
|
15
|
+
|
13
16
|
module Console
|
14
17
|
module Adapter
|
15
18
|
# A Rails adapter for the console logger.
|
@@ -26,11 +29,11 @@ module Console
|
|
26
29
|
# - `method`: The HTTP method of the request.
|
27
30
|
# - `path`: The path of the request.
|
28
31
|
# - `status`: The HTTP status code of the response.
|
29
|
-
# - `view_runtime`: The time spent rendering views.
|
30
|
-
# - `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.
|
31
34
|
# - `location`: The redirect location if any.
|
32
35
|
# - `allocations`: The number of allocations performed.
|
33
|
-
# - `duration`: The total time spent processing the request.
|
36
|
+
# - `duration`: The total time spent processing the request in milliseconds.
|
34
37
|
def process_action(event)
|
35
38
|
payload = event.payload.dup
|
36
39
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -74,6 +74,7 @@ extensions: []
|
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
76
|
- lib/console/adapter/rails.rb
|
77
|
+
- lib/console/adapter/rails/active_support.rb
|
77
78
|
- lib/console/adapter/rails/version.rb
|
78
79
|
- license.md
|
79
80
|
- readme.md
|
metadata.gz.sig
CHANGED
Binary file
|