jemc-reporter 0.1.1 → 0.1.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/lib/jemc/reporter.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83f28ed957008b9299ca5108236b54eedbdbcf07
|
4
|
+
data.tar.gz: 25b3e401d3454274a08e1e976e9eb962699f8ad6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2856577260ddd75ed6e681132957b44265ff20a5012bbfa734c8a9cf0344388bff13783be58586306aefce0ae4d194e5a60e82cfc9e1957d252c18f5669b291e
|
7
|
+
data.tar.gz: d2fea9cf98734742a9cff0519fbdcec82c276a58b3f24913315b657a0ba7960269b7d66090d421e0fe80ea93876e2d8903777cfdb406ca93914675bfbda7f121
|
data/lib/jemc/reporter.rb
CHANGED
@@ -142,15 +142,16 @@ module JEMC; class Reporter
|
|
142
142
|
|
143
143
|
def backtrace(exception)
|
144
144
|
index = exception.backtrace \
|
145
|
-
.find_index
|
145
|
+
.find_index{|x| x=~/\/minitest\/(?=[^\/]*$).*['`]run['`]$/}
|
146
146
|
|
147
147
|
exception.backtrace.map do |line|
|
148
|
-
m = line.match
|
148
|
+
m = line.match /(.*)(?<=\/)([^\:\/]*):(\d+)(?=:in):in ['`](.*)['`]/
|
149
|
+
m ||= line.match /()([^\:\/]*):(\d+)(?=:in):in ['`](.*)['`]/
|
149
150
|
|
150
151
|
str_fit(m[1], columns/3, :keep=>:tail, :align=>:right) \
|
151
152
|
+ white(str_fit(m[2], columns/3-m[3].size-1, :keep=>:head))+':'+white(m[3]) \
|
152
|
-
+ bold(cyan(str_fit(' '+m[4], (columns-2*(columns/3)),
|
153
|
-
:keep=>:head, :align=>:right)))
|
153
|
+
+ bold(cyan(str_fit(' '+m[4], (columns-2*(columns/3)), \
|
154
|
+
:keep=>:head, :align=>:right)))
|
154
155
|
end[0...index].reverse
|
155
156
|
end
|
156
157
|
|