sauce 0.19.1 → 0.20.0

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.
@@ -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.local?
39
- @selenium = ::Selenium::Client::Driver.new(:host => "127.0.0.1",
40
- :port => 4444,
41
- :browser => "*" + browser,
42
- :url => "http://127.0.0.1:#{config.local_application_port}/")
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
- @selenium = Sauce::Selenium.new({:os => os, :browser => browser, :browser_version => version,
45
- :job_name => "#{description}"})
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
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{sauce}
5
- s.version = "0.19.1"
5
+ s.version = "0.20.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Eric Allen", "Sean Grove", "Steven Hazel"]
@@ -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 {|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: 81
4
+ hash: 79
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 19
9
- - 1
10
- version: 0.19.1
8
+ - 20
9
+ - 0
10
+ version: 0.20.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Eric Allen