schmurfy-bacon 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bacon.rb +23 -19
- data/lib/bacon/ext/em.rb +3 -0
- data/lib/bacon/version.rb +1 -1
- metadata +5 -5
data/lib/bacon.rb
CHANGED
@@ -81,6 +81,28 @@ module Bacon
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
+
def self.store_error(e, description)
|
85
|
+
ErrorLog << "#{e.class}: #{e.message}\n"
|
86
|
+
|
87
|
+
backtrace = e.backtrace.find_all { |line| line !~ /bin\/bacon|\/bacon\.rb:\d+/ && line !~ /guard|fsevent|thor/ }
|
88
|
+
backtrace = backtrace[0, Bacon.backtrace_size] if Bacon.backtrace_size
|
89
|
+
|
90
|
+
backtrace.each_with_index do |line, i|
|
91
|
+
ErrorLog << " #{line}#{i==0 ? ": #@name - #{description}" : ""}\n"
|
92
|
+
end
|
93
|
+
|
94
|
+
ErrorLog << "\n"
|
95
|
+
|
96
|
+
if e.kind_of? Error
|
97
|
+
Counter[e.count_as] += 1
|
98
|
+
e.count_as.to_s.upcase
|
99
|
+
[:failed]
|
100
|
+
else
|
101
|
+
Counter[:errors] += 1
|
102
|
+
[:error, e]
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
84
106
|
module ContextAssertions
|
85
107
|
def execute_spec(&block)
|
86
108
|
block.call
|
@@ -113,25 +135,7 @@ module Bacon
|
|
113
135
|
end
|
114
136
|
end
|
115
137
|
rescue Object => e
|
116
|
-
|
117
|
-
|
118
|
-
backtrace = e.backtrace.find_all { |line| line !~ /bin\/bacon|\/bacon\.rb:\d+/ && line !~ /guard|fsevent|thor/ }
|
119
|
-
backtrace = backtrace[0, Bacon.backtrace_size] if Bacon.backtrace_size
|
120
|
-
|
121
|
-
backtrace.each_with_index do |line, i|
|
122
|
-
ErrorLog << " #{line}#{i==0 ? ": #@name - #{description}" : ""}\n"
|
123
|
-
end
|
124
|
-
|
125
|
-
ErrorLog << "\n"
|
126
|
-
|
127
|
-
if e.kind_of? Error
|
128
|
-
Counter[e.count_as] += 1
|
129
|
-
e.count_as.to_s.upcase
|
130
|
-
[:failed]
|
131
|
-
else
|
132
|
-
Counter[:errors] += 1
|
133
|
-
[:error, e]
|
134
|
-
end
|
138
|
+
Bacon.store_error(e, description)
|
135
139
|
else
|
136
140
|
""
|
137
141
|
ensure
|
data/lib/bacon/ext/em.rb
CHANGED
data/lib/bacon/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schmurfy-bacon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: term-ansicolor
|
@@ -84,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
84
84
|
version: '0'
|
85
85
|
segments:
|
86
86
|
- 0
|
87
|
-
hash:
|
87
|
+
hash: 4527591756316638354
|
88
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
89
|
none: false
|
90
90
|
requirements:
|
@@ -93,10 +93,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
segments:
|
95
95
|
- 0
|
96
|
-
hash:
|
96
|
+
hash: 4527591756316638354
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project:
|
99
|
-
rubygems_version: 1.8.
|
99
|
+
rubygems_version: 1.8.24
|
100
100
|
signing_key:
|
101
101
|
specification_version: 3
|
102
102
|
summary: a small RSpec clone
|