saucelabs-adapter 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.1
@@ -16,8 +16,15 @@ module SaucelabsAdapter
16
16
  def shutdown
17
17
  if @gateway
18
18
  say "Shutting down ssh reverse tunnel"
19
- @gateway.close(@port) if @port
20
- @gateway.shutdown! if @gateway
19
+ begin
20
+ @gateway.close(@port) if @port
21
+ @gateway.shutdown! if @gateway
22
+ rescue => e
23
+ say "Error shutting down ssh reverse tunnel: #{e.message}"
24
+ say e.backtrace
25
+ # Do not raise an error if tunnel shutdown failed; we don't want to abort the whole test suite; and it is all in transient memory anyway
26
+ # This could potentially be a problem when opening an SshTunnel multiple times during a single interpreter, but we'll see...
27
+ end
21
28
  end
22
29
  end
23
30
 
metadata CHANGED
@@ -1,12 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saucelabs-adapter
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 8
8
- - 0
9
- version: 0.8.0
4
+ version: 0.8.1
10
5
  platform: ruby
11
6
  authors:
12
7
  - Kelly Felkins, Chad Woolley & Sam Pierson
@@ -14,79 +9,59 @@ autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
11
 
17
- date: 2010-02-24 00:00:00 -08:00
12
+ date: 2010-03-01 00:00:00 -07:00
18
13
  default_executable:
19
14
  dependencies:
20
15
  - !ruby/object:Gem::Dependency
21
16
  name: rest-client
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
24
20
  requirements:
25
21
  - - ">="
26
22
  - !ruby/object:Gem::Version
27
- segments:
28
- - 1
29
- - 2
30
- - 0
31
23
  version: 1.2.0
32
- type: :runtime
33
- version_requirements: *id001
24
+ version:
34
25
  - !ruby/object:Gem::Dependency
35
26
  name: net-ssh
36
- prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
38
30
  requirements:
39
31
  - - ">="
40
32
  - !ruby/object:Gem::Version
41
- segments:
42
- - 2
43
- - 0
44
- - 12
45
33
  version: 2.0.12
46
- type: :runtime
47
- version_requirements: *id002
34
+ version:
48
35
  - !ruby/object:Gem::Dependency
49
36
  name: net-ssh-gateway
50
- prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
52
40
  requirements:
53
41
  - - ">="
54
42
  - !ruby/object:Gem::Version
55
- segments:
56
- - 1
57
- - 0
58
- - 1
59
43
  version: 1.0.1
60
- type: :runtime
61
- version_requirements: *id003
44
+ version:
62
45
  - !ruby/object:Gem::Dependency
63
46
  name: selenium-client
64
- prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
47
+ type: :runtime
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
66
50
  requirements:
67
51
  - - ">="
68
52
  - !ruby/object:Gem::Version
69
- segments:
70
- - 1
71
- - 2
72
- - 17
73
53
  version: 1.2.17
74
- type: :runtime
75
- version_requirements: *id004
54
+ version:
76
55
  - !ruby/object:Gem::Dependency
77
56
  name: lsof
78
- prerelease: false
79
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ type: :runtime
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
80
60
  requirements:
81
61
  - - ">="
82
62
  - !ruby/object:Gem::Version
83
- segments:
84
- - 0
85
- - 3
86
- - 0
87
63
  version: 0.3.0
88
- type: :runtime
89
- version_requirements: *id005
64
+ version:
90
65
  description: "This gem augments Test::Unit and Polonium/Webrat to run Selenium tests in the cloud. "
91
66
  email: pair+kelly+sam@pivotallabs.com
92
67
  executables: []
@@ -95,7 +70,6 @@ extensions: []
95
70
 
96
71
  extra_rdoc_files:
97
72
  - LICENSE
98
- - README.html
99
73
  - README.markdown
100
74
  files:
101
75
  - LICENSE
@@ -119,7 +93,6 @@ files:
119
93
  - lib/saucelabs_adapter/utilities.rb
120
94
  - lib/saucerest-ruby/gateway.rb
121
95
  - lib/saucerest-ruby/saucerest.rb
122
- - README.html
123
96
  - README.markdown
124
97
  has_rdoc: true
125
98
  homepage: http://github.com/pivotal/saucelabs-adapter
@@ -134,20 +107,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
107
  requirements:
135
108
  - - ">="
136
109
  - !ruby/object:Gem::Version
137
- segments:
138
- - 0
139
110
  version: "0"
111
+ version:
140
112
  required_rubygems_version: !ruby/object:Gem::Requirement
141
113
  requirements:
142
114
  - - ">="
143
115
  - !ruby/object:Gem::Version
144
- segments:
145
- - 0
146
116
  version: "0"
117
+ version:
147
118
  requirements: []
148
119
 
149
120
  rubyforge_project:
150
- rubygems_version: 1.3.6
121
+ rubygems_version: 1.3.5
151
122
  signing_key:
152
123
  specification_version: 3
153
124
  summary: Adapter for running Selenium tests using SauceLabs.com
data/README.html DELETED
@@ -1,180 +0,0 @@
1
-
2
- <html>
3
- <head><title>README.markdown</title></head>
4
- <body>
5
- <h1>Saucelabs-Adapter</h1>
6
-
7
- <p>Saucelabs-adapter provides the glue to connect Rails Selenium tests to saucelabs.com.</p>
8
-
9
- <p>Currently it supports tests written using Webrat, Polonium and JSUnit.</p>
10
-
11
- <h2>Getting Started - Webrat or Polonium test suites</h2>
12
-
13
- <ol>
14
- <li><p>Prerequisites:</p>
15
-
16
- <p>You must be able to run selenium tests locally using test/selenium/selenium_suite.rb</p></li>
17
- <li><p>Install the gem:</p>
18
-
19
- <pre><code>gem install saucelabs-adapter
20
- </code></pre></li>
21
- <li><p>Run the saucelabs_adapter generator in your project:</p>
22
-
23
- <pre><code>cd your_project
24
-
25
- script/generate saucelabs_adapter
26
- </code></pre></li>
27
- <li><p>Configure it. In config/selenium.yml, replace YOUR-SAUCELABS-USERNAME and
28
- YOUR-SAUCELABS-ACCESS-KEY with your saucelabs.com account information.</p></li>
29
- <li><p>Run Tests</p>
30
-
31
- <p>To run Selenium Test::Unit tests locally:</p>
32
-
33
- <pre><code>rake selenium:local
34
- </code></pre>
35
-
36
- <p>To run Selenium Test::Unit tests using saucelabs.com:</p>
37
-
38
- <pre><code>rake selenium:sauce
39
- </code></pre></li>
40
- </ol>
41
-
42
-
43
- <h2>Getting Started - JsUnit test suite</h2>
44
-
45
- <ol>
46
- <li><p>Prerequisites:</p>
47
-
48
- <p>Install the latest JsUnit from http://github.com/pivotal/jsunit</p>
49
-
50
- <p>JsUnit must be installed in RAILS_ROOT/public/jsunit as follows:</p>
51
-
52
- <pre><code>public/jsunit/jsunit_jar/jsunit.jar -- the compiled jar
53
- public/jsunit/jsunit/build.xml etc... -- jsunit sources
54
- </code></pre></li>
55
- <li><p>Install the saucelabs-adapter gem:</p>
56
-
57
- <pre><code>gem install saucelabs-adapter
58
- </code></pre></li>
59
- <li><p>Run the saucelabs_adapter generator in your project:</p>
60
-
61
- <pre><code>cd your_project
62
-
63
- script/generate saucelabs_adapter --jsunit
64
- </code></pre></li>
65
- <li><p>Configure it.</p>
66
-
67
- <p>In config/selenium.yml, replace YOUR-SAUCELABS-USERNAME and
68
- YOUR-SAUCELABS-ACCESS-KEY with your saucelabs.com account information.</p>
69
-
70
- <p>Rename RAILS_ROOT/test/jsunit/jsunit_suite_example.rb to RAILS_ROOT/test/jsunit/jsunit_suite.rb
71
- and modify it if necessary:
72
- test_page needs to be set to the path under /public where your JsUnit test page (suite.html or similar) lives,
73
- with '/jsunit' prepended. e.g. if your JsUnit suite runs from RAILS_ROOT/public/javascripts/test-pages/suite.html
74
- then test_page needs to be set to '/jsunit/javascripts/test-pages/suite.html'.</p></li>
75
- <li><p>Run Tests</p>
76
-
77
- <p>To run JsUnit tests locally:</p>
78
-
79
- <pre><code>rake jsunit:selenium_rc:local
80
- </code></pre>
81
-
82
- <p>To run JsUnit tests using saucelabs.com:</p>
83
-
84
- <pre><code>rake jsunit:selenium_rc:sauce
85
- </code></pre></li>
86
- </ol>
87
-
88
-
89
- <h2>What You Should See</h2>
90
-
91
- <p>When running tests, intermixed with your test output you should see the following lines:</p>
92
-
93
- <pre><code> [saucelabs-adapter] Setting up tunnel from Saucelabs (yourhostname-12345.com:80) to localhost:4000
94
- [saucelabs-adapter] Tunnel ID 717909c571b8319dc5ae708b689fd7f5 for yourhostname-12345.com is up.
95
- Started
96
- ....................
97
- [saucelabs-adapter] Shutting down tunnel to Saucelabs...
98
- [saucelabs-adapter] done.
99
- </code></pre>
100
-
101
- <h2>In Case of Problems</h2>
102
-
103
- <p>Try setting environment variable SAUCELABS_ADAPTER_DEBUG to "true". This enables more verbose output.</p>
104
-
105
- <h2>Continuous Integration</h2>
106
-
107
- <p>Sauce Labs now lets you set the name of a test job.
108
- By default the SaucelabsAdapter will set this to the name of the machine it is currently running on,
109
- however you may override this by setting the environment variable SAUCELABS_JOB_NAME.</p>
110
-
111
- <p>This can be useful if you run many tests from the same CI machine and would like to differentiate between
112
- them without actually viewing the video.</p>
113
-
114
- <h2>What it Does</h2>
115
-
116
- <p>The saucelabs-adapter performs two functions when it detects you are running a test that will use saucelabs.com:</p>
117
-
118
- <ol>
119
- <li><p>It sets up a SauceTunnel before the test run starts and tears it down after the test ends. This happens once for the entire test run.</p></li>
120
- <li><p>It configures the selenium client to connect to the correct address at saucelabs.com. This happens at the start of each test.</p></li>
121
- </ol>
122
-
123
- <h1>Resources</h1>
124
-
125
- <ul>
126
- <li><a href="http://gemcutter.org/gems/saucelabs-adapter">The gem</a></li>
127
- <li><a href="http://github.com/pivotal/saucelabs-adapter">Source code</a></li>
128
- <li><a href="http://www.pivotaltracker.com/projects/59050">Tracker project</a></li>
129
- <li><a href="http://ci.pivotallabs.com:3333/builds/SaucelabsCanary">Canary CI build</a></li>
130
- <li><a href="http://github.com/pivotal/saucelabs-canary">Canary project source code</a></li>
131
- </ul>
132
-
133
-
134
- <h1>CHANGES</h1>
135
-
136
- <h2>0.7.6</h2>
137
-
138
- <ul>
139
- <li>Added saucelabs_max_duration configuration option.</li>
140
- </ul>
141
-
142
-
143
- <h2>0.7.0</h2>
144
-
145
- <ul>
146
- <li><p>The gem has been reorganized to better conform with Gem best-practices.</p></li>
147
- <li><p>The rakefile generator has changed. If you are upgrading, you will need to rerun the generator and overwrite lib/tasks/saucelabs_adapter.rake,
148
- or just change line 1 of that file to read:</p>
149
-
150
- <pre><code>require 'saucelabs_adapter/run_utils'
151
- </code></pre></li>
152
- <li><p>The selenium.yml syntax has changed to break out all the saucelabs info into separate lines, and the tunnel method is now explicitly stated:</p>
153
-
154
- <ul>
155
- <li><p>Old:</p>
156
-
157
- <pre><code> selenium_browser_key: '{"username": "YOUR-SAUCELABS-USERNAME", "access-key": "YOUR-SAUCELABS-ACCESS-KEY", "os": "Linux", "browser": "firefox", "browser-version": "3."}'
158
- #
159
- localhost_app_server_port: "4000"
160
- tunnel_startup_timeout: 240
161
- </code></pre></li>
162
- <li><p>New:</p>
163
-
164
- <pre><code> saucelabs_username: "YOUR-SAUCELABS-USERNAME"
165
- saucelabs_access_key: "YOUR-SAUCELABS-ACCESS-KEY"
166
- saucelabs_browser_os: "Linux"
167
- saucelabs_browser: "firefox"
168
- saucelabs_browser_version: "3."
169
- #
170
- tunnel_method: :saucetunnel
171
- tunnel_to_localhost_port: 4000
172
- tunnel_startup_timeout: 240
173
- </code></pre></li>
174
- </ul>
175
- </li>
176
- <li><p>The dependency on Python has been removed.</p></li>
177
- </ul>
178
-
179
- </body>
180
- </html>