appmap 0.59.0 → 0.59.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/appmap/event.rb +8 -0
- data/lib/appmap/handler/rails/template.rb +9 -4
- data/lib/appmap/trace.rb +2 -2
- data/lib/appmap/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: 63240e66f2942705bc89667ac6bdf7af49fc9e1c2225d4a6ffd243ad43ccbb80
|
4
|
+
data.tar.gz: 7f0d20e3b75dee93c32cab9d99844528ba35aa2e4987ec649e3194a806b1de8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f3892093241092685b18ebd1f5f2a63e4f697c6099b32bd6cabfe2edba79448542ecc7c3080c69e4bdad8732805e69bd80b5bbc2c3b21a15f4085d3034520d1
|
7
|
+
data.tar.gz: 8279d3bd2403bf28f255c7c985e90760e7700a865259865a89ec793cf5539a5caab7810b153a1bc9ca2b09c9654edd84db94c1535fdd155ea4d7181dfc914eef
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.59.1](https://github.com/applandinc/appmap-ruby/compare/v0.59.0...v0.59.1) (2021-07-08)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* Events may be constructed in stages ([b0b23f5](https://github.com/applandinc/appmap-ruby/commit/b0b23f59a84158b8162424b84430894fe4278324))
|
7
|
+
|
1
8
|
# [0.59.0](https://github.com/applandinc/appmap-ruby/compare/v0.58.0...v0.59.0) (2021-07-07)
|
2
9
|
|
3
10
|
|
data/lib/appmap/event.rb
CHANGED
@@ -119,6 +119,14 @@ module AppMap
|
|
119
119
|
end
|
120
120
|
end
|
121
121
|
end
|
122
|
+
|
123
|
+
# An event may be partially constructed, and then completed at a later time. When the event
|
124
|
+
# is only partially constructed, it's not ready for serialization to the AppMap file.
|
125
|
+
#
|
126
|
+
# @return false until the event is fully constructed and available.
|
127
|
+
def ready?
|
128
|
+
true
|
129
|
+
end
|
122
130
|
|
123
131
|
protected
|
124
132
|
|
@@ -71,11 +71,16 @@ module AppMap
|
|
71
71
|
attr_reader :render_instance
|
72
72
|
# Path to the view template.
|
73
73
|
attr_accessor :path
|
74
|
-
|
74
|
+
# Indicates when the event is fully constructed.
|
75
|
+
attr_accessor :ready
|
76
|
+
|
77
|
+
alias ready? ready
|
78
|
+
|
75
79
|
def initialize(render_instance)
|
76
80
|
super :call
|
77
81
|
|
78
82
|
AppMap::Event::MethodEvent.build_from_invocation(:call, event: self)
|
83
|
+
@ready = false
|
79
84
|
@render_instance = render_instance
|
80
85
|
end
|
81
86
|
|
@@ -95,8 +100,7 @@ module AppMap
|
|
95
100
|
object_id: render_instance.__id__,
|
96
101
|
value: AppMap::Event::MethodEvent.display_string(render_instance)
|
97
102
|
}
|
98
|
-
|
99
|
-
end
|
103
|
+
end.compact
|
100
104
|
end
|
101
105
|
end
|
102
106
|
|
@@ -158,7 +162,8 @@ module AppMap
|
|
158
162
|
end
|
159
163
|
|
160
164
|
def handle_return(call_event_id, elapsed, return_value, exception)
|
161
|
-
Array(Thread.current[TEMPLATE_RENDERER]).pop
|
165
|
+
template_call = Array(Thread.current[TEMPLATE_RENDERER]).pop
|
166
|
+
template_call.ready = true
|
162
167
|
|
163
168
|
AppMap::Event::MethodReturnIgnoreValue.build_from_invocation(call_event_id, elapsed: elapsed)
|
164
169
|
end
|
data/lib/appmap/trace.rb
CHANGED
@@ -143,12 +143,12 @@ module AppMap
|
|
143
143
|
|
144
144
|
# Whether there is an event available for processing.
|
145
145
|
def event?
|
146
|
-
!@events.empty?
|
146
|
+
!@events.empty? && @events.first.ready?
|
147
147
|
end
|
148
148
|
|
149
149
|
# Gets the next available event, if any.
|
150
150
|
def next_event
|
151
|
-
@events.shift
|
151
|
+
@events.shift if event?
|
152
152
|
end
|
153
153
|
end
|
154
154
|
end
|
data/lib/appmap/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appmap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.59.
|
4
|
+
version: 0.59.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Gilpin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|