saucer 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/lib/saucer/driver.rb +22 -17
- data/lib/saucer/sauce.rb +22 -0
- data/lib/saucer/version.rb +1 -1
- data/saucer.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e168f7731c03d863f52a22e041e176da846368d
|
4
|
+
data.tar.gz: 997a371d47a26c67f401731ff34b4422051bfff0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3991811258564869643e4ba974e4939dbfe49034db9847907f263b849923f601db33b0242186b9f3f68f59f6a70b22b85239b0d44b46b6b654a4bd397e9331c0
|
7
|
+
data.tar.gz: e2380a77094d580b890591d3380317a73abd4697df82a980a545fc152fcbd9762b085f8fbf13305fe6c160a94aba7998c0b9f787647d7db145ef62e2ea478cff
|
data/Gemfile
CHANGED
data/lib/saucer/driver.rb
CHANGED
@@ -1,28 +1,23 @@
|
|
1
1
|
module Saucer
|
2
|
-
class Driver
|
3
|
-
|
4
|
-
include Annotations
|
2
|
+
class Driver
|
5
3
|
|
6
4
|
attr_reader :driver, :config
|
7
5
|
|
8
6
|
def initialize(opt = {})
|
9
7
|
caps = opt[:desired_capabilities] || {}
|
10
|
-
@config
|
11
|
-
|
8
|
+
@config = Config::Selenium.new(caps)
|
9
|
+
|
12
10
|
opt[:url] = @config.url
|
13
11
|
opt[:desired_capabilities] = @config.capabilities
|
14
12
|
|
15
|
-
|
16
|
-
bridge = Support::EventFiringBridge.new(bridge, listener) if listener
|
13
|
+
@driver = Selenium::WebDriver.for(:remote, opt)
|
17
14
|
|
18
|
-
|
19
|
-
|
20
|
-
@driver.job_name = @config.sauce[:name]
|
21
|
-
@driver.build_name = @config.sauce[:build]
|
15
|
+
sauce.job_name = @config.sauce[:name]
|
16
|
+
sauce.build_name = @config.sauce[:build]
|
22
17
|
end
|
23
18
|
|
24
19
|
def sauce
|
25
|
-
@
|
20
|
+
@sauce ||= Sauce.new(driver, @config)
|
26
21
|
end
|
27
22
|
|
28
23
|
def quit
|
@@ -35,15 +30,25 @@ module Saucer
|
|
35
30
|
end
|
36
31
|
|
37
32
|
if exception
|
38
|
-
|
39
|
-
|
33
|
+
sauce.comment = "Error: #{exception.inspect}"
|
34
|
+
sauce.comment = "Error Location: #{exception.backtrace.first}"
|
40
35
|
end
|
41
36
|
|
42
|
-
|
43
|
-
results =
|
37
|
+
sauce.job_result = result unless result.nil?
|
38
|
+
results = sauce.api.job.log_url[/(.*)\/.*$/, 1]
|
44
39
|
Selenium::WebDriver.logger.warn("Sauce Labs results: #{results}")
|
45
40
|
|
46
|
-
|
41
|
+
driver.quit
|
42
|
+
end
|
43
|
+
|
44
|
+
def method_missing(method_name, *arguments, &block)
|
45
|
+
if driver.respond_to? method_name
|
46
|
+
driver.send(method_name, *arguments, &block)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def respond_to?(method_name, include_private = false)
|
51
|
+
driver.respond_to?(method_name)
|
47
52
|
end
|
48
53
|
|
49
54
|
end
|
data/lib/saucer/sauce.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'sauce_whisk'
|
2
|
+
|
3
|
+
module Saucer
|
4
|
+
class Sauce
|
5
|
+
|
6
|
+
include Annotations
|
7
|
+
|
8
|
+
def initialize(driver, config)
|
9
|
+
@driver = driver
|
10
|
+
@config = config
|
11
|
+
end
|
12
|
+
|
13
|
+
def api
|
14
|
+
@api ||= API.new(@driver, @config)
|
15
|
+
end
|
16
|
+
|
17
|
+
def driver
|
18
|
+
@driver
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
data/lib/saucer/version.rb
CHANGED
data/saucer.gemspec
CHANGED
@@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
|
|
36
36
|
|
37
37
|
spec.add_dependency 'parallel_split_test'
|
38
38
|
spec.add_dependency 'require_all'
|
39
|
-
spec.add_dependency 'selenium-webdriver', "~> 3.0", "< 3.4.
|
39
|
+
spec.add_dependency 'selenium-webdriver', "~> 3.0", "< 3.4.3"
|
40
40
|
spec.add_dependency 'sauce_whisk'
|
41
41
|
spec.add_dependency 'sauce_platforms'
|
42
42
|
spec.add_dependency 'json'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saucer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Titus Fortner
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -89,7 +89,7 @@ dependencies:
|
|
89
89
|
version: '3.0'
|
90
90
|
- - "<"
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: 3.4.
|
92
|
+
version: 3.4.3
|
93
93
|
type: :runtime
|
94
94
|
prerelease: false
|
95
95
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -99,7 +99,7 @@ dependencies:
|
|
99
99
|
version: '3.0'
|
100
100
|
- - "<"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: 3.4.
|
102
|
+
version: 3.4.3
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: sauce_whisk
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -165,6 +165,7 @@ files:
|
|
165
165
|
- lib/saucer/driver.rb
|
166
166
|
- lib/saucer/parallel.rb
|
167
167
|
- lib/saucer/platform_configuration.rb
|
168
|
+
- lib/saucer/sauce.rb
|
168
169
|
- lib/saucer/version.rb
|
169
170
|
- saucer.gemspec
|
170
171
|
homepage: http://github.com/titusfortner/saucer
|