sauce 0.14.1 → 0.14.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.
- data/VERSION +1 -1
- data/lib/sauce/integrations.rb +24 -19
- data/sauce.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.14.
|
1
|
+
0.14.2
|
data/lib/sauce/integrations.rb
CHANGED
@@ -158,31 +158,36 @@ rescue LoadError
|
|
158
158
|
# User doesn't have Test::Unit installed
|
159
159
|
end
|
160
160
|
|
161
|
-
|
162
|
-
|
163
|
-
|
161
|
+
begin
|
162
|
+
require 'test/unit/autorunner'
|
163
|
+
if defined?(Test::Unit::AutoRunner)
|
164
|
+
class Test::Unit::AutoRunner
|
165
|
+
run_without_tunnel = self.instance_method(:run)
|
164
166
|
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
167
|
+
define_method(:run) do |*args|
|
168
|
+
@suite = @collector[self]
|
169
|
+
need_tunnel = suite.tests.any? do |test_suite|
|
170
|
+
test_suite.tests.any? do |test_case|
|
171
|
+
test_case.class.superclass.to_s =~ /^Sauce::/
|
172
|
+
end
|
170
173
|
end
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
174
|
+
if need_tunnel
|
175
|
+
config = Sauce::Config.new
|
176
|
+
if config.application_host && !config.local?
|
177
|
+
@sauce_tunnel = Sauce::Connect.new(:host => config.application_host, :port => config.application_port || 80)
|
178
|
+
@sauce_tunnel.wait_until_ready
|
179
|
+
end
|
177
180
|
end
|
181
|
+
result = run_without_tunnel.bind(self).call(*args)
|
182
|
+
if defined? @sauce_tunnel
|
183
|
+
@sauce_tunnel.disconnect
|
184
|
+
end
|
185
|
+
return result
|
178
186
|
end
|
179
|
-
result = run_without_tunnel.bind(self).call(*args)
|
180
|
-
if defined? @sauce_tunnel
|
181
|
-
@sauce_tunnel.disconnect
|
182
|
-
end
|
183
|
-
return result
|
184
187
|
end
|
185
188
|
end
|
189
|
+
rescue LoadError, NameError
|
190
|
+
# Ruby 1.8's Test::Unit not found
|
186
191
|
end
|
187
192
|
|
188
193
|
begin
|
data/sauce.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{sauce}
|
8
|
-
s.version = "0.14.
|
8
|
+
s.version = "0.14.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Sean Grove", "Eric Allen", "Steven Hazel"]
|
metadata
CHANGED