sauce 0.19.1 → 0.20.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sauce/integrations.rb +21 -10
- data/sauce.gemspec +1 -1
- data/test/test_connect.rb +2 -1
- metadata +4 -4
data/lib/sauce/integrations.rb
CHANGED
@@ -35,18 +35,29 @@ begin
|
|
35
35
|
config = Sauce::Config.new
|
36
36
|
description = [self.class.description, self.description].join(" ")
|
37
37
|
config.browsers.each do |os, browser, version|
|
38
|
-
if config.
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
38
|
+
if config.single_session?
|
39
|
+
if config.local?
|
40
|
+
@selenium = Sauce.cached_session(:host => "127.0.0.1", :port => 4444, :browser => "*" +
|
41
|
+
browser, :url => "http://127.0.0.1:#{config.local_application_port}/")
|
42
|
+
else
|
43
|
+
@selenium = Sauce.cached_session({:os => os, :browser => browser, :browser_version => version,
|
44
|
+
:job_name => self.class.description})
|
45
|
+
end
|
46
|
+
super(*args)
|
43
47
|
else
|
44
|
-
|
45
|
-
:
|
48
|
+
if config.local?
|
49
|
+
@selenium = ::Selenium::Client::Driver.new(:host => "127.0.0.1",
|
50
|
+
:port => 4444,
|
51
|
+
:browser => "*" + browser,
|
52
|
+
:url => "http://127.0.0.1:#{config.local_application_port}/")
|
53
|
+
else
|
54
|
+
@selenium = Sauce::Selenium.new({:os => os, :browser => browser, :browser_version => version,
|
55
|
+
:job_name => "#{description}"})
|
56
|
+
end
|
57
|
+
@selenium.start
|
58
|
+
super(*args)
|
59
|
+
@selenium.stop
|
46
60
|
end
|
47
|
-
@selenium.start
|
48
|
-
super(*args)
|
49
|
-
@selenium.stop
|
50
61
|
end
|
51
62
|
end
|
52
63
|
|
data/sauce.gemspec
CHANGED
data/test/test_connect.rb
CHANGED
@@ -21,7 +21,7 @@ class TestConnect < Test::Unit::TestCase
|
|
21
21
|
end
|
22
22
|
|
23
23
|
def test_fails_fast_with_no_username
|
24
|
-
Sauce.config {|
|
24
|
+
Sauce.config {|c| c.username = nil; c.access_key = nil}
|
25
25
|
username = ENV['SAUCE_USERNAME']
|
26
26
|
access_key = ENV['SAUCE_ACCESS_KEY']
|
27
27
|
|
@@ -39,6 +39,7 @@ class TestConnect < Test::Unit::TestCase
|
|
39
39
|
ensure
|
40
40
|
ENV['SAUCE_USERNAME'] = username
|
41
41
|
ENV['SAUCE_ACCESS_KEY'] = access_key
|
42
|
+
Sauce.config {|c|}
|
42
43
|
end
|
43
44
|
end
|
44
45
|
end
|
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:
|
4
|
+
hash: 79
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 20
|
9
|
+
- 0
|
10
|
+
version: 0.20.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Eric Allen
|