sauce 3.5.4 → 3.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sauce.rb +1 -1
- data/lib/sauce/config.rb +1 -1
- data/lib/sauce/{rspec.rb → rspec/rspec.rb} +4 -85
- data/lib/sauce/rspec/rspec_formatter.rb +20 -0
- data/lib/sauce/rspec/rspec_one_support.rb +66 -0
- data/lib/sauce/selenium.rb +1 -0
- data/lib/sauce/version.rb +1 -1
- data/spec/integration/connect/spec/spec_helper.rb +4 -2
- data/spec/integration/rspec-capybara/spec/spec_helper.rb +1 -0
- data/spec/integration/rspec/spec/spec_helper.rb +4 -0
- data/spec/integration/testunit/test/integration_test.rb +1 -0
- data/spec/sauce/config/browser_spec.rb +1 -1
- metadata +15 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ccdcf05d39b1b2832e33e233c2af31544d560b2
|
4
|
+
data.tar.gz: 5a7959d17255cd42f605fa390f4798a0a5c503cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 623eb3e19e6c62d2b8c93b4e036b270912b3127a2110f29038efd14dc352031c4b3741be60ca322fdf383ed0ef0448e1c7e8fdb77889916a56d1145376e20a2d
|
7
|
+
data.tar.gz: 4e1494f627edf4daa47da2ce9bc0000f34c14b94250dad306bd6c04bdffd39204b5bd25bbf7dbab6e13295891ffaeded2291b6046092fbcede32c9dc14cbb9d5
|
data/lib/sauce.rb
CHANGED
@@ -12,7 +12,7 @@ require 'sauce/client'
|
|
12
12
|
require 'sauce/config'
|
13
13
|
require 'sauce/selenium'
|
14
14
|
require 'sauce/test_base'
|
15
|
-
require 'sauce/rspec'
|
15
|
+
require 'sauce/rspec/rspec'
|
16
16
|
require 'sauce/test_unit'
|
17
17
|
require 'parallel_tests/saucerspec/runner'
|
18
18
|
require 'parallel_tests/saucecucumber/runner'
|
data/lib/sauce/config.rb
CHANGED
@@ -427,7 +427,7 @@ It seems you're trying to run your tests in parallel, but haven't configured you
|
|
427
427
|
|
428
428
|
To fix this, add :sauce => true to your specs or make your tests subclasses of Sauce::TestCase or Sauce::RailsTestCase.
|
429
429
|
|
430
|
-
For more details check the gem readme at https://github.com/
|
430
|
+
For more details check the gem readme at https://github.com/saucelabs/sauce_ruby/blob/master/README.markdown
|
431
431
|
MESSAGE
|
432
432
|
end
|
433
433
|
end
|
@@ -1,69 +1,7 @@
|
|
1
1
|
require 'sauce/utilities'
|
2
|
-
require
|
3
|
-
|
4
|
-
|
5
|
-
require 'spec'
|
6
|
-
module Sauce
|
7
|
-
module RSpec
|
8
|
-
class SeleniumExampleGroup < Spec::Example::ExampleGroup
|
9
|
-
attr_reader :selenium
|
10
|
-
@@need_tunnel = false
|
11
|
-
|
12
|
-
def self.inherited(subclass)
|
13
|
-
# only setup tunnel if somebody needs it
|
14
|
-
@@need_tunnel = true
|
15
|
-
super(subclass)
|
16
|
-
end
|
17
|
-
|
18
|
-
before :suite do
|
19
|
-
config = Sauce::Config.new
|
20
|
-
if @@need_tunnel
|
21
|
-
if config[:application_host]
|
22
|
-
Sauce::Utilities::Connect.start(:host => config[:application_host], :port => config[:application_port])
|
23
|
-
end
|
24
|
-
if config[:start_local_application] &&
|
25
|
-
Sauce::Utilities::RailsServer.is_rails_app?
|
26
|
-
@@server = Sauce::Utilities::RailsServer.new
|
27
|
-
@@server.start
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
|
-
after :suite do
|
33
|
-
Sauce::Utilities::Connect.close
|
34
|
-
@@server.stop if defined? @@server
|
35
|
-
end
|
36
|
-
|
37
|
-
def execute(*args)
|
38
|
-
config = Sauce::Config.new
|
39
|
-
description = [self.class.description, self.description].join(" ")
|
40
|
-
config[:browsers].each do |os, browser, version|
|
41
|
-
@selenium = Sauce::Selenium2.new({:os => os, :browser => browser,
|
42
|
-
:browser_version => version,
|
43
|
-
:job_name => description})
|
44
|
-
|
45
|
-
begin
|
46
|
-
success = super(*args)
|
47
|
-
SauceWhisk::Jobs.change_status @selenium.session_id, success
|
48
|
-
ensure
|
49
|
-
@selenium.stop
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
alias_method :page, :selenium
|
55
|
-
alias_method :s, :selenium
|
56
|
-
|
57
|
-
Spec::Example::ExampleGroupFactory.register(:selenium, self)
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
rescue LoadError
|
62
|
-
# User doesn't have RSpec 1.x installed
|
63
|
-
rescue => e
|
64
|
-
STDERR.puts "Exception occured: #{e.to_s}"
|
65
|
-
exit 1
|
66
|
-
end
|
2
|
+
require 'sauce_whisk'
|
3
|
+
require 'sauce/rspec/rspec_one_support'
|
4
|
+
require 'sauce/rspec/rspec_formatter'
|
67
5
|
|
68
6
|
begin
|
69
7
|
require 'rspec/core'
|
@@ -245,23 +183,4 @@ rescue LoadError, TypeError
|
|
245
183
|
rescue => e
|
246
184
|
STDERR.puts "Exception caught: #{e.to_s}"
|
247
185
|
exit 1
|
248
|
-
end
|
249
|
-
|
250
|
-
begin
|
251
|
-
require 'rspec/core/formatters/base_text_formatter'
|
252
|
-
module RSpec
|
253
|
-
module Core
|
254
|
-
module Formatters
|
255
|
-
class BaseTextFormatter
|
256
|
-
def dump_failure(example, index)
|
257
|
-
output.puts "#{short_padding}#{index.next}) #{example.full_description}"
|
258
|
-
puts "#{short_padding}Sauce public job link: #{example.metadata[:sauce_public_link]}"
|
259
|
-
dump_failure_info(example)
|
260
|
-
end
|
261
|
-
end
|
262
|
-
end
|
263
|
-
end
|
264
|
-
end
|
265
|
-
rescue LoadError
|
266
|
-
# User isn't using RSpec
|
267
|
-
end
|
186
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
begin
|
2
|
+
require 'rspec/core/formatters/base_text_formatter'
|
3
|
+
module RSpec
|
4
|
+
module Core
|
5
|
+
module Formatters
|
6
|
+
class BaseTextFormatter
|
7
|
+
def dump_failure(example, index)
|
8
|
+
output.puts "#{short_padding}#{index.next}) #{example.full_description}"
|
9
|
+
puts "#{short_padding}Sauce public job link: #{example.metadata[:sauce_public_link]}"
|
10
|
+
dump_failure_info(example)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
rescue LoadError
|
17
|
+
# User isn't using RSpec
|
18
|
+
rescue NameError
|
19
|
+
# User is using RSpec 3
|
20
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require 'sauce/utilities'
|
2
|
+
require "sauce_whisk"
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'spec'
|
6
|
+
module Sauce
|
7
|
+
module RSpec
|
8
|
+
class SeleniumExampleGroup < Spec::Example::ExampleGroup
|
9
|
+
attr_reader :selenium
|
10
|
+
@@need_tunnel = false
|
11
|
+
|
12
|
+
def self.inherited(subclass)
|
13
|
+
# only setup tunnel if somebody needs it
|
14
|
+
@@need_tunnel = true
|
15
|
+
super(subclass)
|
16
|
+
end
|
17
|
+
|
18
|
+
before :suite do
|
19
|
+
config = Sauce::Config.new
|
20
|
+
if @@need_tunnel
|
21
|
+
if config[:application_host]
|
22
|
+
Sauce::Utilities::Connect.start(:host => config[:application_host], :port => config[:application_port])
|
23
|
+
end
|
24
|
+
if config[:start_local_application] &&
|
25
|
+
Sauce::Utilities::RailsServer.is_rails_app?
|
26
|
+
@@server = Sauce::Utilities::RailsServer.new
|
27
|
+
@@server.start
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
after :suite do
|
33
|
+
Sauce::Utilities::Connect.close
|
34
|
+
@@server.stop if defined? @@server
|
35
|
+
end
|
36
|
+
|
37
|
+
def execute(*args)
|
38
|
+
config = Sauce::Config.new
|
39
|
+
description = [self.class.description, self.description].join(" ")
|
40
|
+
config[:browsers].each do |os, browser, version|
|
41
|
+
@selenium = Sauce::Selenium2.new({:os => os, :browser => browser,
|
42
|
+
:browser_version => version,
|
43
|
+
:job_name => description})
|
44
|
+
|
45
|
+
begin
|
46
|
+
success = super(*args)
|
47
|
+
SauceWhisk::Jobs.change_status @selenium.session_id, success
|
48
|
+
ensure
|
49
|
+
@selenium.stop
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
alias_method :page, :selenium
|
55
|
+
alias_method :s, :selenium
|
56
|
+
|
57
|
+
Spec::Example::ExampleGroupFactory.register(:selenium, self)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
rescue LoadError
|
62
|
+
# User doesn't have RSpec 1.x installed
|
63
|
+
rescue => e
|
64
|
+
STDERR.puts "Exception occured: #{e.to_s}"
|
65
|
+
exit 1
|
66
|
+
end
|
data/lib/sauce/selenium.rb
CHANGED
data/lib/sauce/version.rb
CHANGED
@@ -14,6 +14,8 @@ require "sauce/capybara"
|
|
14
14
|
Sauce.config do |c|
|
15
15
|
c[:start_tunnel] = true
|
16
16
|
c[:warn_on_skipped_integration] = false
|
17
|
+
c[:sauce_connect_4_executable] = ENV["SAUCE_CONNECT_4_EXECUTABLE"]
|
17
18
|
end
|
18
|
-
|
19
|
-
|
19
|
+
|
20
|
+
app = proc { |env| [200, {}, ["Hello Sauce!"]]}
|
21
|
+
Capybara.app = app
|
@@ -68,6 +68,6 @@ It seems you're trying to run your tests in parallel, but haven't configured you
|
|
68
68
|
|
69
69
|
To fix this, add :sauce => true to your specs or make your tests subclasses of Sauce::TestCase or Sauce::RailsTestCase.
|
70
70
|
|
71
|
-
For more details check the gem readme at https://github.com/
|
71
|
+
For more details check the gem readme at https://github.com/saucelabs/sauce_ruby/blob/master/README.markdown
|
72
72
|
MESSAGE
|
73
73
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sauce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Lacey
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2015-
|
17
|
+
date: 2015-04-07 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rspec
|
@@ -216,16 +216,22 @@ dependencies:
|
|
216
216
|
name: parallel_tests
|
217
217
|
requirement: !ruby/object:Gem::Requirement
|
218
218
|
requirements:
|
219
|
-
- -
|
219
|
+
- - ">="
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: 1.1.1
|
222
|
+
- - "<="
|
220
223
|
- !ruby/object:Gem::Version
|
221
|
-
version: 1.
|
224
|
+
version: 1.3.7
|
222
225
|
type: :runtime
|
223
226
|
prerelease: false
|
224
227
|
version_requirements: !ruby/object:Gem::Requirement
|
225
228
|
requirements:
|
226
|
-
- -
|
229
|
+
- - ">="
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
version: 1.1.1
|
232
|
+
- - "<="
|
227
233
|
- !ruby/object:Gem::Version
|
228
|
-
version: 1.
|
234
|
+
version: 1.3.7
|
229
235
|
- !ruby/object:Gem::Dependency
|
230
236
|
name: sauce_whisk
|
231
237
|
requirement: !ruby/object:Gem::Requirement
|
@@ -266,7 +272,9 @@ files:
|
|
266
272
|
- lib/sauce/parallel/test_group.rb
|
267
273
|
- lib/sauce/railtie.rb
|
268
274
|
- lib/sauce/raketasks.rb
|
269
|
-
- lib/sauce/rspec.rb
|
275
|
+
- lib/sauce/rspec/rspec.rb
|
276
|
+
- lib/sauce/rspec/rspec_formatter.rb
|
277
|
+
- lib/sauce/rspec/rspec_one_support.rb
|
270
278
|
- lib/sauce/selenium.rb
|
271
279
|
- lib/sauce/test_base.rb
|
272
280
|
- lib/sauce/test_unit.rb
|