appmap 0.97.0 → 0.98.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: d8f61995f7dd2cfd9ac33245e4248b4e3fb54f3063eacee3070da171ef852847
4
- data.tar.gz: ff3648db694330d2d8242601fc6380320fa49252f68065fa1a7e1f416e96fbe2
3
+ metadata.gz: 8e852506550e061f5525d6dc83fd12facb5a77f17d1e3bcc78573c0a9d71294a
4
+ data.tar.gz: 0dea32a345dee9a20a91d2b1e034cbad8fcaae03dbc75d6f64c88639219241c0
5
5
  SHA512:
6
- metadata.gz: da483d2262fa5f9691bb59293f5ec5d7a0a5b3910b68db99171e7d9b4b398e3203f8cbbe614407e91bc4d82e50c2bbf35a62562b1e31a2f59820ef893e0e7506
7
- data.tar.gz: f7e30a0d17c134e5dd2f261707a8b4594c39ec795bbef8ef35af71e26c51b70ebd500cfe020b2f736be0b0bd1afb84baeff49d36624233234e07a936eb467ce4
6
+ metadata.gz: bb509b820a5b0c29bb906c9bf37b75bcad27f5abf6d36df19b2a1d4cbba7969e8b548a8e9fc5f77c6f5d9db1e5a7d607bdf52b41859ef5b0b9e77400c60a8324
7
+ data.tar.gz: 9d35cb3828fa3088825f933242c60e61d4fc71ec06bda382874424f6b3401cb55c9b14545e72976b1ea1d80df8fd642cea147d39c315507250a525dd48a35cff
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## [0.98.1](https://github.com/getappmap/appmap-ruby/compare/v0.98.0...v0.98.1) (2023-03-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Prevent AppMaps from being constantly re-indexed ([0311ab4](https://github.com/getappmap/appmap-ruby/commit/0311ab4c2f759e8c471982d47e6038e3aaa9f908))
7
+ * Report test_status from minitest ([659f89a](https://github.com/getappmap/appmap-ruby/commit/659f89aa5a11280eb886abe14ec0c70790cb07a7))
8
+
9
+ # [0.98.0](https://github.com/getappmap/appmap-ruby/compare/v0.97.0...v0.98.0) (2023-02-22)
10
+
11
+
12
+ ### Features
13
+
14
+ * Allow environment configuration of property value inspection ([20579d3](https://github.com/getappmap/appmap-ruby/commit/20579d3b481e08b6949c9c593c3cb44d1fec37e3))
15
+
1
16
  # [0.97.0](https://github.com/getappmap/appmap-ruby/compare/v0.96.0...v0.97.0) (2023-02-10)
2
17
 
3
18
 
data/README.md CHANGED
@@ -22,7 +22,7 @@ granular than a full debug trace. It's designed to be optimal for understanding
22
22
  Visit the [AppMap for Ruby](https://appland.com/docs/reference/appmap-ruby.html) reference page on AppLand.com for a complete reference guide.
23
23
 
24
24
  # Development
25
- [![Build Status](https://travis-ci.com/applandinc/appmap-ruby.svg?branch=master)](https://travis-ci.com/applandinc/appmap-ruby)
25
+ [![Build Status](https://travis-ci.com/getappmap/appmap-ruby.svg?branch=master)](https://travis-ci.com/getappmap/appmap-ruby)
26
26
 
27
27
  ## Internal architecture
28
28
 
data/appmap.yml CHANGED
@@ -1,2 +1,3 @@
1
1
  name: AppMap Rubygem
2
2
  packages: []
3
+ appmap_dir: dummy
@@ -11,7 +11,7 @@ module AppMap
11
11
  # be activated around each test.
12
12
  module Minitest
13
13
  APPMAP_OUTPUT_DIR = 'tmp/appmap/minitest'
14
- LOG = ( ENV['APPMAP_DEBUG'] == 'true' || ENV['DEBUG'] == 'true' )
14
+ LOG = (ENV['APPMAP_DEBUG'] == 'true' || ENV['DEBUG'] == 'true')
15
15
 
16
16
  def self.metadata
17
17
  AppMap.detect_metadata
@@ -29,9 +29,8 @@ module AppMap
29
29
  test.method(test_name).source_location.join(':')
30
30
  end
31
31
 
32
-
33
- def finish(exception)
34
- warn "Finishing recording of test #{test.class}.#{test.name}" if AppMap::Minitest::LOG
32
+ def finish(failed, exception)
33
+ warn "Finishing recording of #{failed || exception ? 'failed ' : ''} test #{test.class}.#{test.name}" if AppMap::Minitest::LOG
35
34
  warn "Exception: #{exception}" if exception && AppMap::Minitest::LOG
36
35
 
37
36
  events = []
@@ -45,12 +44,12 @@ module AppMap
45
44
 
46
45
  feature_group = test.class.name.underscore.split('_')[0...-1].join('_').capitalize
47
46
  feature_name = test.name.split('_')[1..-1].join(' ')
48
- scenario_name = [ feature_group, feature_name ].join(' ')
47
+ scenario_name = [feature_group, feature_name].join(' ')
49
48
 
50
49
  AppMap::Minitest.save name: scenario_name,
51
50
  class_map: class_map,
52
51
  source_location: source_location,
53
- test_status: exception ? 'failed' : 'succeeded',
52
+ test_status: failed || exception ? 'failed' : 'succeeded',
54
53
  exception: exception,
55
54
  events: events
56
55
  end
@@ -80,11 +79,11 @@ module AppMap
80
79
  recording = @recordings_by_test.delete(test.object_id)
81
80
  return warn "No recording found for #{test}" unless recording
82
81
 
83
- recording.finish exception
82
+ recording.finish (test.failures || []).any?, exception
84
83
  end
85
84
 
86
85
  def config
87
- @config or raise "AppMap is not configured"
86
+ @config or raise 'AppMap is not configured'
88
87
  end
89
88
 
90
89
  def add_event_methods(event_methods)
@@ -99,17 +98,17 @@ module AppMap
99
98
  m[:frameworks] ||= []
100
99
  m[:frameworks] << {
101
100
  name: 'minitest',
102
- version: Gem.loaded_specs['minitest']&.version&.to_s
101
+ version: Gem.loaded_specs['minitest']&.version&.to_s,
103
102
  }
104
103
  m[:recorder] = {
105
104
  name: 'minitest',
106
- type: 'tests'
105
+ type: 'tests',
107
106
  }
108
107
  m[:test_status] = test_status
109
108
  if exception
110
109
  m[:exception] = {
111
110
  class: exception.class.name,
112
- message: AppMap::Event::MethodEvent.display_string(exception.to_s)
111
+ message: AppMap::Event::MethodEvent.display_string(exception.to_s),
113
112
  }
114
113
  end
115
114
  end
@@ -118,7 +117,7 @@ module AppMap
118
117
  version: AppMap::APPMAP_FORMAT_VERSION,
119
118
  metadata: metadata,
120
119
  classMap: class_map,
121
- events: events
120
+ events: events,
122
121
  }.compact
123
122
  fname = AppMap::Util.scenario_filename(name)
124
123
 
@@ -2,8 +2,8 @@ module AppMap
2
2
  module ValueInspector
3
3
  extend self
4
4
 
5
- MAX_DEPTH = 3
6
- MAX_ARRAY_ELEMENTS = 5
5
+ MAX_DEPTH = ENV.fetch('APPMAP_PROPERTY_MAX_DEPTH', 3).to_i
6
+ MAX_ARRAY_ELEMENTS = ENV.fetch('APPMAP_PROPERTY_MAX_ARRAY_ELEMENTS', 5).to_i
7
7
 
8
8
  def detect_size(value)
9
9
  # Don't risk calling #size on things like data-access objects, which can and will issue queries for this information.
@@ -3,7 +3,7 @@
3
3
  module AppMap
4
4
  URL = 'https://github.com/applandinc/appmap-ruby'
5
5
 
6
- VERSION = '0.97.0'
6
+ VERSION = '0.98.1'
7
7
 
8
8
  APPMAP_FORMAT_VERSION = '1.10.0'
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.97.0
4
+ version: 0.98.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: 2023-02-10 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: method_source