• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pboling / debug_logging / 9053546425

12 May 2024 06:56PM UTC coverage: 95.493% (+3.0%) from 92.479%
9053546425

push

github

web-flow
Release/v4.0.2 (#127)

* 🧑‍💻 Allow byebug by default

* 🔖 Prepare CHANGELOG.md for v4.0.2

* 🐛 Prevent final empty {} in logs from empty kwargs

* 🔨 RegexHelpers for specs

* 🐛 add undeclared runtime dependency version_gem

* 📝 Improve documentation

* ⬆️ Upgrade development dependencies

* 🧑‍💻 Give anonymous test classes names

* 🧑‍💻 Give anonymous test classes names

* ✨ LambDart - DRY Class and Instance Loggers

- `error_handler_proc` support for method signatures with kwargs

* ♻️ Refactor test suite

* ♻️ Refactored ActiveSupport::Notification integration (DRY)

- Increase test coverage to 97%

* 🚨 Linting

* 🐛 Require forwardable for Ruby 3.2+

* 🔖 Prepare release v4.0.2

* 💚 Fix flaky expectation

144 of 162 branches covered (88.89%)

Branch coverage included in aggregate %.

211 of 214 new or added lines in 22 files covered. (98.6%)

640 of 659 relevant lines covered (97.12%)

130.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.0
/lib/debug_logging/lamb_dart/base.rb
1
require "forwardable"
1✔
2

3
module DebugLogging
1✔
4
  module LambDart
1✔
5
    class Base
1✔
6
      extend Forwardable
1✔
7

8
      attr_reader :instance, # For ClassLogger, this will be the same as klass
1✔
9
        :klass,
10
        :is_class,
11
        :config_proxy,
12
        :method_payload,
13
        :args,
14
        :kwargs,
15
        :scope_term,
16
        :decorated_method
17

18
      def_delegator :@config_proxy, :error_handler_proc
1✔
19

20
      def initialize(instance: nil, klass: nil, method_config_opts:, method_payload:, args:, kwargs:, decorated_method:)
1✔
21
        @instance = instance || klass
216✔
22
        @klass = klass || instance.class
216✔
23
        @method_payload = method_payload
216✔
24
        @args = args
216✔
25
        @kwargs = kwargs
216✔
26
        @decorated_method = decorated_method
216✔
27
        @is_class = (self.klass == self.instance)
216✔
28
        @scope_term = is_class ? "class" : "instance"
216✔
29
        @config_proxy = DebugLogging::Util.config_proxy_finder(
216✔
30
          scope: self.klass,
31
          config_opts: method_config_opts,
32
          method_name: self.decorated_method,
33
          proxy_ref:,
34
        ) do |proxy|
35
          yield proxy if block_given?
200✔
36
        end
37
      end
38

39
      private
1✔
40

41
      def proxy_ref
1✔
NEW
42
        raise "#{self.class}##{__method__} is not defined, please fix!"
×
43
      end
44
    end
45
  end
46
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc