mbeditor 0.4.3 → 0.4.4

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: cf6000382b991d7d35aa850c38fc80c743089c60f4a2277310f552e5a3b85477
4
- data.tar.gz: 4d9c42bc71a9db592172eb09a601b134628f3c7f4d619a271349dda9b675c5ac
3
+ metadata.gz: 64e27441c8b73cfd32fa121d310b4998592e379d3e60f064abe60591e54cfbcd
4
+ data.tar.gz: b7fb4b63d54f22fdfbcfebed83c5ff63d41d2c14bf753ba9a2bc41e964c47529
5
5
  SHA512:
6
- metadata.gz: 9e4b14f3d506a23c1f157a7dd91d4c522a568623fd555b3ef10e6e83e561b4bdcaf040b822ea1c2ec86ca1eed8f47992f7fa1060cb18a9600ee2f43b10de4730
7
- data.tar.gz: '0911b0a22050d16d96a1e841ae16e73673fd0579549efd5590d538efe405ca66e7f1470597680e0102954b4d4ce6ef9337d02a22dc736c487998f990808ff34f'
6
+ metadata.gz: 2a9eb8bf88a3696639fcb28e59ac4593a2bf9b8b35b203a9cdc7d27ef2f4d5a7266062211813713d3f0af0b4ba14c9051090ebbe46732b5bee78f03b4d28723f
7
+ data.tar.gz: 8e17f8d267928862f9c26fd8395168b67fc6942a3612facfc6d815cfcffb9bbfeb370ee5ef4b4d8205fa1593e909fd88fdd63c44f7c9b804788e76e224fcfa65
data/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.4.4] - 2026-04-23
9
+
10
+ ### Fixed
11
+ - `CableLogFilter` now preserves Action Cable and Action Pack tagged-logger compatibility by supporting formatter-level `current_tags` access and no-op tag operations for untagged or nil formatters.
12
+ - Added regression coverage for formatter-tag compatibility paths to prevent `current_tags` runtime errors.
13
+ - System test Cuprite driver configuration now applies explicit startup timeout options through `driven_by` to avoid intermittent Ferrum browser bootstrap timeouts in CI.
14
+
8
15
  ## [0.4.3] - 2026-04-22
9
16
 
10
17
  ### Added
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'delegate'
4
+ require 'logger'
5
+
3
6
  module Mbeditor
4
7
  # Wraps the ActionCable logger and suppresses all log lines that mention
5
8
  # Mbeditor channels so the development console stays readable.
@@ -7,6 +10,50 @@ module Mbeditor
7
10
  class CableLogFilter < SimpleDelegator
8
11
  SUPPRESS_PATTERN = /Mbeditor::|mbeditor_editor/
9
12
 
13
+ # Provides no-op tagged logging APIs for plain Ruby formatters.
14
+ class UntaggedFormatter < SimpleDelegator
15
+ def tagged(*_tags)
16
+ return yield self if block_given?
17
+
18
+ self
19
+ end
20
+
21
+ def current_tags
22
+ []
23
+ end
24
+
25
+ def push_tags(*tags)
26
+ tags
27
+ end
28
+
29
+ def pop_tags(_count = 1)
30
+ []
31
+ end
32
+
33
+ def clear_tags!
34
+ nil
35
+ end
36
+ end
37
+
38
+ def formatter
39
+ underlying_formatter = resolve_formatter
40
+
41
+ return underlying_formatter if underlying_formatter.respond_to?(:current_tags)
42
+
43
+ if defined?(@untagged_formatter_source) && @untagged_formatter_source.equal?(underlying_formatter)
44
+ return @untagged_formatter
45
+ end
46
+
47
+ @untagged_formatter_source = underlying_formatter
48
+ @untagged_formatter = UntaggedFormatter.new(underlying_formatter)
49
+ end
50
+
51
+ def resolve_formatter
52
+ return Logger::Formatter.new unless __getobj__.respond_to?(:formatter)
53
+
54
+ __getobj__.formatter || Logger::Formatter.new
55
+ end
56
+
10
57
  %w[debug info warn error fatal unknown].each do |level|
11
58
  define_method(level) do |message = nil, &block|
12
59
  msg = message.nil? && block ? block.call : message.to_s
@@ -19,7 +66,8 @@ module Mbeditor
19
66
  # Tagged-logging compat — the block body still passes through the filter.
20
67
  def tagged(*tags, &block)
21
68
  if __getobj__.respond_to?(:tagged)
22
- __getobj__.tagged(*tags, &block)
69
+ tagged_logger = __getobj__.tagged(*tags, &block)
70
+ block ? tagged_logger : self.class.new(tagged_logger)
23
71
  elsif block
24
72
  block.call
25
73
  else
@@ -52,5 +100,10 @@ module Mbeditor
52
100
 
53
101
  nil
54
102
  end
103
+
104
+ def flush
105
+ clear_tags!
106
+ __getobj__.flush if __getobj__.respond_to?(:flush)
107
+ end
55
108
  end
56
109
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mbeditor
4
- VERSION = "0.4.3"
4
+ VERSION = "0.4.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mbeditor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Noonan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-22 00:00:00.000000000 Z
11
+ date: 2026-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails