diver_down 0.0.1.alpha10 → 0.0.1.alpha11
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/trace/session.rb +21 -1
- data/lib/diver_down/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: daf9083c911966538705b30bf44a609d38623c14f10bba3fc48782194d6bdba2
|
4
|
+
data.tar.gz: '0596dffb7428713e3daad2102f756d9b2396ca53b7c4200e8a873998493f4291'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39c405fc2f3a6c73f3e818275f42f16b938cbc7342fcf22a2391827268c8d3b395b3734686a6e0da3854936ac4b9c938c8ac11b1f050abc668fbbe36373865d1
|
7
|
+
data.tar.gz: 98e7070abeaa7f74a3c18c6e6528d23afd5fec87779378d8afc7cf0558b7a7e04dca8bdec7284658aff8884e4f99f9d79bbff22673af9e6cd2111eb1e55a1f50
|
@@ -70,7 +70,8 @@ module DiverDown
|
|
70
70
|
next
|
71
71
|
end
|
72
72
|
|
73
|
-
source_name =
|
73
|
+
source_name = normalize_module_name(mod, tp)
|
74
|
+
|
74
75
|
pushed = false
|
75
76
|
|
76
77
|
unless source_name.nil?
|
@@ -140,6 +141,25 @@ module DiverDown
|
|
140
141
|
|
141
142
|
nil
|
142
143
|
end
|
144
|
+
|
145
|
+
# Return nil if resolved module do not exist.
|
146
|
+
# Like an AnonymousController in rspec-rails.
|
147
|
+
def normalize_module_name(mod, tp)
|
148
|
+
normalized = nil
|
149
|
+
normalized ||= constantizable_source_name(DiverDown::Helper.normalize_module_name(mod)) if @module_set.include?(mod)
|
150
|
+
|
151
|
+
# NOTE: Only one anonymous class is traced back to support `AnonymousController` in rspec-rails, but it can be traced back further
|
152
|
+
normalized ||= constantizable_source_name(DiverDown::Helper.normalize_module_name(mod.superclass)) if DiverDown::Helper.class?(mod) && mod != DiverDown::Helper.resolve_module(tp.defined_class) && @module_set.include?(mod.superclass)
|
153
|
+
|
154
|
+
normalized
|
155
|
+
end
|
156
|
+
|
157
|
+
def constantizable_source_name(source_name)
|
158
|
+
DiverDown::Helper.constantize(source_name)
|
159
|
+
source_name
|
160
|
+
rescue NameError
|
161
|
+
nil
|
162
|
+
end
|
143
163
|
end
|
144
164
|
end
|
145
165
|
end
|
data/lib/diver_down/version.rb
CHANGED