sauce 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmQ0M2MyYTcxZmQ5MjZhZDcxMTM5ZWNhMDc0YWE5ZDJhYzE1ZDk5ZA==
4
+ Y2U0MmM0ZDc3ZDU3ZjIyYTlkYzQ4MzAyM2YxMzgzNmI2MWZjZGZmOA==
5
5
  data.tar.gz: !binary |-
6
- OTAxN2EzZDk5NzMwMTczYWQ1ZWU1ZTE4ZWIxMThiYTFmZTBhY2FmZQ==
6
+ ZDAyMzRiOWZkZDVlYjQzOTE1NmM0YWZhODMxYzFiYTYyNDY3YWRiOA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- M2U5NmI1N2FmNWQ4NDQ3ZGE5M2EwMzA0YWQ0OWZkM2Y3MmQwNzRlOTczNjg0
10
- NGNjMzZlNWNmYmI3YmYwNTQwNGJlMTM1MDFlZWEwZjMyMmNhNzM5ZGFkNzli
11
- NzM2MDAzZTkyOGY3ZjFjY2UwZmQ4NjU2NDUzZGJlZDQzNmFkMWY=
9
+ YjA4MGU4ZWU5MGEwZmZkOWI2YmNmMjQ5YjZlYTVlZjhmZTMxMDY3M2NjZGI5
10
+ NDA2YjNlOTA5NWZmYTFmM2NhZjJlOTdkY2ViOTk4YTRmMmU3NDhjMDBkYWU5
11
+ MDU2M2Q3MzUwMjNjZGVjNzZiNzc2ZDRlZWViMjViMTI3MzhiMTQ=
12
12
  data.tar.gz: !binary |-
13
- YzAxZTlhMTE1ZDQ4M2RjNmRlYzg1OGNiYjNhOGIzM2FjNmQ3YjdiMjdjNmNk
14
- Njk3MmRiY2U0MThlNDljM2Q0NzI4YmZlNzUwNmQ5MWM5YzcwOWU2OWZmNTlj
15
- NGY3MmI3N2U1NDllZDYzZmIzYzZhNWM0MDhhZjIxM2M2ZjI2ODA=
13
+ NDA2ZmFmMTE3ZmFjZTU0ZGFhNDdmMTYzYjRjMTdlNTMwNzFmZTJhMDY5ZjQ4
14
+ MTcxODlkNzM5YTdjNDRkYTM4YTczYWRlMjYwODY5MjJjODEzNWE1NzFkNTJh
15
+ NTg1ZDVhNDhkZmVkMzBjNzBiYmZhYzI0NzYxN2ExZTgxYmRkYTg=
@@ -1,10 +1,9 @@
1
1
  require 'timeout'
2
2
  require 'socket'
3
- require 'childprocess'
4
3
  require 'net/http'
5
- require 'childprocess/process'
6
4
  require 'sauce/parallel'
7
5
  require 'sauce/utilities/rails_server'
6
+ require 'sauce/utilities/connect'
8
7
 
9
8
  module Sauce
10
9
  module Utilities
@@ -39,40 +38,5 @@ module Sauce
39
38
  If you are using Capybara and are seeing this message, check the Capybara README for information on how to include the Capybara DSL in your tests.
40
39
  MESSAGE
41
40
  end
42
-
43
-
44
- class Connect
45
- def self.start(options={})
46
- begin
47
- require "sauce/connect"
48
- rescue LoadError => e
49
- STDERR.puts 'Please install the `sauce-connect` gem if you intend on using Sauce Connect with your tests!'
50
- exit(1)
51
- end
52
-
53
- if ParallelTests.first_process?
54
- unless @tunnel
55
- @tunnel = Sauce::Connect.new options
56
- @tunnel.connect
57
- @tunnel.wait_until_ready
58
- end
59
- @tunnel
60
- else
61
- while not File.exist? "sauce_connect.ready"
62
- sleep 0.5
63
- end
64
- end
65
- end
66
-
67
- def self.close
68
- if @tunnel
69
- if ParallelTests.first_process?
70
- ParallelTests.wait_for_other_processes_to_finish
71
- @tunnel.disconnect
72
- @tunnel = nil
73
- end
74
- end
75
- end
76
- end
77
41
  end
78
42
  end
@@ -0,0 +1,37 @@
1
+ module Sauce
2
+ module Utilities
3
+ class Connect
4
+ def self.start(options={})
5
+ begin
6
+ require "sauce/connect"
7
+ rescue LoadError => e
8
+ STDERR.puts 'Please install the `sauce-connect` gem if you intend on using Sauce Connect with your tests!'
9
+ exit(1)
10
+ end
11
+
12
+ if ParallelTests.first_process?
13
+ unless @tunnel
14
+ @tunnel = Sauce::Connect.new options
15
+ @tunnel.connect
16
+ @tunnel.wait_until_ready
17
+ end
18
+ @tunnel
19
+ else
20
+ while not File.exist? "sauce_connect.ready"
21
+ sleep 0.5
22
+ end
23
+ end
24
+ end
25
+
26
+ def self.close
27
+ if @tunnel
28
+ if ParallelTests.first_process?
29
+ ParallelTests.wait_for_other_processes_to_finish
30
+ @tunnel.disconnect
31
+ @tunnel = nil
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -1,3 +1,6 @@
1
+ require 'childprocess'
2
+ require 'childprocess/process'
3
+
1
4
  module Sauce
2
5
  module Utilities
3
6
  class RailsServer
@@ -1,6 +1,6 @@
1
1
  module Sauce
2
2
  MAJOR_VERSION = '3.1'
3
- PATCH_VERSION = '1'
3
+ PATCH_VERSION = '2'
4
4
 
5
5
  def version
6
6
  "#{MAJOR_VERSION}.#{PATCH_VERSION}"
@@ -4,25 +4,42 @@ require "parallel_tests/tasks"
4
4
  require "parallel_tests/cli_patch"
5
5
 
6
6
  namespace :sauce do
7
- task :spec, :files, :concurrencies do |t, args|
7
+ task :spec, :files, :concurrencies, :rspec_opts do |t, args|
8
8
  ::RSpec::Core::Runner.disable_autorun!
9
9
 
10
10
  args.with_defaults({
11
11
  :concurrencies => [Sauce::TestBroker.concurrencies, 20].min,
12
- :files => "spec"
12
+ :files => "spec",
13
+ :rspec_opts => "-t sauce"
13
14
  })
14
- ParallelTests::CLI.new.run(["--type", "saucerspec",
15
- "-n", "#{args[:concurrencies]}",
16
- "#{args[:files]}"])
15
+
16
+ parallel_arguments = [
17
+ "--type", "saucerspec",
18
+ "-n", "#{args[:concurrencies]}"
19
+ ]
20
+
21
+ unless args[:rspec_opts].nil?
22
+ parallel_arguments.push "-o"
23
+ parallel_arguments.push args[:rspec_opts]
24
+ end
25
+
26
+ parallel_arguments.push args[:files]
27
+ ParallelTests::CLI.new.run(parallel_arguments)
17
28
  end
18
29
 
19
- task :features, :files, :concurrency do |t, args|
30
+ task :features, :files, :concurrencies do |t, args|
20
31
  args.with_defaults({
21
32
  :concurrency => [Sauce::TestBroker.concurrencies, 20].min,
22
33
  :files => "features"
23
34
  })
24
- ParallelTests::CLI.new.run(["--type", "saucecucumber", args[:files],
25
- "-n", args[:concurrency].to_s])
35
+
36
+ parallel_arguments = [
37
+ "--type", "saucecucumber",
38
+ "-n", args[:concurrencies].to_s,
39
+ args[:files]
40
+ ]
41
+
42
+ ParallelTests::CLI.new.run(parallel_arguments)
26
43
  end
27
44
 
28
45
  namespace :install do
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.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Lacey
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-08-02 00:00:00.000000000 Z
16
+ date: 2013-08-09 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: capybara
@@ -237,6 +237,7 @@ files:
237
237
  - lib/sauce/rspec.rb
238
238
  - lib/sauce/selenium.rb
239
239
  - lib/sauce/test_unit.rb
240
+ - lib/sauce/utilities/connect.rb
240
241
  - lib/sauce/utilities/rails_server.rb
241
242
  - lib/sauce/utilities/rake.rb
242
243
  - lib/sauce/utilities.rb