sauce_whisk 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5bcdd67ee4587647ee4a6d20b5bac89a50d09a25
4
- data.tar.gz: 73fb38fbc95b357c5edcf37c759ae505cbc1ba71
3
+ metadata.gz: 07502cd983fd25be8386973ff86c35cfec03756e
4
+ data.tar.gz: 99324bc172f6da9e9b25113311d4dc25c56a9727
5
5
  SHA512:
6
- metadata.gz: 42717f223ac6ead17b8e3d9542436e436204a2bbe6df622ca05f340fd63450b9b90e01c5e331495840e09df49038d72cfe075942ba0e946bf53fe4a8b600d097
7
- data.tar.gz: 997b70fc0e41c91a9b4a415de955be01450d242bdf8101b054e9278bec541c5f20a531acadda37fd04d1b7e0607a95cece67f56c35a9f6d123297c359f4ddd21
6
+ metadata.gz: a00fa7e1ef94866ef796b0179fa7d6fb5723b1577ad9ac30be935ad503b10e54cee04bb403f78488314113c3af5f08968a78b2e37d1760f969d52c44e60bc9fe
7
+ data.tar.gz: 775aab6fff42d0f2aa3016c735a9e567330e0866b3b2d055569f8a3e9b1a456fd104b7f9e0a6c6d5a95cca2a9b68dadc4e82668e200066d6b2c2b209dd7e0c00
@@ -1,5 +1,9 @@
1
1
  # Major Version 0
2
- ###
2
+ ### 0.0.21
3
+ * Jobs.fetch will now _actually_ not swallow RestClient errors
4
+ * Gem should be faster to install; Test files are no longer included which means no waiting to download fixtures.
5
+
6
+ ### 0.0.20
3
7
  * ArgumentError will now be thrown if the gem can't find a Username or Access Key
4
8
  * Jobs.fetch no longer swallows RestClient errors _unless_ specifically caused by a job not being finished.
5
9
 
@@ -41,12 +41,15 @@ module SauceWhisk
41
41
  end
42
42
 
43
43
  def self.fetch(job_id)
44
- job_hash = JSON.parse(get job_id)
45
- assets = job_assets job_id
46
- job_hash.merge! assets
47
- rescue SauceWhisk::JobNotComplete
48
- # Always succeed
49
- ensure
44
+ job_hash = {}
45
+ begin
46
+ job_hash = JSON.parse(get job_id)
47
+ assets = job_assets job_id
48
+ job_hash.merge! assets
49
+ rescue SauceWhisk::JobNotComplete
50
+ # Always succeed
51
+ end
52
+
50
53
  return Job.new(job_hash)
51
54
  end
52
55
 
@@ -75,10 +78,11 @@ module SauceWhisk
75
78
 
76
79
  {"screenshot_urls" => screenshots}
77
80
  rescue RestClient::BadRequest => e
78
- SauceWhisk.logger.debug("Exception fetching assets: #{e}")
79
81
  if (/Job hasn't finished running/.match e.response)
82
+ SauceWhisk.logger.debug("Exception fetching assets: #{e.message} - #{e.response}")
80
83
  raise SauceWhisk::JobNotComplete
81
84
  else
85
+ SauceWhisk.logger.error("Exception fetching assets: #{e.message} - #{e.response}")
82
86
  raise e
83
87
  end
84
88
  end
@@ -1,3 +1,3 @@
1
1
  module SauceWhisk
2
- VERSION = "0.0.20"
2
+ VERSION = "0.0.21"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sauce_whisk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Lacey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-23 00:00:00.000000000 Z
11
+ date: 2016-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -102,7 +102,6 @@ extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
104
  - ".gitignore"
105
- - ".rspec"
106
105
  - ".ruby-gemset"
107
106
  - ".ruby-version"
108
107
  - ".travis.yml"
@@ -123,31 +122,6 @@ files:
123
122
  - lib/sauce_whisk/tunnels.rb
124
123
  - lib/sauce_whisk/version.rb
125
124
  - lib/saucewhisk.rb
126
- - sauce_whisk.gemspec
127
- - spec/fixtures/vcr_cassettes/accounts.yml
128
- - spec/fixtures/vcr_cassettes/assets.yml
129
- - spec/fixtures/vcr_cassettes/info.yml
130
- - spec/fixtures/vcr_cassettes/jobs.yml
131
- - spec/fixtures/vcr_cassettes/no_jobs.yml
132
- - spec/fixtures/vcr_cassettes/no_tunnels.yml
133
- - spec/fixtures/vcr_cassettes/rest_request.yml
134
- - spec/fixtures/vcr_cassettes/storage.yml
135
- - spec/fixtures/vcr_cassettes/tunnels.yml
136
- - spec/fixtures/vcr_cassettes/tunnels_with_wait.yml
137
- - spec/lib/sauce_whisk/account_spec.rb
138
- - spec/lib/sauce_whisk/accounts_spec.rb
139
- - spec/lib/sauce_whisk/asset_spec.rb
140
- - spec/lib/sauce_whisk/assets_spec.rb
141
- - spec/lib/sauce_whisk/info_spec.rb
142
- - spec/lib/sauce_whisk/job_spec.rb
143
- - spec/lib/sauce_whisk/jobs_spec.rb
144
- - spec/lib/sauce_whisk/rest_request_builder_spec.rb
145
- - spec/lib/sauce_whisk/sauce_whisk_spec.rb
146
- - spec/lib/sauce_whisk/storage_spec.rb
147
- - spec/lib/sauce_whisk/subaccounts_spec.rb
148
- - spec/lib/sauce_whisk/tunnel_spec.rb
149
- - spec/lib/sauce_whisk/tunnels_spec.rb
150
- - spec/spec_helper.rb
151
125
  homepage: http://www.github.com/dylanlacey/sauce_whisk
152
126
  licenses:
153
127
  - MIT
@@ -173,28 +147,4 @@ signing_key:
173
147
  specification_version: 4
174
148
  summary: Sauce_Whisk lets you mix extra data into your Sauce test results! Fetch and
175
149
  update Job details, screenshots, videos and logs.
176
- test_files:
177
- - spec/fixtures/vcr_cassettes/accounts.yml
178
- - spec/fixtures/vcr_cassettes/assets.yml
179
- - spec/fixtures/vcr_cassettes/info.yml
180
- - spec/fixtures/vcr_cassettes/jobs.yml
181
- - spec/fixtures/vcr_cassettes/no_jobs.yml
182
- - spec/fixtures/vcr_cassettes/no_tunnels.yml
183
- - spec/fixtures/vcr_cassettes/rest_request.yml
184
- - spec/fixtures/vcr_cassettes/storage.yml
185
- - spec/fixtures/vcr_cassettes/tunnels.yml
186
- - spec/fixtures/vcr_cassettes/tunnels_with_wait.yml
187
- - spec/lib/sauce_whisk/account_spec.rb
188
- - spec/lib/sauce_whisk/accounts_spec.rb
189
- - spec/lib/sauce_whisk/asset_spec.rb
190
- - spec/lib/sauce_whisk/assets_spec.rb
191
- - spec/lib/sauce_whisk/info_spec.rb
192
- - spec/lib/sauce_whisk/job_spec.rb
193
- - spec/lib/sauce_whisk/jobs_spec.rb
194
- - spec/lib/sauce_whisk/rest_request_builder_spec.rb
195
- - spec/lib/sauce_whisk/sauce_whisk_spec.rb
196
- - spec/lib/sauce_whisk/storage_spec.rb
197
- - spec/lib/sauce_whisk/subaccounts_spec.rb
198
- - spec/lib/sauce_whisk/tunnel_spec.rb
199
- - spec/lib/sauce_whisk/tunnels_spec.rb
200
- - spec/spec_helper.rb
150
+ test_files: []
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
@@ -1,28 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'sauce_whisk/version'
5
-
6
- Gem::Specification.new do |gem|
7
- gem.name = 'sauce_whisk'
8
- gem.version = SauceWhisk::VERSION
9
- gem.authors = ['Dylan Lacey']
10
- gem.email = ['github@dylanlacey.com']
11
- gem.description = 'A Wrapper for the Sauce Labs REST API.'
12
- gem.summary = "Sauce_Whisk lets you mix extra data into your Sauce test results!\nFetch and update Job details, screenshots, videos and logs."
13
- gem.homepage = 'http://www.github.com/dylanlacey/sauce_whisk'
14
-
15
- gem.files = `git ls-files`.split($/)
16
- gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
17
- gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
- gem.require_paths = ['lib']
19
-
20
- gem.license = 'MIT'
21
-
22
- gem.add_runtime_dependency 'rest-client', '~> 1.8.0'
23
- gem.add_runtime_dependency 'json', '~> 1.8.1'
24
- gem.add_development_dependency 'vcr', '~> 2.9.0'
25
- gem.add_development_dependency 'webmock', '~> 1.21.0'
26
- gem.add_development_dependency 'rspec', '~> 3.3.0'
27
- gem.add_development_dependency 'rake', '~> 10.4.2'
28
- end
@@ -1,379 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://<SAUCE_USERNAME>:<SAUCE_ACCESS_KEY>@saucelabs.com/rest/v1/users/<SAUCE_USERNAME>
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - '*/*; q=0.5, application/xml'
12
- Accept-Encoding:
13
- - gzip, deflate
14
- User-Agent:
15
- - Ruby
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Server:
22
- - nginx/0.7.62
23
- Date:
24
- - Mon, 17 Jun 2013 12:23:32 GMT
25
- Content-Type:
26
- - application/json
27
- Connection:
28
- - keep-alive
29
- Pragma:
30
- - no-cache
31
- Cache-Control:
32
- - no-cache
33
- X-Frame-Options:
34
- - DENY
35
- Set-Cookie:
36
- - csrf_token=80e9120e6d754f5d8df8772d5aadd0a8; expires="Mon, 17-Jun-2013 12:40:47
37
- GMT"; Max-Age=600; Path=/
38
- - metrics=a5621049f443f276d44c2d73fbbba83bef904ae8455aede851a14edfb2450fb7e3255e49;
39
- Path=/
40
- Content-Length:
41
- - '143'
42
- body:
43
- encoding: US-ASCII
44
- string: '{"access_key": "<SAUCE_ACCESS_KEY>", "minutes": "infinite", "id": "<SAUCE_USERNAME>",
45
- "subscribed": true, "can_run_manual": true}'
46
- http_version:
47
- recorded_at: Mon, 17 Jun 2013 12:30:46 GMT
48
- - request:
49
- method: get
50
- uri: https://<SAUCE_USERNAME>:<SAUCE_ACCESS_KEY>@saucelabs.com/rest/v1/<SAUCE_USERNAME>/limits
51
- body:
52
- encoding: US-ASCII
53
- string: ''
54
- headers:
55
- Accept:
56
- - '*/*; q=0.5, application/xml'
57
- Accept-Encoding:
58
- - gzip, deflate
59
- User-Agent:
60
- - Ruby
61
- response:
62
- status:
63
- code: 200
64
- message: OK
65
- headers:
66
- Server:
67
- - nginx/0.7.62
68
- Date:
69
- - Mon, 17 Jun 2013 12:23:33 GMT
70
- Content-Type:
71
- - application/json
72
- Connection:
73
- - keep-alive
74
- Pragma:
75
- - no-cache
76
- Cache-Control:
77
- - no-cache
78
- X-Frame-Options:
79
- - DENY
80
- Set-Cookie:
81
- - csrf_token=d38cdde67f2a155f7083ebe872c582bd; expires="Mon, 17-Jun-2013 12:40:48
82
- GMT"; Max-Age=600; Path=/
83
- - metrics=897a82824950620d8e70dbda2cb339666f9a60cba2d2ef02beab418680a125d3df05bb41;
84
- Path=/
85
- Content-Length:
86
- - '76'
87
- body:
88
- encoding: US-ASCII
89
- string: '{"mac_concurrency": 5, "concurrency": 20}'
90
- http_version:
91
- recorded_at: Mon, 17 Jun 2013 12:30:47 GMT
92
- - request:
93
- method: post
94
- uri: https://<SAUCE_USERNAME>:<SAUCE_ACCESS_KEY>@saucelabs.com/rest/v1/users/<SAUCE_USERNAME>
95
- body:
96
- encoding: UTF-8
97
- string: '{"username":"newsub77","password":"davesdisease","name":"Manny","email":"Manny@blackbooks.co.uk"}'
98
- headers:
99
- Accept:
100
- - '*/*; q=0.5, application/xml'
101
- Accept-Encoding:
102
- - gzip, deflate
103
- Content-Length:
104
- - '97'
105
- User-Agent:
106
- - Ruby
107
- response:
108
- status:
109
- code: 201
110
- message: Created
111
- headers:
112
- Server:
113
- - nginx/0.7.62
114
- Date:
115
- - Wed, 28 Aug 2013 20:55:46 GMT
116
- Content-Type:
117
- - application/json
118
- Location:
119
- - https://saucelabs.com/rest/v1/users/newsub77
120
- Connection:
121
- - keep-alive
122
- Pragma:
123
- - no-cache
124
- Cache-Control:
125
- - no-cache
126
- X-Frame-Options:
127
- - DENY
128
- Set-Cookie:
129
- - csrf_token=eab7d96896e5296aee29b037fb5469d9; expires="Wed, 28-Aug-2013 21:14:44
130
- GMT"; Max-Age=600; Path=/
131
- - metrics=885a220fc548623dd57098d7d59489760cec3b2beaf8245688754773b074267ebb2e8c8e;
132
- Path=/
133
- Content-Length:
134
- - '148'
135
- body:
136
- encoding: US-ASCII
137
- string: '{"access_key": "699d9039-baab-49a8-8830-63d43d9d45ac", "name": null,
138
- "subscribed": false, "can_run_manual": true, "minutes": 1122, "id": "newsub77"}'
139
- http_version:
140
- recorded_at: Wed, 28 Aug 2013 21:04:45 GMT
141
- - request:
142
- method: post
143
- uri: https://<SAUCE_USERNAME>:<SAUCE_ACCESS_KEY>@saucelabs.com/rest/v1/users/<SAUCE_USERNAME>
144
- body:
145
- encoding: UTF-8
146
- string: '{"username":"duplicate","password":"davesdisease","name":"Manny","email":"Manny@blackbooks.co.uk"}'
147
- headers:
148
- Accept:
149
- - '*/*; q=0.5, application/xml'
150
- Accept-Encoding:
151
- - gzip, deflate
152
- Content-Length:
153
- - '98'
154
- User-Agent:
155
- - Ruby
156
- response:
157
- status:
158
- code: 400
159
- message: Bad request
160
- headers:
161
- Server:
162
- - nginx/0.7.62
163
- Date:
164
- - Thu, 29 Aug 2013 01:14:07 GMT
165
- Content-Type:
166
- - application/json
167
- Connection:
168
- - keep-alive
169
- Pragma:
170
- - no-cache
171
- Cache-Control:
172
- - no-cache
173
- X-Frame-Options:
174
- - DENY
175
- Set-Cookie:
176
- - csrf_token=750f4cdca985d7f7f9fcbbd0bfc58fc3; expires="Thu, 29-Aug-2013 01:33:06
177
- GMT"; Max-Age=600; Path=/
178
- - metrics=4e602fa8932a373223341b7af992f9b7fa7563dff2c7d1d2eef24680a9be7e752de3233b;
179
- Path=/
180
- - metrics=a6431e82448e473a873bf07761f858e431227be3f26941e865a24ac88318aed9f4b32dc4;
181
- Path=/
182
- Content-Length:
183
- - '52'
184
- body:
185
- encoding: US-ASCII
186
- string: '{"errors": "User already exists with that username"}'
187
- http_version:
188
- recorded_at: Thu, 29 Aug 2013 01:23:06 GMT
189
- - request:
190
- method: post
191
- uri: https://<SAUCE_USERNAME>:<SAUCE_ACCESS_KEY>@saucelabs.com/rest/v1/users/<SAUCE_USERNAME>
192
- body:
193
- encoding: UTF-8
194
- string: '{"username":"toomany","password":"davesdisease","name":"Manny","email":"Manny@blackbooks.co.uk"}'
195
- headers:
196
- Accept:
197
- - '*/*; q=0.5, application/xml'
198
- Accept-Encoding:
199
- - gzip, deflate
200
- Content-Length:
201
- - '96'
202
- User-Agent:
203
- - Ruby
204
- response:
205
- status:
206
- code: 400
207
- message: Bad request
208
- headers:
209
- Server:
210
- - nginx/0.7.62
211
- Date:
212
- - Thu, 29 Aug 2013 01:14:07 GMT
213
- Content-Type:
214
- - application/json
215
- Connection:
216
- - keep-alive
217
- Pragma:
218
- - no-cache
219
- Cache-Control:
220
- - no-cache
221
- X-Frame-Options:
222
- - DENY
223
- Set-Cookie:
224
- - csrf_token=750f4cdca985d7f7f9fcbbd0bfc58fc3; expires="Thu, 29-Aug-2013 01:33:06
225
- GMT"; Max-Age=600; Path=/
226
- - metrics=4e602fa8932a373223341b7af992f9b7fa7563dff2c7d1d2eef24680a9be7e752de3233b;
227
- Path=/
228
- - metrics=a6431e82448e473a873bf07761f858e431227be3f26941e865a24ac88318aed9f4b32dc4;
229
- Path=/
230
- Content-Length:
231
- - '44'
232
- body:
233
- encoding: US-ASCII
234
- string: '{"errors": "Subaccount capacity exhausted."}'
235
- http_version:
236
- recorded_at: Thu, 29 Aug 2013 01:24:25 GMT
237
- - request:
238
- method: post
239
- uri: https://<SAUCE_USERNAME>:<SAUCE_ACCESS_KEY>@saucelabs.com/rest/v1/users/<SAUCE_USERNAME>
240
- body:
241
- encoding: UTF-8
242
- string: '{"username":"deeptree","password":"davesdisease","name":"Manny","email":"Manny@blackbooks.co.uk"}'
243
- headers:
244
- Accept:
245
- - '*/*; q=0.5, application/xml'
246
- Accept-Encoding:
247
- - gzip, deflate
248
- Content-Length:
249
- - '96'
250
- User-Agent:
251
- - Ruby
252
- response:
253
- status:
254
- code: 400
255
- message: Bad request
256
- headers:
257
- Server:
258
- - nginx/0.7.62
259
- Date:
260
- - Thu, 29 Aug 2013 01:14:07 GMT
261
- Content-Type:
262
- - application/json
263
- Connection:
264
- - keep-alive
265
- Pragma:
266
- - no-cache
267
- Cache-Control:
268
- - no-cache
269
- X-Frame-Options:
270
- - DENY
271
- Set-Cookie:
272
- - csrf_token=750f4cdca985d7f7f9fcbbd0bfc58fc3; expires="Thu, 29-Aug-2013 01:33:06
273
- GMT"; Max-Age=600; Path=/
274
- - metrics=4e602fa8932a373223341b7af992f9b7fa7563dff2c7d1d2eef24680a9be7e752de3233b;
275
- Path=/
276
- - metrics=a6431e82448e473a873bf07761f858e431227be3f26941e865a24ac88318aed9f4b32dc4;
277
- Path=/
278
- Content-Length:
279
- - '53'
280
- body:
281
- encoding: US-ASCII
282
- string: '{"errors": "Subaccount tree depth is limited to 10."}'
283
- http_version:
284
- recorded_at: Thu, 29 Aug 2013 01:24:25 GMT
285
- - request:
286
- method: post
287
- uri: https://<SAUCE_USERNAME>:<SAUCE_ACCESS_KEY>@saucelabs.com/rest/v1/users/nopenotaperson
288
- body:
289
- encoding: UTF-8
290
- string: '{"username":"deeptree","password":"davesdisease","name":"Manny","email":"Manny@blackbooks.co.uk"}'
291
- headers:
292
- Accept:
293
- - '*/*; q=0.5, application/xml'
294
- Accept-Encoding:
295
- - gzip, deflate
296
- Content-Length:
297
- - '97'
298
- User-Agent:
299
- - Ruby
300
- response:
301
- status:
302
- code: 404
303
- message: Not Found
304
- headers:
305
- Server:
306
- - nginx/0.7.62
307
- Date:
308
- - Fri, 30 Aug 2013 01:42:07 GMT
309
- Content-Type:
310
- - application/json
311
- Connection:
312
- - keep-alive
313
- Pragma:
314
- - no-cache
315
- Cache-Control:
316
- - no-cache
317
- X-Frame-Options:
318
- - DENY
319
- Set-Cookie:
320
- - csrf_token=61a20e3c835c0c8d755d559f06fef7af; expires="Fri, 30-Aug-2013 02:01:08
321
- GMT"; Max-Age=600; Path=/
322
- - metrics=64e2fb23b34c01d956f2c94b397ad0e8f8da99061432ad554e2147b8abc39f4c0b59ab84;
323
- Path=/
324
- - metrics=eff66bcc694eb3de5e91eccbd2915a58ad3553ba428c68734d9a4390aa98899f3f6127e4;
325
- Path=/
326
- Content-Length:
327
- - '45'
328
- body:
329
- encoding: US-ASCII
330
- string: '{"error": "That resource could not be found"}'
331
- http_version:
332
- recorded_at: Fri, 30 Aug 2013 01:51:08 GMT
333
- - request:
334
- method: get
335
- uri: https://<SAUCE_USERNAME>:<SAUCE_ACCESS_KEY>@saucelabs.com/rest/v1/users/IDontExist
336
- body:
337
- encoding: US-ASCII
338
- string: ''
339
- headers:
340
- Accept:
341
- - '*/*; q=0.5, application/xml'
342
- Accept-Encoding:
343
- - gzip, deflate
344
- User-Agent:
345
- - Ruby
346
- response:
347
- status:
348
- code: 404
349
- message: Not Found
350
- headers:
351
- Server:
352
- - nginx/0.7.62
353
- Date:
354
- - Fri, 30 Aug 2013 18:50:29 GMT
355
- Content-Type:
356
- - application/json
357
- Connection:
358
- - keep-alive
359
- Pragma:
360
- - no-cache
361
- Cache-Control:
362
- - no-cache
363
- X-Frame-Options:
364
- - DENY
365
- Set-Cookie:
366
- - csrf_token=ab87b5190e3649606fa26185f3bbdcc3; expires="Fri, 30-Aug-2013 19:09:31
367
- GMT"; Max-Age=600; Path=/
368
- - metrics=83aa4f4693e8f686608e6ff1da43f9dee7720fc9176863ee18574df8b331f23801337a5b;
369
- Path=/
370
- - metrics=da0d871a67933f3e2a96ec2e9c41b4e1e2c817cc7ae6265e9b054fcbba5bf3c8f83720ad;
371
- Path=/
372
- Content-Length:
373
- - '45'
374
- body:
375
- encoding: US-ASCII
376
- string: '{"error": "That resource could not be found"}'
377
- http_version:
378
- recorded_at: Fri, 30 Aug 2013 18:59:31 GMT
379
- recorded_with: VCR 2.5.0