diver_down 0.0.1.alpha3 → 0.0.1.alpha4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/diver_down/helper.rb +12 -1
- data/lib/diver_down/trace/session.rb +1 -1
- data/lib/diver_down/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: 8fda9d1924b7ace3a55962178519fc291dc96c1fc99cf44fa58f4aa0b4a41232
|
4
|
+
data.tar.gz: e2e693488036833f19b8cd92d7c122bd16a2363cbb9b6dbcb4463b9fb0e595d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f868ba19a8a7d175ab8016219dfac382fbaa47dd7c1e5629928d2c8bb3fbd8ee29d99ea307a296d24b5f5b9caf91aaa4c9f11ca404771d331ef776b42afad54
|
7
|
+
data.tar.gz: 9082d6d8e245e5d806f1a5fedeee01131d7b499ec4a2b61a904ecf083d2582999b153c9112503e4b46e091a4cbdf07ca51dade5b47845870607d417d0cb107d1
|
data/lib/diver_down/helper.rb
CHANGED
@@ -28,7 +28,11 @@ module DiverDown
|
|
28
28
|
# @return [Module, Class]
|
29
29
|
def self.resolve_module(obj)
|
30
30
|
if module?(obj) # Do not call method of this
|
31
|
-
|
31
|
+
if module_subclass?(obj)
|
32
|
+
obj.class
|
33
|
+
else
|
34
|
+
resolve_singleton_class(obj)
|
35
|
+
end
|
32
36
|
else
|
33
37
|
k = INSTANCE_CLASS_QUERY.bind_call(obj)
|
34
38
|
resolve_singleton_class(k)
|
@@ -62,5 +66,12 @@ module DiverDown
|
|
62
66
|
def self.constantize(str)
|
63
67
|
::ActiveSupport::Inflector.constantize(str)
|
64
68
|
end
|
69
|
+
|
70
|
+
# FIXME: I don't know the best way to determine which class inherits from Module.
|
71
|
+
# @return [Boolean]
|
72
|
+
def self.module_subclass?(mod)
|
73
|
+
mod.ancestors.size == 1 &&
|
74
|
+
mod.class < Module
|
75
|
+
end
|
65
76
|
end
|
66
77
|
end
|
data/lib/diver_down/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diver_down
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.alpha4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alpaca-tc
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: '0'
|
106
106
|
requirements: []
|
107
|
-
rubygems_version: 3.5.
|
107
|
+
rubygems_version: 3.5.9
|
108
108
|
signing_key:
|
109
109
|
specification_version: 4
|
110
110
|
summary: dynamically analyze application dependencies and generate a comprehensive
|