appmap 0.59.0 → 0.59.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b0592a1e7b252df037c7e06986095c4e7f5feba8011a317e54edda181c53aed7
4
- data.tar.gz: 44d0c65506400e36016dd140e7f4a109f6495dd2ae6bdd893e038bd8c1504d95
3
+ metadata.gz: 63240e66f2942705bc89667ac6bdf7af49fc9e1c2225d4a6ffd243ad43ccbb80
4
+ data.tar.gz: 7f0d20e3b75dee93c32cab9d99844528ba35aa2e4987ec649e3194a806b1de8e
5
5
  SHA512:
6
- metadata.gz: cc7057bf09581066d6ef84f2f73b17ea9a3088ec6e19dfd90f2983a15706f98de6ca1e20ccfc949aad334ccfa7f0346474bd53899eefb9a44d871618c7c17995
7
- data.tar.gz: 4c86d5a8782501a8924f286e41334b79473d87990e7a731ee7832288ae81ad4db112d6826313dfae99cb1a5b418e77fbea63a3a2888ec9d09fffbbd98d0c7e80
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
- h.compact
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
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.59.0'
6
+ VERSION = '0.59.1'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.5.1'
9
9
 
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.0
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-07 00:00:00.000000000 Z
11
+ date: 2021-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport