appmap 0.83.1 → 0.83.4
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 +4 -4
- data/CHANGELOG.md +21 -0
- data/appmap.gemspec +2 -1
- data/lib/appmap/hook/method/ruby2.rb +7 -3
- data/lib/appmap/hook/method/ruby3.rb +7 -3
- data/lib/appmap/hook/method.rb +1 -1
- data/lib/appmap/version.rb +1 -1
- data/spec/handler/class_with_eval.rb +13 -0
- data/spec/handler/eval_spec.rb +7 -0
- metadata +3 -6
- data/spec/fixtures/depends/revoke_api_key.appmap.json +0 -901
- data/spec/fixtures/depends/user_page_scenario.appmap.json +0 -1776
- data/spec/fixtures/hook/revoke_api_key.appmap.json +0 -847
- data/spec/fixtures/hook/user_page_scenario.appmap.json +0 -1722
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc72653227c79221b4461962b65a221a454c63b564dc713b97ae6c9bb7724e94
|
4
|
+
data.tar.gz: df9594b7e3043183d9ddec1ad9c7e767aa72b8b60a4c7923a030f51dffb2a7ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac66c69ecb0564856a2ea6eebc0c9d81e7e78c583cb7cb33a271d51969c15985b1335eb5e2d7ae4c348f0dfada0ff7ae3e7f7df45fa53eae8e99b945e0e32a3b
|
7
|
+
data.tar.gz: 2173330d318f11cc5577c997516414809cd4fa27c0121592f9b6041d7b2eb27b12bc1e7aa3ab19dadf6a26afff255c484ad019bb61502f40813a14553e805dfd
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
+
## [0.83.4](https://github.com/applandinc/appmap-ruby/compare/v0.83.3...v0.83.4) (2022-06-22)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* Exclude AppMaps from the gem when packaging ([a0634f0](https://github.com/applandinc/appmap-ruby/commit/a0634f07db264daf51c6192b74ccbc08664ccac6))
|
7
|
+
|
8
|
+
## [0.83.3](https://github.com/applandinc/appmap-ruby/compare/v0.83.2...v0.83.3) (2022-06-03)
|
9
|
+
|
10
|
+
|
11
|
+
### Bug Fixes
|
12
|
+
|
13
|
+
* Eval handler now works correctly even when not tracing ([4c9c40a](https://github.com/applandinc/appmap-ruby/commit/4c9c40abd8c930837ce6e040c72893f284ce0899))
|
14
|
+
|
15
|
+
## [0.83.2](https://github.com/applandinc/appmap-ruby/compare/v0.83.1...v0.83.2) (2022-05-11)
|
16
|
+
|
17
|
+
|
18
|
+
### Bug Fixes
|
19
|
+
|
20
|
+
* Only warn if Hook::LOG is true ([0ffd29e](https://github.com/applandinc/appmap-ruby/commit/0ffd29ea3a49d70af64193250c633668eb45c9ab))
|
21
|
+
|
1
22
|
## [0.83.1](https://github.com/applandinc/appmap-ruby/compare/v0.83.0...v0.83.1) (2022-05-05)
|
2
23
|
|
3
24
|
|
data/appmap.gemspec
CHANGED
@@ -19,7 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
# Specify which files should be added to the gem when it is released.
|
20
20
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
21
|
spec.files = `git ls-files --no-deleted`.split("
|
22
|
-
")
|
22
|
+
").grep_v(/appmap\.json$/)
|
23
|
+
|
23
24
|
spec.bindir = 'exe'
|
24
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
26
|
|
@@ -8,9 +8,9 @@ module AppMap
|
|
8
8
|
# cf. https://eregon.me/blog/2019/11/10/the-delegation-challenge-of-ruby27.html
|
9
9
|
class Method
|
10
10
|
ruby2_keywords def call(receiver, *args, &block)
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
call_event = trace? && with_disabled_hook { before_hook receiver, *args }
|
12
|
+
# note we can't short-circuit directly to do_call because then the call stack
|
13
|
+
# depth changes and eval handler doesn't work correctly
|
14
14
|
trace_call call_event, receiver, *args, &block
|
15
15
|
end
|
16
16
|
|
@@ -32,7 +32,10 @@ module AppMap
|
|
32
32
|
hook_method.bind(receiver).call(*args, &block)
|
33
33
|
end
|
34
34
|
|
35
|
+
# rubocop:disable Metrics/MethodLength
|
35
36
|
ruby2_keywords def trace_call(call_event, receiver, *args, &block)
|
37
|
+
return do_call(receiver, *args, &block) unless call_event
|
38
|
+
|
36
39
|
start_time = gettime
|
37
40
|
begin
|
38
41
|
return_value = do_call(receiver, *args, &block)
|
@@ -44,6 +47,7 @@ module AppMap
|
|
44
47
|
if call_event
|
45
48
|
end
|
46
49
|
end
|
50
|
+
# rubocop:enable Metrics/MethodLength
|
47
51
|
|
48
52
|
def hook_method_def
|
49
53
|
this = self
|
@@ -5,9 +5,9 @@ module AppMap
|
|
5
5
|
# Delegation methods for Ruby 3.
|
6
6
|
class Method
|
7
7
|
def call(receiver, *args, **kwargs, &block)
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
call_event = trace? && with_disabled_hook { before_hook receiver, *args, **kwargs }
|
9
|
+
# note we can't short-circuit directly to do_call because then the call stack
|
10
|
+
# depth changes and eval handler doesn't work correctly
|
11
11
|
trace_call call_event, receiver, *args, **kwargs, &block
|
12
12
|
end
|
13
13
|
|
@@ -34,7 +34,10 @@ module AppMap
|
|
34
34
|
hook_method.bind_call(receiver, *args, **kwargs, &block)
|
35
35
|
end
|
36
36
|
|
37
|
+
# rubocop:disable Metrics/MethodLength
|
37
38
|
def trace_call(call_event, receiver, *args, **kwargs, &block)
|
39
|
+
return do_call(receiver, *args, **kwargs, &block) unless call_event
|
40
|
+
|
38
41
|
start_time = gettime
|
39
42
|
begin
|
40
43
|
return_value = do_call(receiver, *args, **kwargs, &block)
|
@@ -46,6 +49,7 @@ module AppMap
|
|
46
49
|
if call_event
|
47
50
|
end
|
48
51
|
end
|
52
|
+
# rubocop:enable Metrics/MethodLength
|
49
53
|
|
50
54
|
def hook_method_def
|
51
55
|
this = self
|
data/lib/appmap/hook/method.rb
CHANGED
data/lib/appmap/version.rb
CHANGED
data/spec/handler/eval_spec.rb
CHANGED
@@ -57,6 +57,11 @@ describe 'AppMap::Handler::Eval' do
|
|
57
57
|
end
|
58
58
|
expect(new_cls.const_get(class_name)).to eq(cls)
|
59
59
|
end
|
60
|
+
|
61
|
+
it 'works correctly when loaded even when not tracing' do
|
62
|
+
load "#{__dir__}/class_with_eval.rb"
|
63
|
+
expect { AppMap::SpecClasses::WithEval.new.text }.to_not raise_error(NameError)
|
64
|
+
end
|
60
65
|
end
|
61
66
|
|
62
67
|
module ClassMaker
|
@@ -64,3 +69,5 @@ module ClassMaker
|
|
64
69
|
eval "class #{class_name}; end; #{class_name}"
|
65
70
|
end
|
66
71
|
end
|
72
|
+
|
73
|
+
# rubocop:enable Security/Eval, Style/EvalWithLocation
|
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.83.
|
4
|
+
version: 0.83.4
|
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-
|
11
|
+
date: 2022-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -447,12 +447,10 @@ files:
|
|
447
447
|
- spec/fixtures/depends/app/models/configuration.rb
|
448
448
|
- spec/fixtures/depends/app/models/show.rb
|
449
449
|
- spec/fixtures/depends/app/models/user.rb
|
450
|
-
- spec/fixtures/depends/revoke_api_key.appmap.json
|
451
450
|
- spec/fixtures/depends/spec/actual_rspec_test.rb
|
452
451
|
- spec/fixtures/depends/spec/api_spec.rb
|
453
452
|
- spec/fixtures/depends/spec/user_spec.rb
|
454
453
|
- spec/fixtures/depends/test/actual_minitest_test.rb
|
455
|
-
- spec/fixtures/depends/user_page_scenario.appmap.json
|
456
454
|
- spec/fixtures/hook/.gitignore
|
457
455
|
- spec/fixtures/hook/app/controllers/api/api_keys_controller.rb
|
458
456
|
- spec/fixtures/hook/app/controllers/organizations_controller.rb
|
@@ -474,12 +472,10 @@ files:
|
|
474
472
|
- spec/fixtures/hook/prepended_override.rb
|
475
473
|
- spec/fixtures/hook/protected_method.rb
|
476
474
|
- spec/fixtures/hook/report_parameters.rb
|
477
|
-
- spec/fixtures/hook/revoke_api_key.appmap.json
|
478
475
|
- spec/fixtures/hook/singleton_method.rb
|
479
476
|
- spec/fixtures/hook/spec/api_spec.rb
|
480
477
|
- spec/fixtures/hook/spec/user_spec.rb
|
481
478
|
- spec/fixtures/hook/sub_packages.rb
|
482
|
-
- spec/fixtures/hook/user_page_scenario.appmap.json
|
483
479
|
- spec/fixtures/rack_users_app/.dockerignore
|
484
480
|
- spec/fixtures/rack_users_app/.gitignore
|
485
481
|
- spec/fixtures/rack_users_app/Gemfile
|
@@ -707,6 +703,7 @@ files:
|
|
707
703
|
- spec/fixtures/rails7_users_app/test/models/instructor_test.rb
|
708
704
|
- spec/fixtures/rails7_users_app/test/system/.keep
|
709
705
|
- spec/fixtures/rails7_users_app/test/test_helper.rb
|
706
|
+
- spec/handler/class_with_eval.rb
|
710
707
|
- spec/handler/eval_spec.rb
|
711
708
|
- spec/hook_spec.rb
|
712
709
|
- spec/open_spec.rb
|