appmap 0.81.0 → 0.83.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +28 -0
- data/lib/appmap/builtin_hooks/ruby.yml +0 -11
- data/lib/appmap/command/agent_setup/init.rb +3 -1
- data/lib/appmap/gem_hooks/actionpack.yml +4 -0
- data/lib/appmap/gem_hooks/pandoc-ruby.yml +3 -0
- data/lib/appmap/hook.rb +1 -1
- data/lib/appmap/open.rb +1 -1
- data/lib/appmap/service/config_analyzer.rb +5 -0
- data/lib/appmap/service/guesser.rb +2 -1
- data/lib/appmap/service/validator/config_validator.rb +1 -0
- data/lib/appmap/version.rb +2 -2
- data/spec/depends/api_spec.rb +21 -17
- data/spec/fixtures/config/maximal_config.yml +14 -0
- data/spec/fixtures/config/valid_config.yml +1 -1
- data/spec/hook_spec.rb +10 -6
- data/spec/remote_recording_spec.rb +6 -4
- data/spec/service/config_analyzer_spec.rb +10 -4
- data/test/agent_setup_init_test.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 447831123769ff227fed969398dbaad500f5c002e976414ed3cc10e914d2b76e
|
4
|
+
data.tar.gz: 47bdb94fbe52785cc7f68fbdfc20d9d50e96a33173dba68e52ab58334eaa5d84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 790f9967ee6d587acc2c21e594b3147487b798c5d0f83ff52495af3d51b7be80796ba4e68c379055e2accb151a067965a9c8925a38432151b8bb74c5361f6f7a
|
7
|
+
data.tar.gz: ac70307f9221d105c86cc5919e31d3eb4d23f4a91b8c04578ba6d3b8425628d2cd89f90af706f607cce9ae4c5f3eabc4a3237d9a47456f13244b0800e72c4078
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,31 @@
|
|
1
|
+
# [0.83.0](https://github.com/applandinc/appmap-ruby/compare/v0.82.0...v0.83.0) (2022-04-29)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* #before_setup is lang.eval.safe and deserialize.safe ([cf03641](https://github.com/applandinc/appmap-ruby/commit/cf03641dacc1c50aa8ec9803e27936df06acf592))
|
7
|
+
* pandoc-ruby is system.exec.safe ([2b3ec8e](https://github.com/applandinc/appmap-ruby/commit/2b3ec8ecc762b1209dc070bc5dc4ec5f33d7eec9))
|
8
|
+
|
9
|
+
# [0.82.0](https://github.com/applandinc/appmap-ruby/compare/v0.81.1...v0.82.0) (2022-04-27)
|
10
|
+
|
11
|
+
|
12
|
+
### Bug Fixes
|
13
|
+
|
14
|
+
* Guess 'app' as the source path ([090f9f3](https://github.com/applandinc/appmap-ruby/commit/090f9f39616accd3bc1e9d3cc5f7991232fe5663))
|
15
|
+
|
16
|
+
|
17
|
+
### Features
|
18
|
+
|
19
|
+
* install command emits language, appmap_dir ([f780095](https://github.com/applandinc/appmap-ruby/commit/f780095269352e30637de3300dd76b2d6c051022))
|
20
|
+
|
21
|
+
## [0.81.1](https://github.com/applandinc/appmap-ruby/compare/v0.81.0...v0.81.1) (2022-04-27)
|
22
|
+
|
23
|
+
|
24
|
+
### Bug Fixes
|
25
|
+
|
26
|
+
* AppMap format version is 1.7.0 ([53b3f04](https://github.com/applandinc/appmap-ruby/commit/53b3f04dc4f4a7867f28f5b196b2fadbe7cb6eeb))
|
27
|
+
* Avoid return within a block (Ruby 2.5) ([85094fd](https://github.com/applandinc/appmap-ruby/commit/85094fd760b3ea08d343960cf586f4cce210fb07))
|
28
|
+
|
1
29
|
# [0.81.0](https://github.com/applandinc/appmap-ruby/compare/v0.80.2...v0.81.0) (2022-04-26)
|
2
30
|
|
3
31
|
|
@@ -19,17 +19,6 @@
|
|
19
19
|
require_name: ruby
|
20
20
|
label: lang.eval
|
21
21
|
handler_class: AppMap::Handler::Eval
|
22
|
-
# TODO: eval does not happen in the right context, and therefore any new constants
|
23
|
-
# which are defined are placed on the wrong module/class.
|
24
|
-
# - Binding#eval
|
25
|
-
# - BasicObject#instance_eval
|
26
|
-
# These methods cannot be hooked as far as I can tell.
|
27
|
-
# Why? When calling one of these functions, the context at the point of
|
28
|
-
# definition is used. It's not possible to bind class_eval to a new context.
|
29
|
-
# - Module#class_eval
|
30
|
-
# - Module#module_eval
|
31
|
-
# require_name: ruby
|
32
|
-
# label: lang.eval
|
33
22
|
- methods:
|
34
23
|
- IO#popen
|
35
24
|
- Kernel#exec
|
@@ -13,7 +13,9 @@ module AppMap
|
|
13
13
|
def perform
|
14
14
|
config = {
|
15
15
|
'name' => Service::Guesser.guess_name,
|
16
|
-
'packages' => Service::Guesser.guess_paths.map { |path| { 'path' => path } }
|
16
|
+
'packages' => Service::Guesser.guess_paths.map { |path| { 'path' => path } },
|
17
|
+
'language' => 'ruby',
|
18
|
+
'appmap_dir' => 'tmp/appmap'
|
17
19
|
}
|
18
20
|
|
19
21
|
result = {
|
data/lib/appmap/hook.rb
CHANGED
@@ -116,7 +116,7 @@ module AppMap
|
|
116
116
|
|
117
117
|
hook_method = lambda do |entry|
|
118
118
|
cls, method = entry
|
119
|
-
|
119
|
+
next if config.never_hook?(cls, method)
|
120
120
|
|
121
121
|
hook.package.handler_class.new(hook.package, cls, method).activate
|
122
122
|
end
|
data/lib/appmap/open.rb
CHANGED
@@ -3,10 +3,11 @@
|
|
3
3
|
module AppMap
|
4
4
|
module Service
|
5
5
|
class Guesser
|
6
|
-
POSSIBLE_PATHS = %w[app
|
6
|
+
POSSIBLE_PATHS = %w[app lib]
|
7
7
|
class << self
|
8
8
|
def guess_name
|
9
9
|
return Pathname.new(`git rev-parse --show-toplevel`.strip).basename.to_s if File.directory?('.git')
|
10
|
+
|
10
11
|
Dir.pwd.split('/').last
|
11
12
|
end
|
12
13
|
|
data/lib/appmap/version.rb
CHANGED
data/spec/depends/api_spec.rb
CHANGED
@@ -110,12 +110,14 @@ describe 'Depends API' do
|
|
110
110
|
|
111
111
|
describe 'smoke test' do
|
112
112
|
around do |test|
|
113
|
-
|
114
|
-
|
113
|
+
begin
|
114
|
+
@minitest_test_command_method = AppMap.configuration.depends_config.minitest_test_command_method
|
115
|
+
AppMap.configuration.depends_config.minitest_test_command_method = 'AppMap::Depends::APISpec.minitest_test_command'
|
115
116
|
|
116
|
-
|
117
|
-
|
118
|
-
|
117
|
+
test.call
|
118
|
+
ensure
|
119
|
+
AppMap.configuration.depends_config.minitest_test_command_method = @minitest_test_command
|
120
|
+
end
|
119
121
|
end
|
120
122
|
|
121
123
|
it 'passes a smoke test' do
|
@@ -125,20 +127,22 @@ describe 'Depends API' do
|
|
125
127
|
|
126
128
|
describe 'configuration settings' do
|
127
129
|
it 'can all be modified' do
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
%i[
|
132
|
-
|
133
|
-
|
134
|
-
|
130
|
+
begin
|
131
|
+
defaults = {}
|
132
|
+
|
133
|
+
%i[rspec minitest].each do |framework|
|
134
|
+
%i[environment_method select_tests_method test_command_method].each do |setting|
|
135
|
+
full_setting = [ framework, setting ].join('_').to_sym
|
136
|
+
defaults[full_setting] = AppMap.configuration.depends_config.send(full_setting)
|
137
|
+
AppMap.configuration.depends_config.send("#{full_setting}=", "AppMap::Depends::APISpec.#{full_setting}")
|
138
|
+
end
|
135
139
|
end
|
136
|
-
end
|
137
140
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
141
|
+
run_tests
|
142
|
+
ensure
|
143
|
+
defaults.keys.each do |setting|
|
144
|
+
AppMap.configuration.depends_config.send("#{setting}=", defaults[setting])
|
145
|
+
end
|
142
146
|
end
|
143
147
|
end
|
144
148
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
name: appmap
|
2
|
+
packages:
|
3
|
+
- path: app/models
|
4
|
+
exclude: app/models/helpers
|
5
|
+
- gem: rack
|
6
|
+
- gem: activesupport
|
7
|
+
shallow: false
|
8
|
+
functions:
|
9
|
+
- methods:
|
10
|
+
- OpenSSL::X509::Request#sign
|
11
|
+
- OpenSSL::X509::Request#verify
|
12
|
+
label: crypto.x509
|
13
|
+
language: ruby
|
14
|
+
appmap_dir: tmp/appmap
|
data/spec/hook_spec.rb
CHANGED
@@ -751,9 +751,11 @@ describe 'AppMap class Hooking' do
|
|
751
751
|
:lineno: 9
|
752
752
|
YAML
|
753
753
|
test_hook_behavior 'spec/fixtures/hook/exception_method.rb', events_yaml do
|
754
|
-
|
755
|
-
|
756
|
-
|
754
|
+
begin
|
755
|
+
ExceptionMethod.new.raise_exception
|
756
|
+
rescue
|
757
|
+
# don't let the exception fail the test
|
758
|
+
end
|
757
759
|
end
|
758
760
|
end
|
759
761
|
|
@@ -781,9 +783,11 @@ describe 'AppMap class Hooking' do
|
|
781
783
|
:lineno: 59
|
782
784
|
YAML
|
783
785
|
test_hook_behavior 'spec/fixtures/hook/exception_method.rb', events_yaml do
|
784
|
-
|
785
|
-
|
786
|
-
|
786
|
+
begin
|
787
|
+
ExceptionMethod.new.raise_illegal_utf8_message
|
788
|
+
rescue
|
789
|
+
# don't let the exception fail the test
|
790
|
+
end
|
787
791
|
end
|
788
792
|
end
|
789
793
|
|
@@ -18,10 +18,12 @@ describe 'remote recording', :order => :defined do
|
|
18
18
|
uri = URI("http://localhost:#{@service_port}/health")
|
19
19
|
|
20
20
|
100.times do
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
begin
|
22
|
+
Net::HTTP.get(uri)
|
23
|
+
break
|
24
|
+
rescue Errno::ECONNREFUSED
|
25
|
+
sleep 0.1
|
26
|
+
end
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
@@ -37,10 +37,8 @@ describe AppMap::Service::ConfigAnalyzer do
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
expect(subject.valid?).to be_falsey
|
43
|
-
end
|
40
|
+
it 'is valid' do
|
41
|
+
expect(subject.errors).to eq(['AppMap auto-configuration is currently not available for non Rails projects'])
|
44
42
|
end
|
45
43
|
|
46
44
|
describe '.is_present?' do
|
@@ -50,6 +48,14 @@ describe AppMap::Service::ConfigAnalyzer do
|
|
50
48
|
end
|
51
49
|
end
|
52
50
|
|
51
|
+
context 'with maximal valid config' do
|
52
|
+
let(:config_file) { 'spec/fixtures/config/maximal_config.yml'}
|
53
|
+
|
54
|
+
it 'is valid' do
|
55
|
+
expect(subject.errors).to eq(['AppMap auto-configuration is currently not available for non Rails projects'])
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
53
59
|
context 'with invalid YAML config' do
|
54
60
|
let(:config_file) { 'spec/fixtures/config/invalid_yaml_config.yml'}
|
55
61
|
|
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.83.0
|
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-04-
|
11
|
+
date: 2022-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -385,6 +385,7 @@ files:
|
|
385
385
|
- lib/appmap/gem_hooks/activesupport.yml
|
386
386
|
- lib/appmap/gem_hooks/cancancan.yml
|
387
387
|
- lib/appmap/gem_hooks/devise.yml
|
388
|
+
- lib/appmap/gem_hooks/pandoc-ruby.yml
|
388
389
|
- lib/appmap/gem_hooks/rails.yml
|
389
390
|
- lib/appmap/gem_hooks/railties.yml
|
390
391
|
- lib/appmap/gem_hooks/resque.yml
|
@@ -435,6 +436,7 @@ files:
|
|
435
436
|
- spec/fixtures/config/incomplete_config.yml
|
436
437
|
- spec/fixtures/config/invalid_config.yml
|
437
438
|
- spec/fixtures/config/invalid_yaml_config.yml
|
439
|
+
- spec/fixtures/config/maximal_config.yml
|
438
440
|
- spec/fixtures/config/missing_path_or_gem.yml
|
439
441
|
- spec/fixtures/config/valid_config.yml
|
440
442
|
- spec/fixtures/database.yml
|