sauce 2.4.4 → 2.4.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ M2RkZDEzM2YyYThmY2Q5Mjc3ZWU4ZGE4YzJjYzAzNzIzZTFiN2FiMw==
5
+ data.tar.gz: !binary |-
6
+ MzU0ODcyMmQ1OTIyOTljM2EzZjFiZTY0YWUxMGU5MzgzMDVhMjcwYQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ MjMzN2VhYmI2NzY0YTdiNDBhNjUxOTJiOTVkZDYzM2UwNmZhMmUyNmQzZGQ5
10
+ ZTZkOWRmZmU4ZThkYzUyMmQwYWFiMjdkNTU3ZDg2MTg5ZmRiYTc1ZTZjMmUw
11
+ YmJkMmEyZmU1YjgyMjhkMWQ1Yzc1ODUwMDhlMWE1OTQ4YzFmNjA=
12
+ data.tar.gz: !binary |-
13
+ YzNjNjU2ODhmZDBiYmQ1OWNmZmI2NTlmNmYxNGU0YjE2OTFhZWI1OTBmODdm
14
+ MGIxMTUwNjM3YzkzMjY1NmViM2U3NjhjMzIxZGE2MDYxYTkyN2JiYzFmZmY4
15
+ M2Y3ZTJmNzU2YTFhZjliMmI1MzE5NTYwN2I3OTNiNjMwYWNjMWM=
@@ -0,0 +1,34 @@
1
+ module ChildProcess
2
+ module Unix
3
+ class Process < AbstractProcess
4
+
5
+ def return_unless_timeout
6
+ lambda do |timeout|
7
+ begin
8
+ return poll_for_exit timeout
9
+ rescue TimeoutError
10
+ end
11
+ end
12
+ end
13
+
14
+ def stop(timeout = 3, signal=nil)
15
+ assert_started
16
+
17
+ unless signal.nil?
18
+ send_signal signal
19
+ return_unless_timeout.call(timeout)
20
+ end
21
+
22
+ send_term
23
+ return_unless_timeout.call(timeout)
24
+
25
+ send_kill
26
+ wait
27
+ rescue Errno::ECHILD, Errno::ESRCH
28
+ # handle race condition where process dies between timeout
29
+ # and send_kill
30
+ true
31
+ end
32
+ end
33
+ end
34
+ end
@@ -182,8 +182,10 @@ module Sauce
182
182
  :browser_version => version,
183
183
  :job_name => my_name.to_s})
184
184
  @browser = Sauce::Selenium2.new(options)
185
+ Sauce.driver_pool[Thread.current.object_id] = @browser
185
186
  super(*args, &blk)
186
187
  @browser.stop
188
+ Sauce.driver_pool.delete Thread.current.object_id
187
189
  end
188
190
  end
189
191
  end
@@ -2,6 +2,7 @@ require 'timeout'
2
2
  require 'socket'
3
3
  require 'childprocess'
4
4
  require 'net/http'
5
+ require 'childprocess/process'
5
6
 
6
7
  module Sauce
7
8
  module Utilities
@@ -50,14 +51,14 @@ module Sauce
50
51
  wait_for_server_on_port(3001)
51
52
 
52
53
  at_exit do
53
- @server.stop
54
+ @server.stop(3, "INT")
54
55
  end
55
56
  STDERR.puts "Rails server running!"
56
57
  end
57
58
 
58
59
  def stop
59
60
  begin
60
- @server.stop
61
+ @server.stop(3, "INT")
61
62
  rescue
62
63
  STDERR.puts "Rails server could not be killed. Did it fail to start?"
63
64
  end
@@ -1,6 +1,6 @@
1
1
  module Sauce
2
2
  MAJOR_VERSION = '2.4'
3
- PATCH_VERSION = '4'
3
+ PATCH_VERSION = '5'
4
4
 
5
5
  def version
6
6
  "#{MAJOR_VERSION}.#{PATCH_VERSION}"
@@ -1,8 +1,6 @@
1
1
  require 'spec_helper'
2
2
  require 'sauce/connect'
3
3
 
4
-
5
-
6
4
  describe 'Sauce::Connect integration testing' do
7
5
  def make_connection
8
6
  Sauce::Connect.new({})
@@ -0,0 +1,39 @@
1
+ require "rubygems"
2
+ require "bundler/setup"
3
+ require "test/unit"
4
+ require "sauce"
5
+ require "sauce/capybara"
6
+ require "mocha/setup"
7
+
8
+ Sauce.config do |c|
9
+ c[:browsers] = [
10
+ ["Windows 7", "Firefox", "18"],
11
+ ["Linux", "Firefox", "17"]
12
+ ]
13
+ end
14
+
15
+ Capybara.default_driver = :sauce
16
+
17
+ class CapybaraTestCase < Sauce::TestCase
18
+ include Capybara::DSL
19
+
20
+ def teardown
21
+ Capybara.reset_sessions!
22
+ Capybara.use_default_driver
23
+ end
24
+ end
25
+
26
+ class CapybaraIntegrationTest < CapybaraTestCase
27
+
28
+ # Called after every test method runs. Can be used to tear
29
+ # down fixture information.
30
+
31
+ def test_driver_is_from_the_driver_pool
32
+ assert_equal Capybara.current_session.driver.browser, selenium
33
+ end
34
+
35
+ def test_capybara_does_not_create_a_new_driver
36
+ ::Sauce::Selenium2.expects(:new).never
37
+ visit "http://www.wikipedia.org"
38
+ end
39
+ end
@@ -0,0 +1,31 @@
1
+ require "rubygems"
2
+ require "bundler/setup"
3
+ require "test/unit"
4
+ require "sauce"
5
+
6
+ Sauce.config do |c|
7
+ c[:browsers] = [
8
+ ["Windows 7", "Firefox", "18"]
9
+ ]
10
+ end
11
+
12
+ class IntegrationTest < Sauce::TestCase
13
+
14
+ # Called before every test method runs. Can be used
15
+ # to set up fixture information.
16
+ def setup
17
+ # Do nothing
18
+ end
19
+
20
+ # Called after every test method runs. Can be used to tear
21
+ # down fixture information.
22
+
23
+ def teardown
24
+
25
+ end
26
+
27
+ def test_testunit_is_set_in_sauce_config
28
+ capabilities = Sauce.get_config.to_desired_capabilities
29
+ assert_includes capabilities[:client_version], "Test::Unit"
30
+ end
31
+ end
@@ -0,0 +1,8 @@
1
+ require "spec_helper"
2
+
3
+ describe "Sauce::Test::Unit" do
4
+
5
+ it "should add a driver to the pool" do
6
+
7
+ end
8
+ end
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sauce
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.4
5
- prerelease:
4
+ version: 2.4.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dylan Lacey
@@ -14,12 +13,11 @@ authors:
14
13
  autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
- date: 2013-04-23 00:00:00.000000000 Z
16
+ date: 2013-05-29 00:00:00.000000000 Z
18
17
  dependencies:
19
18
  - !ruby/object:Gem::Dependency
20
19
  name: capybara
21
20
  requirement: !ruby/object:Gem::Requirement
22
- none: false
23
21
  requirements:
24
22
  - - ~>
25
23
  - !ruby/object:Gem::Version
@@ -27,7 +25,6 @@ dependencies:
27
25
  type: :development
28
26
  prerelease: false
29
27
  version_requirements: !ruby/object:Gem::Requirement
30
- none: false
31
28
  requirements:
32
29
  - - ~>
33
30
  - !ruby/object:Gem::Version
@@ -35,7 +32,6 @@ dependencies:
35
32
  - !ruby/object:Gem::Dependency
36
33
  name: net-http-persistent
37
34
  requirement: !ruby/object:Gem::Requirement
38
- none: false
39
35
  requirements:
40
36
  - - ! '>='
41
37
  - !ruby/object:Gem::Version
@@ -43,7 +39,6 @@ dependencies:
43
39
  type: :runtime
44
40
  prerelease: false
45
41
  version_requirements: !ruby/object:Gem::Requirement
46
- none: false
47
42
  requirements:
48
43
  - - ! '>='
49
44
  - !ruby/object:Gem::Version
@@ -51,7 +46,6 @@ dependencies:
51
46
  - !ruby/object:Gem::Dependency
52
47
  name: rest-client
53
48
  requirement: !ruby/object:Gem::Requirement
54
- none: false
55
49
  requirements:
56
50
  - - ! '>='
57
51
  - !ruby/object:Gem::Version
@@ -59,7 +53,6 @@ dependencies:
59
53
  type: :runtime
60
54
  prerelease: false
61
55
  version_requirements: !ruby/object:Gem::Requirement
62
- none: false
63
56
  requirements:
64
57
  - - ! '>='
65
58
  - !ruby/object:Gem::Version
@@ -67,7 +60,6 @@ dependencies:
67
60
  - !ruby/object:Gem::Dependency
68
61
  name: net-ssh
69
62
  requirement: !ruby/object:Gem::Requirement
70
- none: false
71
63
  requirements:
72
64
  - - ! '>='
73
65
  - !ruby/object:Gem::Version
@@ -75,7 +67,6 @@ dependencies:
75
67
  type: :runtime
76
68
  prerelease: false
77
69
  version_requirements: !ruby/object:Gem::Requirement
78
- none: false
79
70
  requirements:
80
71
  - - ! '>='
81
72
  - !ruby/object:Gem::Version
@@ -83,7 +74,6 @@ dependencies:
83
74
  - !ruby/object:Gem::Dependency
84
75
  name: net-ssh-gateway
85
76
  requirement: !ruby/object:Gem::Requirement
86
- none: false
87
77
  requirements:
88
78
  - - ! '>='
89
79
  - !ruby/object:Gem::Version
@@ -91,7 +81,6 @@ dependencies:
91
81
  type: :runtime
92
82
  prerelease: false
93
83
  version_requirements: !ruby/object:Gem::Requirement
94
- none: false
95
84
  requirements:
96
85
  - - ! '>='
97
86
  - !ruby/object:Gem::Version
@@ -99,7 +88,6 @@ dependencies:
99
88
  - !ruby/object:Gem::Dependency
100
89
  name: selenium-webdriver
101
90
  requirement: !ruby/object:Gem::Requirement
102
- none: false
103
91
  requirements:
104
92
  - - ! '>='
105
93
  - !ruby/object:Gem::Version
@@ -107,7 +95,6 @@ dependencies:
107
95
  type: :runtime
108
96
  prerelease: false
109
97
  version_requirements: !ruby/object:Gem::Requirement
110
- none: false
111
98
  requirements:
112
99
  - - ! '>='
113
100
  - !ruby/object:Gem::Version
@@ -115,7 +102,6 @@ dependencies:
115
102
  - !ruby/object:Gem::Dependency
116
103
  name: childprocess
117
104
  requirement: !ruby/object:Gem::Requirement
118
- none: false
119
105
  requirements:
120
106
  - - ! '>='
121
107
  - !ruby/object:Gem::Version
@@ -123,7 +109,6 @@ dependencies:
123
109
  type: :runtime
124
110
  prerelease: false
125
111
  version_requirements: !ruby/object:Gem::Requirement
126
- none: false
127
112
  requirements:
128
113
  - - ! '>='
129
114
  - !ruby/object:Gem::Version
@@ -131,7 +116,6 @@ dependencies:
131
116
  - !ruby/object:Gem::Dependency
132
117
  name: json
133
118
  requirement: !ruby/object:Gem::Requirement
134
- none: false
135
119
  requirements:
136
120
  - - ! '>='
137
121
  - !ruby/object:Gem::Version
@@ -139,7 +123,6 @@ dependencies:
139
123
  type: :runtime
140
124
  prerelease: false
141
125
  version_requirements: !ruby/object:Gem::Requirement
142
- none: false
143
126
  requirements:
144
127
  - - ! '>='
145
128
  - !ruby/object:Gem::Version
@@ -147,7 +130,6 @@ dependencies:
147
130
  - !ruby/object:Gem::Dependency
148
131
  name: cmdparse
149
132
  requirement: !ruby/object:Gem::Requirement
150
- none: false
151
133
  requirements:
152
134
  - - ! '>='
153
135
  - !ruby/object:Gem::Version
@@ -155,7 +137,6 @@ dependencies:
155
137
  type: :runtime
156
138
  prerelease: false
157
139
  version_requirements: !ruby/object:Gem::Requirement
158
- none: false
159
140
  requirements:
160
141
  - - ! '>='
161
142
  - !ruby/object:Gem::Version
@@ -163,7 +144,6 @@ dependencies:
163
144
  - !ruby/object:Gem::Dependency
164
145
  name: highline
165
146
  requirement: !ruby/object:Gem::Requirement
166
- none: false
167
147
  requirements:
168
148
  - - ! '>='
169
149
  - !ruby/object:Gem::Version
@@ -171,7 +151,6 @@ dependencies:
171
151
  type: :runtime
172
152
  prerelease: false
173
153
  version_requirements: !ruby/object:Gem::Requirement
174
- none: false
175
154
  requirements:
176
155
  - - ! '>='
177
156
  - !ruby/object:Gem::Version
@@ -184,6 +163,7 @@ executables:
184
163
  extensions: []
185
164
  extra_rdoc_files: []
186
165
  files:
166
+ - lib/childprocess/process.rb
187
167
  - lib/generators/sauce/install/install_generator.rb
188
168
  - lib/sauce/capybara.rb
189
169
  - lib/sauce/client.rb
@@ -204,43 +184,39 @@ files:
204
184
  - spec/integration/rspec/spec/selenium/selenium_with_capybara_spec.rb
205
185
  - spec/integration/rspec/spec/spec_helper.rb
206
186
  - spec/integration/rspec/spec/tagging/selenium_tagging_spec.rb
187
+ - spec/integration/testunit/test/capybara_integration_test.rb
188
+ - spec/integration/testunit/test/integration_test.rb
207
189
  - spec/sauce/capybara_spec.rb
208
190
  - spec/sauce/config_spec.rb
209
191
  - spec/sauce/cucumber_spec.rb
210
192
  - spec/sauce/driver_pool_spec.rb
211
193
  - spec/sauce/jasmine_spec.rb
212
194
  - spec/sauce/selenium_spec.rb
195
+ - spec/sauce/test_unit_spec.rb
213
196
  - spec/spec_helper.rb
214
197
  - bin/sauce
215
198
  homepage: http://github.com/sauce-labs/sauce_ruby
216
199
  licenses: []
200
+ metadata: {}
217
201
  post_install_message:
218
202
  rdoc_options: []
219
203
  require_paths:
220
204
  - lib
221
205
  required_ruby_version: !ruby/object:Gem::Requirement
222
- none: false
223
206
  requirements:
224
207
  - - ! '>='
225
208
  - !ruby/object:Gem::Version
226
209
  version: '0'
227
- segments:
228
- - 0
229
- hash: 2265912707898930390
230
210
  required_rubygems_version: !ruby/object:Gem::Requirement
231
- none: false
232
211
  requirements:
233
212
  - - ! '>='
234
213
  - !ruby/object:Gem::Version
235
214
  version: '0'
236
- segments:
237
- - 0
238
- hash: 2265912707898930390
239
215
  requirements: []
240
216
  rubyforge_project:
241
- rubygems_version: 1.8.25
217
+ rubygems_version: 2.0.3
242
218
  signing_key:
243
- specification_version: 3
219
+ specification_version: 4
244
220
  summary: A Ruby helper for running tests in Sauce Labs
245
221
  test_files:
246
222
  - spec/cucumber_helper.rb
@@ -249,10 +225,13 @@ test_files:
249
225
  - spec/integration/rspec/spec/selenium/selenium_with_capybara_spec.rb
250
226
  - spec/integration/rspec/spec/spec_helper.rb
251
227
  - spec/integration/rspec/spec/tagging/selenium_tagging_spec.rb
228
+ - spec/integration/testunit/test/capybara_integration_test.rb
229
+ - spec/integration/testunit/test/integration_test.rb
252
230
  - spec/sauce/capybara_spec.rb
253
231
  - spec/sauce/config_spec.rb
254
232
  - spec/sauce/cucumber_spec.rb
255
233
  - spec/sauce/driver_pool_spec.rb
256
234
  - spec/sauce/jasmine_spec.rb
257
235
  - spec/sauce/selenium_spec.rb
236
+ - spec/sauce/test_unit_spec.rb
258
237
  - spec/spec_helper.rb