debug_logging 3.1.8 → 3.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CONTRIBUTING.md +47 -0
- data/LICENSE.txt +21 -0
- data/README.md +150 -74
- data/SECURITY.md +16 -0
- data/lib/debug_logging/active_support_notifications.rb +4 -4
- data/lib/debug_logging/argument_printer.rb +102 -86
- data/lib/debug_logging/class_logger.rb +21 -17
- data/lib/debug_logging/class_notifier.rb +10 -10
- data/lib/debug_logging/configuration.rb +4 -4
- data/lib/debug_logging/constants.rb +3 -3
- data/lib/debug_logging/finalize.rb +1 -1
- data/lib/debug_logging/hooks.rb +11 -11
- data/lib/debug_logging/instance_logger.rb +5 -3
- data/lib/debug_logging/instance_logger_modulizer.rb +13 -9
- data/lib/debug_logging/instance_notifier.rb +5 -3
- data/lib/debug_logging/instance_notifier_modulizer.rb +13 -9
- data/lib/debug_logging/log_subscriber.rb +6 -5
- data/lib/debug_logging/util.rb +18 -13
- data/lib/debug_logging/version.rb +3 -1
- data/lib/debug_logging.rb +24 -15
- data/lib/simple_debug_logging.rb +3 -3
- data.tar.gz.sig +0 -0
- metadata +153 -55
- metadata.gz.sig +0 -0
- data/.coveralls.yml +0 -1
- data/.gitignore +0 -13
- data/.rspec +0 -2
- data/.rubocop.yml +0 -107
- data/.rubocop_todo.yml +0 -167
- data/.travis.yml +0 -36
- data/Gemfile +0 -12
- data/Rakefile +0 -8
- data/bin/console +0 -15
- data/bin/setup +0 -8
- data/debug_logging.gemspec +0 -42
data/.rubocop.yml
DELETED
@@ -1,107 +0,0 @@
|
|
1
|
-
inherit_from: .rubocop_todo.yml
|
2
|
-
|
3
|
-
require:
|
4
|
-
- 'rubocop-md'
|
5
|
-
- 'rubocop-performance'
|
6
|
-
- 'rubocop-rake'
|
7
|
-
- 'rubocop-rspec'
|
8
|
-
|
9
|
-
AllCops:
|
10
|
-
NewCops: enable
|
11
|
-
|
12
|
-
Layout/BeginEndAlignment: # (new in 0.91)
|
13
|
-
Enabled: true
|
14
|
-
Layout/EmptyLinesAroundAttributeAccessor: # (new in 0.83)
|
15
|
-
Enabled: true
|
16
|
-
Layout/SpaceAroundMethodCallOperator: # (new in 0.82)
|
17
|
-
Enabled: true
|
18
|
-
Lint/BinaryOperatorWithIdenticalOperands: # (new in 0.89)
|
19
|
-
Enabled: true
|
20
|
-
Lint/ConstantDefinitionInBlock: # (new in 0.91)
|
21
|
-
Enabled: true
|
22
|
-
Lint/DeprecatedOpenSSLConstant: # (new in 0.84)
|
23
|
-
Enabled: true
|
24
|
-
Lint/DuplicateElsifCondition: # (new in 0.88)
|
25
|
-
Enabled: true
|
26
|
-
Lint/DuplicateRequire: # (new in 0.90)
|
27
|
-
Enabled: true
|
28
|
-
Lint/DuplicateRescueException: # (new in 0.89)
|
29
|
-
Enabled: true
|
30
|
-
Lint/EmptyConditionalBody: # (new in 0.89)
|
31
|
-
Enabled: true
|
32
|
-
Lint/EmptyFile: # (new in 0.90)
|
33
|
-
Enabled: true
|
34
|
-
Lint/FloatComparison: # (new in 0.89)
|
35
|
-
Enabled: true
|
36
|
-
Lint/IdentityComparison: # (new in 0.91)
|
37
|
-
Enabled: true
|
38
|
-
Lint/MissingSuper: # (new in 0.89)
|
39
|
-
Enabled: true
|
40
|
-
Lint/MixedRegexpCaptureTypes: # (new in 0.85)
|
41
|
-
Enabled: true
|
42
|
-
Lint/OutOfRangeRegexpRef: # (new in 0.89)
|
43
|
-
Enabled: true
|
44
|
-
Lint/RaiseException: # (new in 0.81)
|
45
|
-
Enabled: true
|
46
|
-
Lint/SelfAssignment: # (new in 0.89)
|
47
|
-
Enabled: true
|
48
|
-
Lint/StructNewOverride: # (new in 0.81)
|
49
|
-
Enabled: true
|
50
|
-
Lint/TopLevelReturnWithArgument: # (new in 0.89)
|
51
|
-
Enabled: true
|
52
|
-
Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
|
53
|
-
Enabled: true
|
54
|
-
Lint/UnreachableLoop: # (new in 0.89)
|
55
|
-
Enabled: true
|
56
|
-
Lint/UselessMethodDefinition: # (new in 0.90)
|
57
|
-
Enabled: true
|
58
|
-
Lint/UselessTimes: # (new in 0.91)
|
59
|
-
Enabled: true
|
60
|
-
Style/AccessorGrouping: # (new in 0.87)
|
61
|
-
Enabled: true
|
62
|
-
Style/BisectedAttrAccessor: # (new in 0.87)
|
63
|
-
Enabled: true
|
64
|
-
Style/CaseLikeIf: # (new in 0.88)
|
65
|
-
Enabled: true
|
66
|
-
Style/CombinableLoops: # (new in 0.90)
|
67
|
-
Enabled: true
|
68
|
-
Style/ExplicitBlockArgument: # (new in 0.89)
|
69
|
-
Enabled: true
|
70
|
-
Style/ExponentialNotation: # (new in 0.82)
|
71
|
-
Enabled: true
|
72
|
-
Style/GlobalStdStream: # (new in 0.89)
|
73
|
-
Enabled: true
|
74
|
-
Style/HashAsLastArrayItem: # (new in 0.88)
|
75
|
-
Enabled: true
|
76
|
-
Style/HashEachMethods: # (new in 0.80)
|
77
|
-
Enabled: true
|
78
|
-
Style/HashLikeCase: # (new in 0.88)
|
79
|
-
Enabled: true
|
80
|
-
Style/HashTransformKeys: # (new in 0.80)
|
81
|
-
Enabled: true
|
82
|
-
Style/HashTransformValues: # (new in 0.80)
|
83
|
-
Enabled: true
|
84
|
-
Style/KeywordParametersOrder: # (new in 0.90)
|
85
|
-
Enabled: true
|
86
|
-
Style/OptionalBooleanParameter: # (new in 0.89)
|
87
|
-
Enabled: true
|
88
|
-
Style/RedundantAssignment: # (new in 0.87)
|
89
|
-
Enabled: true
|
90
|
-
Style/RedundantFetchBlock: # (new in 0.86)
|
91
|
-
Enabled: true
|
92
|
-
Style/RedundantFileExtensionInRequire: # (new in 0.88)
|
93
|
-
Enabled: true
|
94
|
-
Style/RedundantRegexpCharacterClass: # (new in 0.85)
|
95
|
-
Enabled: true
|
96
|
-
Style/RedundantRegexpEscape: # (new in 0.85)
|
97
|
-
Enabled: true
|
98
|
-
Style/RedundantSelfAssignment: # (new in 0.90)
|
99
|
-
Enabled: true
|
100
|
-
Style/SingleArgumentDig: # (new in 0.89)
|
101
|
-
Enabled: true
|
102
|
-
Style/SlicingWithRange: # (new in 0.83)
|
103
|
-
Enabled: true
|
104
|
-
Style/SoleNestedConditional: # (new in 0.89)
|
105
|
-
Enabled: true
|
106
|
-
Style/StringConcatenation: # (new in 0.89)
|
107
|
-
Enabled: true
|
data/.rubocop_todo.yml
DELETED
@@ -1,167 +0,0 @@
|
|
1
|
-
# This configuration was generated by
|
2
|
-
# `rubocop --auto-gen-config`
|
3
|
-
# on 2020-12-10 04:35:55 UTC using RuboCop version 1.6.0.
|
4
|
-
# The point is for the user to remove these configuration records
|
5
|
-
# one by one as the offenses are removed from the code base.
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
8
|
-
|
9
|
-
# Offense count: 7
|
10
|
-
Lint/DuplicateMethods:
|
11
|
-
Exclude:
|
12
|
-
- 'README.md'
|
13
|
-
|
14
|
-
# Offense count: 6
|
15
|
-
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
16
|
-
Metrics/AbcSize:
|
17
|
-
Max: 96
|
18
|
-
|
19
|
-
# Offense count: 58
|
20
|
-
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
21
|
-
# IgnoredMethods: refine
|
22
|
-
Metrics/BlockLength:
|
23
|
-
Max: 851
|
24
|
-
|
25
|
-
# Offense count: 6
|
26
|
-
# Configuration parameters: CountBlocks.
|
27
|
-
Metrics/BlockNesting:
|
28
|
-
Max: 4
|
29
|
-
|
30
|
-
# Offense count: 4
|
31
|
-
# Configuration parameters: IgnoredMethods.
|
32
|
-
Metrics/CyclomaticComplexity:
|
33
|
-
Max: 24
|
34
|
-
|
35
|
-
# Offense count: 15
|
36
|
-
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
37
|
-
Metrics/MethodLength:
|
38
|
-
Max: 75
|
39
|
-
|
40
|
-
# Offense count: 2
|
41
|
-
# Configuration parameters: CountComments, CountAsOne.
|
42
|
-
Metrics/ModuleLength:
|
43
|
-
Max: 112
|
44
|
-
|
45
|
-
# Offense count: 5
|
46
|
-
# Configuration parameters: IgnoredMethods.
|
47
|
-
Metrics/PerceivedComplexity:
|
48
|
-
Max: 31
|
49
|
-
|
50
|
-
# Offense count: 3
|
51
|
-
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
52
|
-
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
53
|
-
Naming/MemoizedInstanceVariableName:
|
54
|
-
Exclude:
|
55
|
-
- 'lib/debug_logging/configuration.rb'
|
56
|
-
|
57
|
-
# Offense count: 60
|
58
|
-
# Configuration parameters: Prefixes.
|
59
|
-
# Prefixes: when, with, without
|
60
|
-
RSpec/ContextWording:
|
61
|
-
Exclude:
|
62
|
-
- 'spec/debug_logging/class_logger_spec.rb'
|
63
|
-
- 'spec/debug_logging/class_notifier_spec.rb'
|
64
|
-
- 'spec/debug_logging/configuration_spec.rb'
|
65
|
-
- 'spec/debug_logging/instance_logger_spec.rb'
|
66
|
-
- 'spec/debug_logging/instance_notifier_spec.rb'
|
67
|
-
- 'spec/debug_logging_spec.rb'
|
68
|
-
|
69
|
-
# Offense count: 46
|
70
|
-
# Configuration parameters: Max.
|
71
|
-
RSpec/ExampleLength:
|
72
|
-
Exclude:
|
73
|
-
- 'spec/debug_logging/class_logger_spec.rb'
|
74
|
-
- 'spec/debug_logging/class_notifier_spec.rb'
|
75
|
-
- 'spec/debug_logging/configuration_spec.rb'
|
76
|
-
- 'spec/debug_logging/instance_logger_spec.rb'
|
77
|
-
- 'spec/debug_logging/instance_notifier_spec.rb'
|
78
|
-
- 'spec/debug_logging/log_subscriber_spec.rb'
|
79
|
-
- 'spec/debug_logging_spec.rb'
|
80
|
-
|
81
|
-
# Offense count: 53
|
82
|
-
# Configuration parameters: AssignmentOnly.
|
83
|
-
RSpec/InstanceVariable:
|
84
|
-
Exclude:
|
85
|
-
- 'spec/debug_logging/class_notifier_spec.rb'
|
86
|
-
- 'spec/debug_logging/instance_notifier_spec.rb'
|
87
|
-
- 'spec/debug_logging/log_subscriber_spec.rb'
|
88
|
-
|
89
|
-
# Offense count: 4
|
90
|
-
RSpec/LeakyConstantDeclaration:
|
91
|
-
Exclude:
|
92
|
-
- 'spec/debug_logging/configuration_spec.rb'
|
93
|
-
|
94
|
-
# Offense count: 23
|
95
|
-
# Configuration parameters: .
|
96
|
-
# SupportedStyles: have_received, receive
|
97
|
-
RSpec/MessageSpies:
|
98
|
-
EnforcedStyle: receive
|
99
|
-
|
100
|
-
# Offense count: 80
|
101
|
-
RSpec/MultipleExpectations:
|
102
|
-
Max: 32
|
103
|
-
|
104
|
-
# Offense count: 1
|
105
|
-
# Configuration parameters: AllowSubject.
|
106
|
-
RSpec/MultipleMemoizedHelpers:
|
107
|
-
Max: 10
|
108
|
-
|
109
|
-
# Offense count: 27
|
110
|
-
RSpec/NestedGroups:
|
111
|
-
Max: 5
|
112
|
-
|
113
|
-
# Offense count: 1
|
114
|
-
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
115
|
-
RSpec/VerifiedDoubles:
|
116
|
-
Exclude:
|
117
|
-
- 'spec/support/shared_context.rb'
|
118
|
-
|
119
|
-
# Offense count: 1
|
120
|
-
# Configuration parameters: AllowedChars.
|
121
|
-
Style/AsciiComments:
|
122
|
-
Exclude:
|
123
|
-
- '**/*.md'
|
124
|
-
- '**/*.markdown'
|
125
|
-
- 'lib/debug_logging/configuration.rb'
|
126
|
-
|
127
|
-
# Offense count: 13
|
128
|
-
Style/Documentation:
|
129
|
-
Exclude:
|
130
|
-
- '**/*.md'
|
131
|
-
- '**/*.markdown'
|
132
|
-
- 'lib/debug_logging.rb'
|
133
|
-
- 'lib/debug_logging/argument_printer.rb'
|
134
|
-
- 'lib/debug_logging/class_logger.rb'
|
135
|
-
- 'lib/debug_logging/class_notifier.rb'
|
136
|
-
- 'lib/debug_logging/configuration.rb'
|
137
|
-
- 'lib/debug_logging/instance_logger.rb'
|
138
|
-
- 'lib/debug_logging/instance_logger_modulizer.rb'
|
139
|
-
- 'lib/debug_logging/instance_notifier.rb'
|
140
|
-
- 'lib/debug_logging/instance_notifier_modulizer.rb'
|
141
|
-
- 'lib/debug_logging/log_subscriber.rb'
|
142
|
-
- 'lib/simple_debug_logging.rb'
|
143
|
-
|
144
|
-
# Offense count: 2
|
145
|
-
# Cop supports --auto-correct.
|
146
|
-
# Configuration parameters: EnforcedStyle.
|
147
|
-
# SupportedStyles: empty, nil, both
|
148
|
-
Style/EmptyElse:
|
149
|
-
Exclude:
|
150
|
-
- 'lib/debug_logging/class_logger.rb'
|
151
|
-
- 'lib/debug_logging/class_notifier.rb'
|
152
|
-
|
153
|
-
# Offense count: 8
|
154
|
-
Style/IdenticalConditionalBranches:
|
155
|
-
Exclude:
|
156
|
-
- 'lib/debug_logging/class_logger.rb'
|
157
|
-
- 'lib/debug_logging/class_notifier.rb'
|
158
|
-
- 'lib/debug_logging/instance_logger_modulizer.rb'
|
159
|
-
- 'lib/debug_logging/instance_notifier_modulizer.rb'
|
160
|
-
|
161
|
-
# Offense count: 67
|
162
|
-
# Cop supports --auto-correct.
|
163
|
-
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
164
|
-
# URISchemes: http, https
|
165
|
-
# IgnoredPatterns: (?-mix:^\#)
|
166
|
-
Layout/LineLength:
|
167
|
-
Max: 207
|
data/.travis.yml
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
env:
|
2
|
-
global:
|
3
|
-
- JRUBY_OPTS="-Xcli.debug=true --debug"
|
4
|
-
- CC_TEST_REPORTER_ID=b78cb927bf15a7aee5aacd4486215628550f784e77d137a2da8c96c417a068ff
|
5
|
-
|
6
|
-
before_script:
|
7
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
8
|
-
- chmod +x ./cc-test-reporter
|
9
|
-
- ./cc-test-reporter before-build
|
10
|
-
|
11
|
-
script:
|
12
|
-
- bundle exec rubocop -DESP
|
13
|
-
- bundle exec rspec
|
14
|
-
|
15
|
-
after_script:
|
16
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
17
|
-
|
18
|
-
before_install:
|
19
|
-
- gem update --system
|
20
|
-
- gem install bundler
|
21
|
-
|
22
|
-
install:
|
23
|
-
- bundle install
|
24
|
-
|
25
|
-
bundler_args: --no-deployment --jobs 3 --retry 3
|
26
|
-
|
27
|
-
cache: bundler
|
28
|
-
|
29
|
-
language: ruby
|
30
|
-
sudo: false
|
31
|
-
|
32
|
-
rvm:
|
33
|
-
- ruby-2.4.10
|
34
|
-
- ruby-2.5.8
|
35
|
-
- ruby-2.6.6
|
36
|
-
- ruby-2.7.2
|
data/Gemfile
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source 'https://rubygems.org'
|
4
|
-
|
5
|
-
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
6
|
-
|
7
|
-
group :test do
|
8
|
-
gem 'coveralls', '~> 0', require: false
|
9
|
-
end
|
10
|
-
|
11
|
-
# Specify your gem's dependencies in debug_logging.gemspec
|
12
|
-
gemspec
|
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'bundler/setup'
|
5
|
-
require 'debug_logging'
|
6
|
-
|
7
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
-
# with your gem easier. You can also use a different console, if you like.
|
9
|
-
|
10
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
-
# require "pry"
|
12
|
-
# Pry.start
|
13
|
-
|
14
|
-
require 'irb'
|
15
|
-
IRB.start(__FILE__)
|
data/bin/setup
DELETED
data/debug_logging.gemspec
DELETED
@@ -1,42 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
lib = File.expand_path('lib', __dir__)
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'debug_logging/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
spec.name = 'debug_logging'
|
9
|
-
spec.version = DebugLogging::VERSION
|
10
|
-
spec.authors = ['Peter Boling', 'guckin']
|
11
|
-
spec.email = ['peter.boling@gmail.com']
|
12
|
-
|
13
|
-
spec.summary = 'Drop-in debug logging useful when a call stack gets unruly'
|
14
|
-
spec.description = '
|
15
|
-
Unobtrusive debug logging for Ruby. NO LITTERING.
|
16
|
-
Automatically log selected methods and their arguments as they are called at runtime!
|
17
|
-
'
|
18
|
-
spec.license = 'MIT'
|
19
|
-
spec.homepage = 'https://github.com/pboling/debug_logging'
|
20
|
-
|
21
|
-
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
22
|
-
f.match(%r{^(test|spec|features)/})
|
23
|
-
end
|
24
|
-
spec.bindir = 'exe'
|
25
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
|
-
spec.require_paths = ['lib']
|
27
|
-
spec.required_ruby_version = '>= 2.4.0' # Uses magic comments
|
28
|
-
|
29
|
-
spec.add_runtime_dependency 'colorize', '>= 0'
|
30
|
-
spec.add_development_dependency 'activesupport', '~> 5.2', '>= 5.2.4.4'
|
31
|
-
spec.add_development_dependency 'bundler', '>= 2'
|
32
|
-
spec.add_development_dependency 'byebug', '>= 11'
|
33
|
-
spec.add_development_dependency 'rake', '>= 13'
|
34
|
-
spec.add_development_dependency 'rspec', '>= 3'
|
35
|
-
spec.add_development_dependency 'rspec-pending_for', '>= 0'
|
36
|
-
spec.add_development_dependency 'rubocop', '~> 1.0'
|
37
|
-
spec.add_development_dependency 'rubocop-md'
|
38
|
-
spec.add_development_dependency 'rubocop-performance'
|
39
|
-
spec.add_development_dependency 'rubocop-rake'
|
40
|
-
spec.add_development_dependency 'rubocop-rspec', '~> 2.0'
|
41
|
-
spec.add_development_dependency 'silent_stream', '>= 1'
|
42
|
-
end
|