debug_logging 4.0.0 → 4.0.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.
@@ -49,17 +49,17 @@ class SimpleDebugLogging < Module
49
49
 
50
50
  module ClassMethodLogger
51
51
  def logged(*methods_to_log)
52
- methods_to_log.each do |method_to_log|
53
- original_method = method(method_to_log)
52
+ methods_to_log.each do |decorated_method|
53
+ original_method = method(decorated_method)
54
54
  (class << self; self; end).class_eval do
55
- define_method(method_to_log.to_sym) do |*args|
55
+ define_method(decorated_method.to_sym) do |*args|
56
56
  method_return_value = nil
57
57
  invocation_id = " ~#{args.object_id}@#{Time.now.to_i}~" if args
58
- puts "#{self}::#{method_to_log}(#{args.map(&:inspect).join(", ")})#{invocation_id}"
58
+ puts "#{self}::#{decorated_method}(#{args.map(&:inspect).join(", ")})#{invocation_id}"
59
59
  elapsed = Benchmark.realtime do
60
60
  method_return_value = original_method.call(*args)
61
61
  end
62
- puts "#{self}::#{method_to_log} ~#{args.hash}~ complete in #{elapsed}s#{invocation_id}"
62
+ puts "#{self}::#{decorated_method} ~#{args.hash}~ complete in #{elapsed}s#{invocation_id}"
63
63
  method_return_value
64
64
  end
65
65
  end
@@ -68,18 +68,20 @@ class SimpleDebugLogging < Module
68
68
  end
69
69
 
70
70
  module InstanceMethodLoggerModulizer
71
- def self.to_mod(methods_to_log = [])
72
- Module.new do
73
- Array(methods_to_log).each do |method_to_log|
74
- define_method(method_to_log.to_sym) do |*args, &block|
75
- method_return_value = nil
76
- invocation_id = " ~#{args.object_id}@#{Time.now.to_i}~" if args
77
- puts "#{self.class}##{method_to_log}(#{args.map(&:inspect).join(", ")})#{invocation_id}"
78
- elapsed = Benchmark.realtime do
79
- method_return_value = super(*args, &block)
71
+ class << self
72
+ def to_mod(methods_to_log = [])
73
+ Module.new do
74
+ Array(methods_to_log).each do |decorated_method|
75
+ define_method(decorated_method.to_sym) do |*args, &block|
76
+ method_return_value = nil
77
+ invocation_id = " ~#{args.object_id}@#{Time.now.to_i}~" if args
78
+ puts "#{self.class}##{decorated_method}(#{args.map(&:inspect).join(", ")})#{invocation_id}"
79
+ elapsed = Benchmark.realtime do
80
+ method_return_value = super(*args, &block)
81
+ end
82
+ puts "#{self.class}##{decorated_method} ~#{args.hash}~ complete in #{elapsed}s#{invocation_id}"
83
+ method_return_value
80
84
  end
81
- puts "#{self.class}##{method_to_log} ~#{args.hash}~ complete in #{elapsed}s#{invocation_id}"
82
- method_return_value
83
85
  end
84
86
  end
85
87
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: debug_logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Boling
@@ -38,7 +38,7 @@ cert_chain:
38
38
  KuxrfYrN+9HvMdm+nZ6TypmKftHY3Gj+/uu+g8Icm/zrvTWAEE0mcJOkfrIoNPJb
39
39
  pF8dMA==
40
40
  -----END CERTIFICATE-----
41
- date: 2024-02-28 00:00:00.000000000 Z
41
+ date: 2024-05-12 00:00:00.000000000 Z
42
42
  dependencies:
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: colorize
@@ -55,33 +55,53 @@ dependencies:
55
55
  - !ruby/object:Gem::Version
56
56
  version: '0'
57
57
  - !ruby/object:Gem::Dependency
58
- name: activesupport
58
+ name: version_gem
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '1.1'
61
64
  - - ">="
62
65
  - !ruby/object:Gem::Version
63
- version: 5.2.4.4
64
- type: :development
66
+ version: 1.1.4
67
+ type: :runtime
65
68
  prerelease: false
66
69
  version_requirements: !ruby/object:Gem::Requirement
67
70
  requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '1.1'
68
74
  - - ">="
69
75
  - !ruby/object:Gem::Version
70
- version: 5.2.4.4
76
+ version: 1.1.4
71
77
  - !ruby/object:Gem::Dependency
72
78
  name: rake
73
79
  requirement: !ruby/object:Gem::Requirement
74
80
  requirements:
75
81
  - - ">="
76
82
  - !ruby/object:Gem::Version
77
- version: '13'
83
+ version: 13.2.1
84
+ type: :development
85
+ prerelease: false
86
+ version_requirements: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 13.2.1
91
+ - !ruby/object:Gem::Dependency
92
+ name: activesupport
93
+ requirement: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: 5.2.4.4
78
98
  type: :development
79
99
  prerelease: false
80
100
  version_requirements: !ruby/object:Gem::Requirement
81
101
  requirements:
82
102
  - - ">="
83
103
  - !ruby/object:Gem::Version
84
- version: '13'
104
+ version: 5.2.4.4
85
105
  - !ruby/object:Gem::Dependency
86
106
  name: kettle-soup-cover
87
107
  requirement: !ruby/object:Gem::Requirement
@@ -204,6 +224,26 @@ dependencies:
204
224
  - - "~>"
205
225
  - !ruby/object:Gem::Version
206
226
  version: '2.25'
227
+ - !ruby/object:Gem::Dependency
228
+ name: standard-rubocop-lts
229
+ requirement: !ruby/object:Gem::Requirement
230
+ requirements:
231
+ - - "~>"
232
+ - !ruby/object:Gem::Version
233
+ version: '1.0'
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: 1.0.10
237
+ type: :development
238
+ prerelease: false
239
+ version_requirements: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: '1.0'
244
+ - - ">="
245
+ - !ruby/object:Gem::Version
246
+ version: 1.0.10
207
247
  - !ruby/object:Gem::Dependency
208
248
  name: rspec
209
249
  requirement: !ruby/object:Gem::Requirement
@@ -310,6 +350,16 @@ files:
310
350
  - lib/debug_logging/instance_logger_modulizer.rb
311
351
  - lib/debug_logging/instance_notifier.rb
312
352
  - lib/debug_logging/instance_notifier_modulizer.rb
353
+ - lib/debug_logging/lamb_dart.rb
354
+ - lib/debug_logging/lamb_dart/base.rb
355
+ - lib/debug_logging/lamb_dart/log.rb
356
+ - lib/debug_logging/lamb_dart/note.rb
357
+ - lib/debug_logging/lamb_dartable.rb
358
+ - lib/debug_logging/lamb_darts/benchmarked.rb
359
+ - lib/debug_logging/lamb_darts/enter_log.rb
360
+ - lib/debug_logging/lamb_darts/error_handle.rb
361
+ - lib/debug_logging/lamb_darts/exit_log.rb
362
+ - lib/debug_logging/lamb_darts/notify.rb
313
363
  - lib/debug_logging/log_subscriber.rb
314
364
  - lib/debug_logging/util.rb
315
365
  - lib/debug_logging/version.rb
@@ -319,10 +369,10 @@ licenses:
319
369
  - MIT
320
370
  metadata:
321
371
  homepage_uri: https://github.com/pboling/debug_logging
322
- source_code_uri: https://github.com/pboling/debug_logging/tree/v4.0.0
323
- changelog_uri: https://github.com/pboling/debug_logging/blob/v4.0.0/CHANGELOG.md
372
+ source_code_uri: https://github.com/pboling/debug_logging/tree/v4.0.2
373
+ changelog_uri: https://github.com/pboling/debug_logging/blob/v4.0.2/CHANGELOG.md
324
374
  bug_tracker_uri: https://github.com/pboling/debug_logging/issues
325
- documentation_uri: https://www.rubydoc.info/gems/debug_logging/4.0.0
375
+ documentation_uri: https://www.rubydoc.info/gems/debug_logging/4.0.2
326
376
  wiki_uri: https://github.com/pboling/debug_logging/wiki
327
377
  funding_uri: https://liberapay.com/pboling
328
378
  rubygems_mfa_required: 'true'
@@ -341,7 +391,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
341
391
  - !ruby/object:Gem::Version
342
392
  version: '0'
343
393
  requirements: []
344
- rubygems_version: 3.5.6
394
+ rubygems_version: 3.5.9
345
395
  signing_key:
346
396
  specification_version: 4
347
397
  summary: Drop-in debug logging useful when a call stack gets unruly
metadata.gz.sig CHANGED
Binary file