sauce 3.4.1 → 3.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/sauce.rb +7 -1
- data/lib/sauce/config.rb +13 -12
- data/lib/sauce/railtie.rb +11 -0
- data/lib/sauce/version.rb +1 -1
- data/lib/tasks/parallel_testing.rb +6 -2
- data/spec/sauce/capybara_spec.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZDU5ODZiYzVmMjMxMWFhMDUyOWIyNDEyMGU1OTIzMmRjNDE5MmIyMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjA1OTMzZjg1NzFlNjI4MzM1MWQ0MmVjNjhiMTM5NTJiZmM2MGNlZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjUxZDJkMDI4Nzk0ZDRmZTZiN2M2OWM2NzYyYThhMzFhYzdiZDk2ZmUyOWZl
|
10
|
+
YTU2MGNjMjNhNTA0ZDAxY2YxNDcxZDJlYzM3OWNlM2Q1ODg1ZjM5NzQwNDA1
|
11
|
+
YzYyODkzYWEyMmRkYTA0YTM2MjAwMTA0ZDcxZThjZTFhMGY2NGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWM2ZWU3YjViNDZlNzMxN2I4MzcyYzkzNmM1YjlhMTg4MzEwMDU5OGYxYTNk
|
14
|
+
YmYwMDUxYTdjODJlZGJhMWUyYjM1MTk2OTBlMjczYjBiNGNkYjk3ZWJlZTVl
|
15
|
+
YjA3Zjk0NjhmOTcxMmEyODQ5MDU2MjJmMjM3NzhlMGI3YTY1YjE=
|
data/lib/sauce.rb
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
if defined?(Rails)
|
2
|
+
require "sauce/railtie"
|
3
|
+
else
|
4
|
+
require 'tasks/parallel_testing'
|
5
|
+
end
|
6
|
+
|
1
7
|
require 'sauce/version'
|
2
8
|
require 'sauce/utilities'
|
3
9
|
require 'sauce/utilities/rake'
|
@@ -7,10 +13,10 @@ require 'sauce/config'
|
|
7
13
|
require 'sauce/selenium'
|
8
14
|
require 'sauce/rspec'
|
9
15
|
require 'sauce/test_unit'
|
10
|
-
require 'tasks/parallel_testing'
|
11
16
|
require 'parallel_tests/saucerspec/runner'
|
12
17
|
require 'parallel_tests/saucecucumber/runner'
|
13
18
|
|
19
|
+
|
14
20
|
# Ruby before 1.9.3-p382 does not handle exit codes correctly when nested
|
15
21
|
if RUBY_VERSION == "1.9.3" && RUBY_PATCHLEVEL < 392
|
16
22
|
module Kernel
|
data/lib/sauce/config.rb
CHANGED
@@ -344,23 +344,24 @@ module Sauce
|
|
344
344
|
end
|
345
345
|
|
346
346
|
def extract_options_from_hash(env)
|
347
|
+
hash = Hash[env]
|
347
348
|
opts = {}
|
348
349
|
|
349
|
-
on_demand =
|
350
|
-
env_browsers =
|
350
|
+
on_demand = hash.delete "SAUCE_ONDEMAND_BROWSERS"
|
351
|
+
env_browsers = hash.delete "SAUCE_BROWSERS"
|
351
352
|
|
352
|
-
|
353
|
+
hash.select {|k,v| k.start_with? "SAUCE_"}.each do |k,v|
|
353
354
|
opts[k.downcase.sub("sauce_", "").to_sym] = v
|
354
355
|
end
|
355
356
|
|
356
|
-
opts[:job_name] =
|
357
|
-
opts[:build] = (
|
358
|
-
|
359
|
-
|
360
|
-
|
357
|
+
opts[:job_name] = hash['SAUCE_JOB_NAME'] || hash['JOB_NAME']
|
358
|
+
opts[:build] = (hash['BUILD_TAG'] ||
|
359
|
+
hash['BUILD_NUMBER'] ||
|
360
|
+
hash['TRAVIS_BUILD_NUMBER'] ||
|
361
|
+
hash['CIRCLE_BUILD_NUM'])
|
361
362
|
|
362
|
-
if
|
363
|
-
opts['SAUCE_BROWSER_URL'] = "http://#{
|
363
|
+
if hash.include? 'URL'
|
364
|
+
opts['SAUCE_BROWSER_URL'] = "http://#{hash['URL']}/"
|
364
365
|
end
|
365
366
|
|
366
367
|
if on_demand
|
@@ -373,8 +374,8 @@ module Sauce
|
|
373
374
|
opts[:browsers] = browsers.map { |x| [x['os'], x['browser'], x['version']] }
|
374
375
|
end
|
375
376
|
|
376
|
-
if
|
377
|
-
opts[:perfile_browsers] = JSON.parse(
|
377
|
+
if hash.include? 'SAUCE_PERFILE_BROWSERS'
|
378
|
+
opts[:perfile_browsers] = JSON.parse(hash['SAUCE_PERFILE_BROWSERS'])
|
378
379
|
end
|
379
380
|
|
380
381
|
return opts.delete_if {|key, value| value.nil?}
|
data/lib/sauce/version.rb
CHANGED
@@ -1,20 +1,22 @@
|
|
1
|
-
|
1
|
+
require "sauce/parallel/test_broker"
|
2
2
|
require "parallel_tests"
|
3
3
|
require "parallel_tests/tasks"
|
4
4
|
require "parallel_tests/cli_patch"
|
5
5
|
|
6
|
-
|
7
6
|
namespace :sauce do
|
7
|
+
desc "Run specs in parallel on Sauce Labs"
|
8
8
|
task :spec, :files, :concurrency, :test_options, :parallel_options do |t, args|
|
9
9
|
::RSpec::Core::Runner.disable_autorun!
|
10
10
|
run_parallel_tests(t, args, :rspec)
|
11
11
|
end
|
12
12
|
|
13
|
+
desc "Run features in parallel on Sauce Labs"
|
13
14
|
task :features, :files, :concurrency, :test_options, :parallel_options do |t, args|
|
14
15
|
run_parallel_tests(t, args, :cucumber)
|
15
16
|
end
|
16
17
|
|
17
18
|
namespace :install do
|
19
|
+
desc "Set up your Cucumber features to run in parallel on Sauce Labs"
|
18
20
|
task :features do
|
19
21
|
Rake::Task["sauce:install:create_helper"].execute(:helper_type => :features)
|
20
22
|
puts <<-ENDLINE
|
@@ -29,6 +31,8 @@ namespace :sauce do
|
|
29
31
|
-----------------------------------------------------------------------
|
30
32
|
ENDLINE
|
31
33
|
end
|
34
|
+
|
35
|
+
desc "Set up your specs to run in parallel on Sauce Labs"
|
32
36
|
task :spec do
|
33
37
|
Rake::Task["sauce:install:create_helper"].execute(:helper_type => :spec)
|
34
38
|
spec_helper_path = "spec/spec_helper.rb"
|
data/spec/sauce/capybara_spec.rb
CHANGED
@@ -330,7 +330,7 @@ describe Sauce::Capybara do
|
|
330
330
|
Sauce::Config::POTENTIAL_PORTS.should include used_port
|
331
331
|
end
|
332
332
|
|
333
|
-
describe "
|
333
|
+
describe "with start_local_application set false", :capybara_version => ["2.0.0", "2.9.9"] do
|
334
334
|
before do
|
335
335
|
@start_local_application = Sauce::Config.new[:start_local_application]
|
336
336
|
end
|
@@ -340,7 +340,7 @@ describe Sauce::Capybara do
|
|
340
340
|
c[:start_local_application] = @start_local_application
|
341
341
|
end
|
342
342
|
end
|
343
|
-
it "should not use Sauce Connect ports
|
343
|
+
it "should not use Sauce Connect ports" do
|
344
344
|
Sauce.config { |c| c[:start_local_application] = false }
|
345
345
|
reset_capybara(2.0)
|
346
346
|
Capybara.server_port.should eq nil
|
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.4.
|
4
|
+
version: 3.4.2
|
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: 2014-
|
17
|
+
date: 2014-05-20 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rspec
|
@@ -264,6 +264,7 @@ files:
|
|
264
264
|
- lib/sauce/parallel.rb
|
265
265
|
- lib/sauce/parallel/test_broker.rb
|
266
266
|
- lib/sauce/parallel/test_group.rb
|
267
|
+
- lib/sauce/railtie.rb
|
267
268
|
- lib/sauce/raketasks.rb
|
268
269
|
- lib/sauce/rspec.rb
|
269
270
|
- lib/sauce/selenium.rb
|