sauce 0.14.1 → 0.14.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/sauce/integrations.rb +24 -19
  3. data/sauce.gemspec +1 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.14.1
1
+ 0.14.2
@@ -158,31 +158,36 @@ rescue LoadError
158
158
  # User doesn't have Test::Unit installed
159
159
  end
160
160
 
161
- if defined?(Test::Unit::AutoRunner)
162
- class Test::Unit::AutoRunner
163
- run_without_tunnel = self.instance_method(:run)
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
- define_method(:run) do |*args|
166
- @suite = @collector[self]
167
- need_tunnel = suite.tests.any? do |test_suite|
168
- test_suite.tests.any? do |test_case|
169
- test_case.class.superclass.to_s =~ /^Sauce::/
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
- end
172
- if need_tunnel
173
- config = Sauce::Config.new
174
- if config.application_host && !config.local?
175
- @sauce_tunnel = Sauce::Connect.new(:host => config.application_host, :port => config.application_port || 80)
176
- @sauce_tunnel.wait_until_ready
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
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sauce}
8
- s.version = "0.14.1"
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
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sauce
3
3
  version: !ruby/object:Gem::Version
4
- hash: 37
4
+ hash: 35
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 14
9
- - 1
10
- version: 0.14.1
9
+ - 2
10
+ version: 0.14.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sean Grove