trace_location 1.0 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +0 -89
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/exe/trace_location +1 -0
- data/lib/trace_location/cli.rb +4 -2
- data/lib/trace_location/event.rb +5 -3
- data/lib/trace_location/version.rb +1 -1
- data/lib/trace_location.rb +2 -2
- data/trace_location.gemspec +6 -3
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbbeb7108727e93706ca6fe199dc58b9c5fd5246e0d47d52d45dafd1908c343f
|
4
|
+
data.tar.gz: f7e10fb3febf2091394f5aaf0adcd2d712ce3d93faedd21f6ebf57621bf04305
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7045401ffcd0b8732097fa273257409fb6c75da2f0bcf4aa277ad96a90db591c48202f37ff6b06f01f5ae7f9bfec2fbebccff963bc161b0646c15a9b49335448
|
7
|
+
data.tar.gz: 1267a27317e29eb71c346c89ce017fc07fef1f89ce30485addff44962f767db592c4e2fc3a21c5ad78cae59c9221218f8762d8a167f6c64093d37aa61a5ee176
|
data/.rubocop_todo.yml
CHANGED
@@ -6,108 +6,19 @@
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
10
|
-
# Configuration parameters: AllowSafeAssignment.
|
11
|
-
Lint/AssignmentInCondition:
|
12
|
-
Exclude:
|
13
|
-
- 'lib/trace_location/cli.rb'
|
14
|
-
|
15
9
|
# Configuration parameters: AllowComments, AllowNil.
|
16
10
|
Lint/SuppressedException:
|
17
11
|
Exclude:
|
18
12
|
- 'lib/trace_location/collector.rb'
|
19
13
|
|
20
|
-
# This cop supports safe autocorrection (--autocorrect).
|
21
|
-
# Configuration parameters: EnforcedStyle.
|
22
|
-
# SupportedStyles: be, be_nil
|
23
|
-
RSpec/BeNil:
|
24
|
-
Exclude:
|
25
|
-
- 'spec/trace_location_spec.rb'
|
26
|
-
|
27
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
28
|
-
# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
|
29
|
-
# SupportedStyles: described_class, explicit
|
30
|
-
RSpec/DescribedClass:
|
31
|
-
Exclude:
|
32
|
-
- 'spec/trace_location_spec.rb'
|
33
|
-
|
34
|
-
# This cop supports safe autocorrection (--autocorrect).
|
35
|
-
# Configuration parameters: AutoCorrect.
|
36
|
-
RSpec/HooksBeforeExamples:
|
37
|
-
Exclude:
|
38
|
-
- 'spec/trace_location_spec.rb'
|
39
|
-
|
40
14
|
# Configuration parameters: Max, AllowedGroups.
|
41
15
|
RSpec/NestedGroups:
|
42
16
|
Exclude:
|
43
17
|
- 'spec/trace_location_spec.rb'
|
44
18
|
|
45
|
-
Security/Eval:
|
46
|
-
Exclude:
|
47
|
-
- 'lib/trace_location/cli.rb'
|
48
|
-
|
49
|
-
# This cop supports safe autocorrection (--autocorrect).
|
50
|
-
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
51
|
-
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
52
|
-
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
53
|
-
# FunctionalMethods: let, let!, subject, watch
|
54
|
-
# AllowedMethods: lambda, proc, it
|
55
|
-
Style/BlockDelimiters:
|
56
|
-
Exclude:
|
57
|
-
- 'spec/trace_location_spec.rb'
|
58
|
-
|
59
19
|
# Configuration parameters: AllowedConstants.
|
60
20
|
Style/Documentation:
|
61
21
|
Exclude:
|
62
22
|
- 'spec/**/*'
|
63
23
|
- 'test/**/*'
|
64
24
|
- 'lib/trace_location/cli.rb'
|
65
|
-
|
66
|
-
# This cop supports safe autocorrection (--autocorrect).
|
67
|
-
Style/EvalWithLocation:
|
68
|
-
Exclude:
|
69
|
-
- 'spec/trace_location_spec.rb'
|
70
|
-
|
71
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
72
|
-
# Configuration parameters: EnforcedStyle.
|
73
|
-
# SupportedStyles: always, always_true, never
|
74
|
-
Style/FrozenStringLiteralComment:
|
75
|
-
Exclude:
|
76
|
-
- 'exe/trace_location'
|
77
|
-
- 'lib/trace_location/cli.rb'
|
78
|
-
|
79
|
-
# This cop supports safe autocorrection (--autocorrect).
|
80
|
-
Style/RedundantFreeze:
|
81
|
-
Exclude:
|
82
|
-
- 'lib/trace_location/event.rb'
|
83
|
-
|
84
|
-
# This cop supports safe autocorrection (--autocorrect).
|
85
|
-
Style/RedundantRegexpEscape:
|
86
|
-
Exclude:
|
87
|
-
- 'lib/trace_location/event.rb'
|
88
|
-
|
89
|
-
# This cop supports safe autocorrection (--autocorrect).
|
90
|
-
# Configuration parameters: AllowAsExpressionSeparator.
|
91
|
-
Style/Semicolon:
|
92
|
-
Exclude:
|
93
|
-
- 'spec/trace_location_spec.rb'
|
94
|
-
|
95
|
-
# This cop supports safe autocorrection (--autocorrect).
|
96
|
-
Style/StderrPuts:
|
97
|
-
Exclude:
|
98
|
-
- 'lib/trace_location.rb'
|
99
|
-
|
100
|
-
# This cop supports safe autocorrection (--autocorrect).
|
101
|
-
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
102
|
-
# SupportedStyles: single_quotes, double_quotes
|
103
|
-
Style/StringLiterals:
|
104
|
-
Exclude:
|
105
|
-
- 'lib/trace_location.rb'
|
106
|
-
|
107
|
-
# This cop supports safe autocorrection (--autocorrect).
|
108
|
-
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
109
|
-
# URISchemes: http, https
|
110
|
-
Layout/LineLength:
|
111
|
-
Exclude:
|
112
|
-
- 'lib/trace_location/event.rb'
|
113
|
-
- 'trace_location.gemspec'
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/exe/trace_location
CHANGED
data/lib/trace_location/cli.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'optparse'
|
2
4
|
|
3
5
|
module TraceLocation
|
@@ -20,7 +22,7 @@ module TraceLocation
|
|
20
22
|
opt.order!(argv, into: params)
|
21
23
|
params.transform_keys! { |k| k.to_s.gsub('-', '_').to_sym }
|
22
24
|
|
23
|
-
if code = params.delete(:e)
|
25
|
+
if (code = params.delete(:e))
|
24
26
|
exec_code code, params
|
25
27
|
else
|
26
28
|
file = argv.shift
|
@@ -52,7 +54,7 @@ module TraceLocation
|
|
52
54
|
|
53
55
|
def exec_code(code, params)
|
54
56
|
TraceLocation.trace(params) do
|
55
|
-
eval code
|
57
|
+
eval code # rubocop:disable Security/Eval
|
56
58
|
end
|
57
59
|
end
|
58
60
|
end
|
data/lib/trace_location/event.rb
CHANGED
@@ -2,10 +2,12 @@
|
|
2
2
|
|
3
3
|
module TraceLocation
|
4
4
|
class Event # :nodoc:
|
5
|
-
CLASS_FORMAT = /\A#<(?:Class|refinement)
|
6
|
-
attr_reader :id, :event, :path, :lineno, :caller_path, :caller_lineno, :owner, :name, :source, :hierarchy,
|
5
|
+
CLASS_FORMAT = /\A#<(?:Class|refinement):([A-Za-z0-9:]+).*>\z/
|
6
|
+
attr_reader :id, :event, :path, :lineno, :caller_path, :caller_lineno, :owner, :name, :source, :hierarchy,
|
7
|
+
:is_module
|
7
8
|
|
8
|
-
def initialize(id:, event:, path:, lineno:, caller_path:, caller_lineno:, owner:, name:, source:, hierarchy:,
|
9
|
+
def initialize(id:, event:, path:, lineno:, caller_path:, caller_lineno:, owner:, name:, source:, hierarchy:,
|
10
|
+
is_module:)
|
9
11
|
@id = id
|
10
12
|
@event = event
|
11
13
|
@path = path
|
data/lib/trace_location.rb
CHANGED
@@ -15,8 +15,8 @@ module TraceLocation # :nodoc:
|
|
15
15
|
Report.build(result.events, result.return_value, options).generate
|
16
16
|
true
|
17
17
|
rescue StandardError => e
|
18
|
-
|
19
|
-
|
18
|
+
warn 'Failure: TraceLocation got an unexpected error.'
|
19
|
+
warn e.full_message
|
20
20
|
false
|
21
21
|
end
|
22
22
|
|
data/trace_location.gemspec
CHANGED
@@ -7,11 +7,14 @@ require 'trace_location/version'
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = 'trace_location'
|
9
9
|
s.version = TraceLocation::VERSION
|
10
|
-
s.authors = ['Yoshiyuki Hirano'
|
11
|
-
s.email = ['yhirano@me.com'
|
10
|
+
s.authors = ['Yoshiyuki Hirano']
|
11
|
+
s.email = ['yhirano@me.com']
|
12
12
|
s.homepage = 'https://github.com/yhirano55/trace_location'
|
13
13
|
s.summary = 'helps you get tracing the source location of codes'
|
14
|
-
s.description =
|
14
|
+
s.description = <<~DESCRIPTION
|
15
|
+
TraceLocation helps you get tracing the source location of codes,
|
16
|
+
and helps you can get reading the huge open souce libraries in Ruby
|
17
|
+
DESCRIPTION
|
15
18
|
s.license = 'MIT'
|
16
19
|
s.files = Dir.chdir(File.expand_path('.', __dir__)) do
|
17
20
|
`git ls-files -z`.split("\x0").reject do |f|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trace_location
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoshiyuki Hirano
|
8
|
-
- Misaki Shioi
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
10
|
+
date: 2025-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: csv
|
@@ -80,11 +79,11 @@ dependencies:
|
|
80
79
|
- - ">="
|
81
80
|
- !ruby/object:Gem::Version
|
82
81
|
version: '0'
|
83
|
-
description:
|
84
|
-
helps you
|
82
|
+
description: |
|
83
|
+
TraceLocation helps you get tracing the source location of codes,
|
84
|
+
and helps you can get reading the huge open souce libraries in Ruby
|
85
85
|
email:
|
86
86
|
- yhirano@me.com
|
87
|
-
- shioi.mm@gmail.com
|
88
87
|
executables:
|
89
88
|
- trace_location
|
90
89
|
extensions: []
|