diver_down 0.0.1.alpha10 → 0.0.1.alpha12
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 +23 -1
- data/lib/diver_down/version.rb +1 -1
- data/web/assets/bundle.js +72 -72
- 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: 28056e77fa2f4be6b881359cb07fc3caf23eac9e2bcf170358b69b7408613934
|
4
|
+
data.tar.gz: b62338d4b24f306caee8bda3d463854fdd0bba2b1b35461d242a4cf71ad97e22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cce0b916067444b615b22c4f57daadbfc885c1e2d098e68ad2277c4fcd322c4d1de3d13aa057db7c6458838381ed2adbd8a833ffe74592e325b4c0d44ae4dec
|
7
|
+
data.tar.gz: c3ab57af9bf2e873c032b9200b3b8ac8c8f7b206d7ca1792e59f69111dc6ff9e4a9e7a4d543389ddb70016d7ea29db7a375275d8c0f7e9d109079b0c84b696c1
|
@@ -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,27 @@ 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
|
+
return if source_name.nil?
|
159
|
+
|
160
|
+
DiverDown::Helper.constantize(source_name)
|
161
|
+
source_name
|
162
|
+
rescue NameError
|
163
|
+
nil
|
164
|
+
end
|
143
165
|
end
|
144
166
|
end
|
145
167
|
end
|
data/lib/diver_down/version.rb
CHANGED