call_graph 2.0.0 → 2.0.1
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 +4 -4
- data/lib/call_graph/instrument.rb +6 -6
- data/lib/call_graph/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9aa9591dd2c160eda92c8bdd25098f7fd312e9fd36b8983c8b4d851c2ed8ba7a
|
|
4
|
+
data.tar.gz: f8139a933276ce03c05e342738d586ec6b8fa9f8f5b5fe38e6d49c9bd920d240
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b9d8341aa5b6672b9df4826e5a8b6a9f6f0658a86a7a28509a50f19bcf9bb63af426f6ac6fef65f708fa054b9bf22fc36267cb044fb838afa25f8b4f006f9f62
|
|
7
|
+
data.tar.gz: cc187fa55259e8ba908fc2fe80fed98ce512dccfd03c4453f00f8c20e091e390d2f414ff9961d8eb95c84b0778d7b07309d9d3388b876ca80a2d6cfc3ad22fe8
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
require 'set'
|
|
2
2
|
require 'binding_of_caller'
|
|
3
3
|
|
|
4
|
-
INTROSPECT = "(self.class == Class ? self.name : self.class.name) + ' ' + (self.class == Class ? '(Class)' : '(Instance)')"
|
|
5
|
-
|
|
6
4
|
module CallGraph
|
|
7
5
|
class Instrument
|
|
6
|
+
INTROSPECT = "(self.class == Class ? self.name : self.class.name) + ' ' + (self.class == Class ? '(Class)' : '(Instance)') rescue binding.source_location"
|
|
7
|
+
|
|
8
8
|
attr_accessor :file_path, :set
|
|
9
9
|
|
|
10
10
|
def initialize(file_path: default_file_path)
|
|
@@ -16,10 +16,6 @@ module CallGraph
|
|
|
16
16
|
"#{file_path}.#{kind}"
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
def default_file_path
|
|
20
|
-
'call-graph'
|
|
21
|
-
end
|
|
22
|
-
|
|
23
19
|
def trace(&block)
|
|
24
20
|
trace_point.enable
|
|
25
21
|
yield
|
|
@@ -32,6 +28,10 @@ module CallGraph
|
|
|
32
28
|
|
|
33
29
|
private
|
|
34
30
|
|
|
31
|
+
def default_file_path
|
|
32
|
+
'call-graph'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
35
|
def trace_point
|
|
36
36
|
@trace_point ||= begin
|
|
37
37
|
TracePoint.new(:call) do |trace|
|
data/lib/call_graph/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: call_graph
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Moriarty
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-03-
|
|
11
|
+
date: 2019-03-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: binding_of_caller
|