console-adapter-rails 0.5.1 → 0.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87a3133534ae9fef350296fe8f70381f69506077331665169523a7a59fef0786
4
- data.tar.gz: c23583428a0b77f235b72e2c83b57818e53da8581d9087a739d30cf33e6b535e
3
+ metadata.gz: e3bfffd2e5daf13e1ee20290908faef062f5960d88021554cb06eb09f8b33561
4
+ data.tar.gz: b306352bde59591f90ecc8842ed3a369f53e54b6101f9513d672e33188969bd9
5
5
  SHA512:
6
- metadata.gz: f8d8d61c59a6c62fc9dbac96c1dbe7e60f00dc3cfd79322cc2e15a4bf7ea37a563516ac682994c96375a69ec5d9cd7cff1ff13b901df33f8b49aacbcf8f4e0cf
7
- data.tar.gz: 5a3431fdcbe71b50d272ea61f0d56295b4a19520e77ee03cb7f42995faa884f35aab8dc01ed5b5c29702e5ec956e9061eb9c99176d7d8a4db386e24ee76ae575
6
+ metadata.gz: 9963a3eb7663df27e551e90bbdb5869f1a3175845aca759b94576363487adceac22d1ca1ba3423a7e3bc5b11d9125f72e99aea6ea0bebc3f8e33fc0c7268f42d
7
+ data.tar.gz: 67f48ccc6da55ffa1a729a5f841c159de0e4f5ef21f56f87d2622457e33c6a908f757c57fbcd53b79ed2292874f815060149b57faa99abc5ab05eb623ec45467
checksums.yaml.gz.sig CHANGED
@@ -1 +1,3 @@
1
- ��&�k��1;(0@�c�95ܥ~f��R\YbJS{<eK�ƕ[
1
+ Y�z�_�ha�L���}ꇏ�1_8N8vz�Vu"��nӝ��d����<O3*�7"���ׁ����Y�Q���L���)u��*�ps(���.���_�>�>ao��f���\�z
2
+ ��g�j�Z=W)���yk�iH��#O����h�7f
3
+ �R��-7/
@@ -3,6 +3,7 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2023-2025, by Samuel Williams.
5
5
  # Copyright, 2024, by Michael Adams.
6
+ # Copyright, 2026, by Yasha Krasnou.
6
7
 
7
8
  require "console/compatible/logger"
8
9
 
@@ -83,7 +84,25 @@ module Console
83
84
  def add(severity, message = nil, progname = nil, &block)
84
85
  return if silenced?(severity)
85
86
 
86
- super(severity, message, progname, &block)
87
+ if formatter.respond_to?(:tag_stack)
88
+ tags = formatter.tag_stack.tags
89
+
90
+ options = tags.each_with_object({}) do |tag, memo|
91
+ next unless tag.respond_to?(:to_hash)
92
+
93
+ tag.to_hash.each do |key, value|
94
+ case key
95
+ when Symbol
96
+ memo[key] = value
97
+ else
98
+ next unless key.respond_to?(:to_sym)
99
+ memo[key.to_sym] = value
100
+ end
101
+ end
102
+ end
103
+ end
104
+
105
+ super(severity, message, progname, **options, &block)
87
106
  end
88
107
 
89
108
  # Configure Rails to use the Console logger.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2024, by Michael Adams.
5
- # Copyright, 2024, by Samuel Williams.
5
+ # Copyright, 2024-2026, by Samuel Williams.
6
6
  # Copyright, 2025, by Jun Jiang.
7
7
 
8
8
  require "action_controller/log_subscriber"
@@ -9,7 +9,7 @@ module Console
9
9
  module Adapter
10
10
  # @namespace
11
11
  module Rails
12
- VERSION = "0.5.1"
12
+ VERSION = "0.6.0"
13
13
  end
14
14
  end
15
15
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2023-2024, by Samuel Williams.
4
+ # Copyright, 2023-2026, by Samuel Williams.
5
5
  # Copyright, 2024, by Michael Adams.
6
6
 
7
7
  require_relative "rails/logger"
data/license.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2023-2025, by Samuel Williams.
3
+ Copyright, 2023-2026, by Samuel Williams.
4
4
  Copyright, 2023, by Joshua Young.
5
5
  Copyright, 2024, by Michael Adams.
6
6
  Copyright, 2025, by Jun Jiang.
7
+ Copyright, 2026, by Yasha Krasnou.
7
8
 
8
9
  Permission is hereby granted, free of charge, to any person obtaining a copy
9
10
  of this software and associated documentation files (the "Software"), to deal
data/readme.md CHANGED
@@ -14,6 +14,10 @@ Please see the [project documentation](https://socketry.github.io/console-adapte
14
14
 
15
15
  Please see the [project releases](https://socketry.github.io/console-adapter-rails/releases/index) for all releases.
16
16
 
17
+ ### v0.6.0
18
+
19
+ - Add support for Rails tagged logging in the Rails logger adapter. This allows log messages with tags to be properly formatted and displayed.
20
+
17
21
  ### v0.5.0
18
22
 
19
23
  - Improved compatibilty with Rails 8+.
@@ -28,6 +32,22 @@ We welcome contributions to this project.
28
32
  4. Push to the branch (`git push origin my-new-feature`).
29
33
  5. Create new Pull Request.
30
34
 
35
+ ### Running Tests
36
+
37
+ To run the test suite:
38
+
39
+ ``` shell
40
+ bundle exec sus
41
+ ```
42
+
43
+ ### Making Releases
44
+
45
+ To make a new release:
46
+
47
+ ``` shell
48
+ bundle exec bake gem:release:patch # or minor or major
49
+ ```
50
+
31
51
  ### Developer Certificate of Origin
32
52
 
33
53
  In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.6.0
4
+
5
+ - Add support for Rails tagged logging in the Rails logger adapter. This allows log messages with tags to be properly formatted and displayed.
6
+
3
7
  ## v0.5.0
4
8
 
5
9
  - Improved compatibilty with Rails 8+.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console-adapter-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  - Joshua Young
9
9
  - Jun Jiang
10
10
  - Michael Adams
11
+ - Yasha Krasnou
11
12
  bindir: bin
12
13
  cert_chain:
13
14
  - |
@@ -47,14 +48,14 @@ dependencies:
47
48
  requirements:
48
49
  - - "~>"
49
50
  - !ruby/object:Gem::Version
50
- version: '1.21'
51
+ version: '1.34'
51
52
  type: :runtime
52
53
  prerelease: false
53
54
  version_requirements: !ruby/object:Gem::Requirement
54
55
  requirements:
55
56
  - - "~>"
56
57
  - !ruby/object:Gem::Version
57
- version: '1.21'
58
+ version: '1.34'
58
59
  - !ruby/object:Gem::Dependency
59
60
  name: fiber-storage
60
61
  requirement: !ruby/object:Gem::Requirement
@@ -111,14 +112,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
111
112
  requirements:
112
113
  - - ">="
113
114
  - !ruby/object:Gem::Version
114
- version: '3.2'
115
+ version: '3.3'
115
116
  required_rubygems_version: !ruby/object:Gem::Requirement
116
117
  requirements:
117
118
  - - ">="
118
119
  - !ruby/object:Gem::Version
119
120
  version: '0'
120
121
  requirements: []
121
- rubygems_version: 3.6.9
122
+ rubygems_version: 4.0.6
122
123
  specification_version: 4
123
124
  summary: Adapt Rails logs and events to the console gem.
124
125
  test_files: []
metadata.gz.sig CHANGED
Binary file