appmap 0.99.1 → 0.99.2
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 +7 -0
- data/lib/appmap/config.rb +5 -0
- data/lib/appmap/hook/method.rb +15 -2
- data/lib/appmap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0d8aa81209b5f8d33fc480c3ff3b7f6cd61027dc51fad74c9ad4f19ba6c7faf
|
4
|
+
data.tar.gz: 5d8ac162d8cf5eacfc045ff81a16c2b473df79ae0619ddaface5b4bab8d422cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c7b6b0fd6e45c33158776e3c3f1a8725031913ad49856f24aa5af50cbc41efd2e047face5c3c1f02a9c20670af08be43492e5bd665a17323578c735b07900b
|
7
|
+
data.tar.gz: 0ea3f5be3436ea8eec1d8e14cd959b67e6e4547d03de6401c6e21250b3ba91b521b57f665298e1e4ec3be9616a1fbcf0a2f11b8ff09a5c53cd0d60c2d4a358f6
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.99.2](https://github.com/getappmap/appmap-ruby/compare/v0.99.1...v0.99.2) (2023-05-10)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* Ensure that signature hash key consists of strings ([acb5db9](https://github.com/getappmap/appmap-ruby/commit/acb5db9ecb0a6cdf40de83bf506f45f5283f641b))
|
7
|
+
|
1
8
|
## [0.99.1](https://github.com/getappmap/appmap-ruby/compare/v0.99.0...v0.99.1) (2023-04-24)
|
2
9
|
|
3
10
|
|
data/lib/appmap/config.rb
CHANGED
@@ -499,6 +499,11 @@ module AppMap
|
|
499
499
|
end
|
500
500
|
|
501
501
|
def never_hook?(cls, method)
|
502
|
+
unless method
|
503
|
+
HookLog.log "method is nil" if HookLog.enabled?
|
504
|
+
return true
|
505
|
+
end
|
506
|
+
|
502
507
|
_, separator, = ::AppMap::Hook.qualify_method_name(method)
|
503
508
|
if exclude.member?(cls.name) || exclude.member?([ cls.name, separator, method.name ].join)
|
504
509
|
HookLog.log "Hooking of #{method} disabled by configuration" if HookLog.enabled?
|
data/lib/appmap/hook/method.rb
CHANGED
@@ -4,11 +4,23 @@ require 'appmap/util'
|
|
4
4
|
|
5
5
|
module AppMap
|
6
6
|
class Hook
|
7
|
+
class << self
|
8
|
+
def method_hash_key(cls, method)
|
9
|
+
[ cls, method.name ].hash
|
10
|
+
rescue TypeError => e
|
11
|
+
warn "Error building hash key for #{cls}, #{method}: #{e}"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
|
7
16
|
SIGNATURES = {}
|
8
17
|
LOOKUP_SIGNATURE = lambda do |id|
|
9
18
|
method = super(id)
|
10
19
|
|
11
|
-
|
20
|
+
hash_key = Hook.method_hash_key(method.owner, method)
|
21
|
+
return method unless hash_key
|
22
|
+
|
23
|
+
signature = SIGNATURES[hash_key]
|
12
24
|
if signature
|
13
25
|
method.singleton_class.module_eval do
|
14
26
|
define_method(:parameters) do
|
@@ -48,7 +60,8 @@ module AppMap
|
|
48
60
|
end
|
49
61
|
|
50
62
|
hook_method_parameters = hook_method.parameters.dup.freeze
|
51
|
-
|
63
|
+
hash_key = Hook.method_hash_key(hook_class, hook_method)
|
64
|
+
SIGNATURES[hash_key] = hook_method_parameters if hash_key
|
52
65
|
|
53
66
|
# irb(main):001:0> Kernel.public_instance_method(:system)
|
54
67
|
# (irb):1:in `public_instance_method': method `system' for module `Kernel' is private (NameError)
|
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.99.
|
4
|
+
version: 0.99.2
|
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-
|
11
|
+
date: 2023-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: method_source
|