torquespec 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/torquespec/daemon.rb +35 -10
- data/lib/torquespec/server.rb +1 -0
- data/lib/torquespec/version.rb +1 -1
- metadata +4 -4
data/lib/torquespec/daemon.rb
CHANGED
@@ -80,8 +80,6 @@ module TorqueSpec
|
|
80
80
|
begin
|
81
81
|
torquespec_before_alls
|
82
82
|
run_remotely(reporter)
|
83
|
-
rescue Exception => ex
|
84
|
-
fail_filtered_examples(ex, reporter)
|
85
83
|
ensure
|
86
84
|
torquespec_after_alls
|
87
85
|
end
|
@@ -139,17 +137,44 @@ class Proc
|
|
139
137
|
end
|
140
138
|
end
|
141
139
|
|
142
|
-
# We want
|
143
|
-
#
|
144
|
-
#
|
145
|
-
|
146
|
-
|
147
|
-
|
140
|
+
# We want exceptions tossed in the container to be passed back to the
|
141
|
+
# client, but there's no guarantee the type of Exception in the
|
142
|
+
# container will be available on the client's classpath, so we turn
|
143
|
+
# all exceptions into Exceptions.
|
144
|
+
module TorqueSpec
|
145
|
+
def self.dump(exception)
|
146
|
+
Marshal.dump( [exception.message, exception.backtrace] )
|
148
147
|
end
|
149
|
-
def self.
|
150
|
-
|
148
|
+
def self.load_exception(str)
|
149
|
+
message, trace = Marshal.load(str)
|
150
|
+
exception = ::Exception.new(message)
|
151
151
|
meta = class << exception; self; end
|
152
152
|
meta.send(:define_method, :backtrace) { trace }
|
153
153
|
exception
|
154
154
|
end
|
155
155
|
end
|
156
|
+
|
157
|
+
# For ruby exceptions...
|
158
|
+
class Exception
|
159
|
+
def _dump(*)
|
160
|
+
TorqueSpec.dump(self)
|
161
|
+
end
|
162
|
+
def self._load(str)
|
163
|
+
TorqueSpec.load_exception(str)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# And for java exceptions, too.
|
168
|
+
module Java
|
169
|
+
module JavaLang
|
170
|
+
class Exception
|
171
|
+
def _dump(*)
|
172
|
+
TorqueSpec.dump(self)
|
173
|
+
end
|
174
|
+
def self._load(str)
|
175
|
+
TorqueSpec.load_exception(str)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
data/lib/torquespec/server.rb
CHANGED
data/lib/torquespec/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: torquespec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 6
|
10
|
+
version: 0.4.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jim Crossley
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-11-
|
19
|
+
date: 2011-11-16 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|