appmap 0.89.0 → 0.90.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.travis.yml +0 -1
- data/CHANGELOG.md +20 -0
- data/appmap.gemspec +2 -0
- data/lib/appmap/class_map.rb +1 -4
- data/lib/appmap/config.rb +18 -12
- data/lib/appmap/trace.rb +20 -2
- data/lib/appmap/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8c53e191f43fe539ca2fd9381bf690597ec89b96ab1848680344b3d52a1b8f6
|
4
|
+
data.tar.gz: 1ee5593abdd95aefcc4b10a9ac717ea281e27885a4fd6a89fa0dc10ea5c2f66a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c718347cfdb809cdfbdd46bee5399a98e6100d5afc3120e060f297d6f950227f1e263fab6baf5b705c4ec3573ef2f9aa1d1e96aff2053e120de1a2cc7dc4a55e
|
7
|
+
data.tar.gz: 89e90d35c06c1ae3db76bb58481dce70420081c92e386dc1b75922fbe53fcdac2609f157967fdacf476e3ed9c5f5c79bcfe83a88e56f84ab14aebaaab36fccfe
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,23 @@
|
|
1
|
+
## [0.90.1](https://github.com/applandinc/appmap-ruby/compare/v0.90.0...v0.90.1) (2022-09-19)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* Faster comment extraction ([f6199a6](https://github.com/applandinc/appmap-ruby/commit/f6199a607fadd58500d9cdc9394b39413e6b2930))
|
7
|
+
|
8
|
+
|
9
|
+
### Performance Improvements
|
10
|
+
|
11
|
+
* Don't save comment and source in classmap. ([c3c8e75](https://github.com/applandinc/appmap-ruby/commit/c3c8e755677d169610bfa7e55c12f0d418120eb7))
|
12
|
+
|
13
|
+
# [0.90.0](https://github.com/applandinc/appmap-ruby/compare/v0.89.0...v0.90.0) (2022-09-15)
|
14
|
+
|
15
|
+
|
16
|
+
### Features
|
17
|
+
|
18
|
+
* Include required_ruby_version in the gemspec ([a5d7c6b](https://github.com/applandinc/appmap-ruby/commit/a5d7c6b7b255f817f3ceec5924cd799d2565daa4))
|
19
|
+
* Save default appmap.yml ([77a08d5](https://github.com/applandinc/appmap-ruby/commit/77a08d5ebbe2f49f19237242a62d05aadcc84228))
|
20
|
+
|
1
21
|
# [0.89.0](https://github.com/applandinc/appmap-ruby/compare/v0.88.0...v0.89.0) (2022-09-07)
|
2
22
|
|
3
23
|
|
data/appmap.gemspec
CHANGED
@@ -12,6 +12,8 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.authors = ['Kevin Gilpin']
|
13
13
|
spec.email = ['kgilpin@gmail.com']
|
14
14
|
|
15
|
+
spec.required_ruby_version = '>= 2.6.0'
|
16
|
+
|
15
17
|
spec.summary = %q{Record the operation of a Ruby program, using the AppLand 'AppMap' format.}
|
16
18
|
spec.homepage = AppMap::URL
|
17
19
|
spec.license = 'MIT'
|
data/lib/appmap/class_map.rb
CHANGED
@@ -50,7 +50,7 @@ module AppMap
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
Function = Struct.new(:name) do
|
53
|
-
attr_accessor :static, :location, :labels
|
53
|
+
attr_accessor :static, :location, :labels
|
54
54
|
|
55
55
|
def type
|
56
56
|
'function'
|
@@ -63,8 +63,6 @@ module AppMap
|
|
63
63
|
location: location,
|
64
64
|
static: static,
|
65
65
|
labels: labels,
|
66
|
-
comment: comment,
|
67
|
-
source: source
|
68
66
|
}.delete_if { |_, v| v.nil? || v == [] }
|
69
67
|
end
|
70
68
|
end
|
@@ -126,7 +124,6 @@ module AppMap
|
|
126
124
|
end
|
127
125
|
|
128
126
|
comment = method.comment
|
129
|
-
function_info[:comment] = comment unless Util.blank?(comment)
|
130
127
|
|
131
128
|
function_info[:labels] = parse_labels(comment) + (method.labels || [])
|
132
129
|
object_infos << function_info
|
data/lib/appmap/config.rb
CHANGED
@@ -338,28 +338,34 @@ module AppMap
|
|
338
338
|
AppMap uses this file to customize its behavior. For example, you can use
|
339
339
|
the 'packages' setting to indicate which local file paths and dependency
|
340
340
|
gems you want to include in the AppMap. Since you haven't provided specific
|
341
|
-
settings, the appmap gem will
|
342
|
-
To suppress this message, create the file:
|
343
|
-
|
344
|
-
#{Pathname.new(config_file_name).expand_path}
|
345
|
-
|
346
|
-
Here are the default settings that will be used in the meantime. You can
|
347
|
-
copy and paste this example to start your appmap.yml.
|
341
|
+
settings, the appmap gem will use these default options:
|
348
342
|
MISSING_FILE_MSG
|
349
343
|
{}
|
350
344
|
end
|
351
345
|
|
352
346
|
load(config_data).tap do |config|
|
353
|
-
|
347
|
+
{
|
354
348
|
'name' => config.name,
|
355
349
|
'packages' => config.packages.select{|p| p.path}.map do |pkg|
|
356
350
|
{ 'path' => pkg.path }
|
357
351
|
end,
|
358
352
|
'exclude' => []
|
359
|
-
}.compact
|
360
|
-
|
361
|
-
|
362
|
-
|
353
|
+
}.compact.tap do |config_yaml|
|
354
|
+
unless config_present
|
355
|
+
warn Util.color(YAML.dump(config_yaml), :magenta)
|
356
|
+
dirname = Pathname.new(config_file_name).dirname.expand_path
|
357
|
+
if Dir.exists?(dirname) && File.writable?(dirname)
|
358
|
+
warn Util.color(<<~CONFIG_FILE_MSG, :magenta)
|
359
|
+
This file will be saved to #{Pathname.new(config_file_name).expand_path},
|
360
|
+
where you can customize it.
|
361
|
+
CONFIG_FILE_MSG
|
362
|
+
File.write(config_file_name, YAML.dump(config_yaml))
|
363
|
+
end
|
364
|
+
warn Util.color(<<~CONFIG_FILE_MSG, :magenta)
|
365
|
+
For more information, see https://appmap.io/docs/reference/appmap-ruby.html#configuration
|
366
|
+
CONFIG_FILE_MSG
|
367
|
+
warn logo.()
|
368
|
+
end
|
363
369
|
end
|
364
370
|
end
|
365
371
|
end
|
data/lib/appmap/trace.rb
CHANGED
@@ -21,8 +21,11 @@ module AppMap
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def comment
|
24
|
-
|
25
|
-
|
24
|
+
return nil if source_location.nil? || source_location.first.start_with?('<')
|
25
|
+
|
26
|
+
# Do not use method_source's comment method because it's slow
|
27
|
+
@comment ||= RubyMethod.last_comment *source_location
|
28
|
+
rescue Errno::EINVAL, Errno::ENOENT
|
26
29
|
nil
|
27
30
|
end
|
28
31
|
|
@@ -37,6 +40,21 @@ module AppMap
|
|
37
40
|
def labels
|
38
41
|
@package.labels
|
39
42
|
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
# Read file and get last comment before line.
|
47
|
+
def self.last_comment(file, line_number)
|
48
|
+
File.open(file) do |f|
|
49
|
+
buffer = []
|
50
|
+
f.each_line.lazy.take(line_number - 1).reverse_each do |line|
|
51
|
+
break unless (line =~ /^\s*#/) || (line =~ /^\s*$/)
|
52
|
+
|
53
|
+
buffer << line.lstrip
|
54
|
+
end
|
55
|
+
buffer.reverse.join
|
56
|
+
end
|
57
|
+
end
|
40
58
|
end
|
41
59
|
|
42
60
|
class Tracing
|
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.
|
4
|
+
version: 0.90.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: 2022-09-
|
11
|
+
date: 2022-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: method_source
|
@@ -446,7 +446,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
446
446
|
requirements:
|
447
447
|
- - ">="
|
448
448
|
- !ruby/object:Gem::Version
|
449
|
-
version:
|
449
|
+
version: 2.6.0
|
450
450
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
451
451
|
requirements:
|
452
452
|
- - ">="
|