sauce_whisk 0.0.4 → 0.0.5

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
- NDgyMTEzNDI3YWYzZTg2ZDBlODEwYWEwNjE3ODBjMTgzMDNlZmUzMQ==
4
+ YjUxZmUwNTM1MjkxMmM2OWYxZjViZDhlYjVhMjAwNTQzZWYzNWQzOQ==
5
5
  data.tar.gz: !binary |-
6
- MzM0YWI4OGNjMGU4YTJkZGMzMTE2ZWE0YWRmYzVmZmQ4ODk2ODMxOQ==
6
+ YzFjZTE5OTZjZTE4YWNkNzc0NjBiMWZiNTA0MjM5Yjc4YzM5YTUwMQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NzM4YjkzNDMzMTM1OGFiZTFhZDk3YmM3ZjdiZGUxNGVkMDE1NzdhODhhNGYx
10
- NzlkMDI2MTBhMjEwZGU2NzAwYTk1OGI4NDhiOWRlYWViMTMyNDMwOGJjOTJh
11
- M2ZlZDM5YWM1ZWZiZjczZTNjOTA2MjQwZjY0ZDdiOTY1NTU1Mjc=
9
+ NDczNThiNDI5NmJlM2IzNzg4MzIxMDMyYWRlM2FlMmMyZjVlMTQ4MjRjMDRl
10
+ NDU1YWEyMjk3ZDhmNDJiNDZhM2ZkY2E0NDBlZjBjNTcwOTVjYTkxNGNiNjA4
11
+ ZGVmMGRlNTAzZGUxNzQ2YjJkMzdlNTE3MDgyZjI0Zjc4YjJmZmE=
12
12
  data.tar.gz: !binary |-
13
- MmUyMWU5MjE1YWJiOWJkN2Y0YTlhY2Y0YjdlMjU1YjRkZTczNDM4OGZlYTk0
14
- MTliNWI2M2EyMGM1NGYyOGQ4Y2VlOWUxM2FjMzU4YWI0MDBhM2VlZmRhNjNl
15
- Y2I3ZDA2YjM0YzFmYzJlMTgzOTg1NDU3MWY0M2I1YzNjNGM2MDI=
13
+ ODQ4OGJiNzdiZGQ5MmY2ZjI5MTI2YTEwYzhmNTdhOTg1YTZkMWEwM2JiMmUz
14
+ OTdmOGUxMTE4ZWJkZGYzZDk3OTg2ZjFlYzNmYTFmNjU5ZDMzNGQ1ZGU0NGU1
15
+ NzkyNjNlZDg2NDQ3OTY3YWNjNDc3ZDVkZGE1NDhhYzRhMGQ0NzE=
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- #group :test do
4
- # gem 'psych', "2.0.0", :path => "./vendor/psych"
5
- #end
3
+ group :test do
4
+ # gem 'psych', "2.0.0", :path => "./vendor/psych"
5
+ end
6
6
 
7
7
  gemspec
data/changelog.markdown CHANGED
@@ -1,3 +1,6 @@
1
1
  # Major Version 0
2
+ ### 0.0.5
3
+ * Added Sauce class
4
+
2
5
  ### 0.0.4
3
6
  * Added configuration loading from the Sauce gem, if present
@@ -0,0 +1,37 @@
1
+ require "json"
2
+
3
+ module SauceWhisk
4
+ class Sauce
5
+ extend RestRequestBuilder
6
+
7
+ def self.auth_details
8
+ {}
9
+ end
10
+
11
+ def self.resource
12
+ "info"
13
+ end
14
+
15
+ def self.service_status
16
+ JSON.parse((get "status"), :symbolize_names => true)
17
+ rescue
18
+
19
+ end
20
+
21
+ def self.platforms (force = false)
22
+ unless force
23
+ @platforms ||= JSON.parse(get "browsers/webdriver")
24
+ else
25
+ @platforms = JSON.parse(get "browsers/webdriver")
26
+ end
27
+ end
28
+
29
+ def self.total_job_count
30
+ Integer(get "counter")
31
+ end
32
+
33
+ def self.operational?
34
+ service_status[:service_operational]
35
+ end
36
+ end
37
+ end
@@ -31,7 +31,7 @@ module SauceWhisk
31
31
  end
32
32
 
33
33
  def fully_qualified_resource
34
- "#{SauceWhisk.base_url}/#{resource}"
34
+ return (respond_to? :resource) ? "#{SauceWhisk.base_url}/#{resource}" : SauceWhisk.base_url
35
35
  end
36
36
  end
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module SauceWhisk
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/sauce_whisk.rb CHANGED
@@ -2,8 +2,10 @@ require "sauce_whisk/version"
2
2
  require "sauce_whisk/jobs"
3
3
  require "sauce_whisk/assets"
4
4
  require "sauce_whisk/tunnels"
5
+ require "sauce_whisk/info"
5
6
  require "sauce_whisk/rest_request_builder"
6
7
 
8
+
7
9
  module SauceWhisk
8
10
 
9
11
  def self.base_url
@@ -11,7 +13,7 @@ module SauceWhisk
11
13
  end
12
14
 
13
15
  def self.username
14
- if defined? Sauce
16
+ if defined? ::Sauce
15
17
  return Sauce.get_config.username
16
18
  else
17
19
  return ENV["SAUCE_USERNAME"]
@@ -19,7 +21,7 @@ module SauceWhisk
19
21
  end
20
22
 
21
23
  def self.password
22
- if defined? Sauce
24
+ if defined? ::Sauce
23
25
  return Sauce.get_config.password
24
26
  else
25
27
  return ENV["SAUCE_ACCESS_KEY"]
@@ -0,0 +1,248 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://saucelabs.com/rest/v1/info/status
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
+ - Thu, 13 Jun 2013 06:59:27 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Connection:
28
+ - keep-alive
29
+ Pragma:
30
+ - no-cache
31
+ Cache-Control:
32
+ - no-cache
33
+ Access-Control-Allow-Origin:
34
+ - http://status.saucelabs.com
35
+ X-Frame-Options:
36
+ - DENY
37
+ Set-Cookie:
38
+ - csrf_token=690a48f3be8c52adab676888eb1b85ce; expires="Thu, 13-Jun-2013 07:16:35
39
+ GMT"; Max-Age=600; Path=/
40
+ - metrics=f10f2e1bd441f99158046f4bc06cddf3ed1ddbe2dbade3b3ee6e488f89b5c7a8373852fb;
41
+ Path=/
42
+ Content-Length:
43
+ - '119'
44
+ body:
45
+ encoding: US-ASCII
46
+ string: '{"wait_time": 0.4453551912568306, "service_operational": true, "status_message":
47
+ "Basic service status checks passed."}'
48
+ http_version:
49
+ recorded_at: Thu, 13 Jun 2013 07:06:35 GMT
50
+ - request:
51
+ method: get
52
+ uri: https://saucelabs.com/rest/v1/info/counter
53
+ body:
54
+ encoding: US-ASCII
55
+ string: ''
56
+ headers:
57
+ Accept:
58
+ - '*/*; q=0.5, application/xml'
59
+ Accept-Encoding:
60
+ - gzip, deflate
61
+ User-Agent:
62
+ - Ruby
63
+ response:
64
+ status:
65
+ code: 200
66
+ message: OK
67
+ headers:
68
+ Server:
69
+ - nginx/0.7.62
70
+ Date:
71
+ - Thu, 13 Jun 2013 06:59:28 GMT
72
+ Content-Type:
73
+ - application/json
74
+ Connection:
75
+ - keep-alive
76
+ Pragma:
77
+ - no-cache
78
+ Cache-Control:
79
+ - no-cache
80
+ X-Frame-Options:
81
+ - DENY
82
+ Set-Cookie:
83
+ - csrf_token=c80f955ef5ff301f505766ca5990c944; expires="Thu, 13-Jun-2013 07:16:37
84
+ GMT"; Max-Age=600; Path=/
85
+ - metrics=de58b9bbb3f6bd5ca2fecf20bd1dc637ee09e155ffd724380e7b4a379552c3efd9dcd80c;
86
+ Path=/
87
+ Content-Length:
88
+ - '8'
89
+ body:
90
+ encoding: US-ASCII
91
+ string: '46115584'
92
+ http_version:
93
+ recorded_at: Thu, 13 Jun 2013 07:06:36 GMT
94
+ - request:
95
+ method: get
96
+ uri: https://saucelabs.com/rest/v1/info/browsers/webdriver
97
+ body:
98
+ encoding: US-ASCII
99
+ string: ''
100
+ headers:
101
+ Accept:
102
+ - '*/*; q=0.5, application/xml'
103
+ Accept-Encoding:
104
+ - gzip, deflate
105
+ User-Agent:
106
+ - Ruby
107
+ response:
108
+ status:
109
+ code: 200
110
+ message: OK
111
+ headers:
112
+ Server:
113
+ - nginx/0.7.62
114
+ Date:
115
+ - Thu, 13 Jun 2013 06:59:29 GMT
116
+ Content-Type:
117
+ - application/json
118
+ Transfer-Encoding:
119
+ - chunked
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=97d520bfa8882f5ccf1e9a557b6d1132; expires="Thu, 13-Jun-2013 07:16:38
130
+ GMT"; Max-Age=600; Path=/
131
+ - metrics=819ca6f9442c18e1518266323e544b0b8b4ad258a608f3c6f9f24340908df18146ad4dcb;
132
+ Path=/
133
+ Content-Encoding:
134
+ - gzip
135
+ body:
136
+ encoding: ASCII-8BIT
137
+ string: !binary |-
138
+ H4sIAAAAAAAAA9WcS2+bQBSF/4rldYQYbB7urqraqlKqRuqii6qqiE0SVBss
139
+ bDepqv73Anlj7nCH3DOBTRZjYubT3OEczsV8/ztd59nlzyzeJNM3k2l6Fq+m
140
+ J5NpvE0fx7a3Y/WBv5Nil+ZZNT53Zk41vi2Si6QoktXTD/36Ww77fBPvy6Gf
141
+ 5/HyV5Ktqo+uk/NVkZbHVofku2roc7ycKNcJqpHdVV7sG+epx5f5Yf/8//+d
142
+ TF4wf99xrczfZ8/+Q1pOJb9pAlw8Dh+vgesomkIpOYw5EMO3h4FcjaDE8Oxg
143
+ BECM0N5qhECMyB5GBMRY6C5TkhALIER5UmuLoVwkiLK1HLffhcLwrGF4SIyZ
144
+ xbLiu5AeIBaFXCGVXFmUcoXUcmVRzBVSzZVFOVdIPVeRxRVBKrqyJukKqeme
145
+ RU33kJrulZp+HlgC4at6enaVZ0mTI93ejzYxhnk/bsYwvHvyr/FFXKRNgt3D
146
+ 6DGBcsKBMXzM88t1Mnl3VeSbo8VYPowe7YtaOeb+zFFKsyxyRGygT9k+KbJk
147
+ P3l/s13nxe0JnlXY/QHJkwOafNVlOFKlFVbB3NNcyBZGhN/SbJVf7yae60at
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Msz1ZTUXQpgbtFRO/2RHZnF9N3ZUSk6k61HWHwshPHwXC8Lc
165
+ 9Ap3UmiQMbVQNBUFZJANUmgGvm6bM8g2TWgGZC3JxiY0A3JbyzZKaIYIyCDb
166
+ IaEZkPGIkoxHNFrN17keDJIdEQ0D34n3YJBshbA9kzCDbA9EQzGi5oeGAqnV
167
+ wl0PDQVSrYXbHRoKpF4L9zk0FEjFFm5waCiQmi3a2dAwIDVb+KXBmns7pGp7
168
+ dlR7nE0Mmoei+fEfsOfe4odoAAA=
169
+ http_version:
170
+ recorded_at: Thu, 13 Jun 2013 07:06:38 GMT
171
+ - request:
172
+ method: get
173
+ uri: https://saucelabs.com/rest/v1/info/browsers/webdriver
174
+ body:
175
+ encoding: US-ASCII
176
+ string: ''
177
+ headers:
178
+ Accept:
179
+ - '*/*; q=0.5, application/xml'
180
+ Accept-Encoding:
181
+ - gzip, deflate
182
+ User-Agent:
183
+ - Ruby
184
+ response:
185
+ status:
186
+ code: 200
187
+ message: OK
188
+ headers:
189
+ Server:
190
+ - nginx/0.7.62
191
+ Date:
192
+ - Thu, 13 Jun 2013 06:59:31 GMT
193
+ Content-Type:
194
+ - application/json
195
+ Transfer-Encoding:
196
+ - chunked
197
+ Connection:
198
+ - keep-alive
199
+ Pragma:
200
+ - no-cache
201
+ Cache-Control:
202
+ - no-cache
203
+ X-Frame-Options:
204
+ - DENY
205
+ Set-Cookie:
206
+ - csrf_token=9b8b7868d34576a8f8f113f544c2af78; expires="Thu, 13-Jun-2013 07:16:39
207
+ GMT"; Max-Age=600; Path=/
208
+ - metrics=27cc295045be3d9b2b339dcbc3952bc0b065da4fb9d91435868b44fba87221d79249dd4d;
209
+ Path=/
210
+ Content-Encoding:
211
+ - gzip
212
+ body:
213
+ encoding: ASCII-8BIT
214
+ string: !binary |-
215
+ H4sIAAAAAAAAA9WcS2+bQBSF/4rldYQYbB7urqraqlKqRuqii6qqiE0SVBss
216
+ bDepqv73Anlj7nCH3DOBTRZjYubT3OEczsV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RIVkBEo
233
+ fJPcAwUUkBEo4wzICJhxBmQEDFLxcQEZAYPUfFxARsAgVR8XkBEwSOXHBWQE
234
+ DFL7UQEZgYLUflRA1o4y0oCMgOFr/6s+nNoJwr8iDzPoa6diQ8k8Ylab6EU5
235
+ G0cFfqTbU25PzjuDZtVNw0I0AmakIRpJw99afWhAIRpJg3Q7KE9NwCAtNcpR
236
+ EyjIGkOFaAQKssAwIRoBgrTSqBCNQEEaaVSIRqAgjTQsRHsN2QeFaBQK30j3
237
+ QMGEaBSKh0RBhWgUzChDNAoGqfiwEI2CQWo+LESjYJCqDwvRKBik8sNCNAoG
238
+ qf2gEI1CQWo/KEQjUMYZolEwfO0fZPhEYLGhZMKnCtEPZyWn5tUCUU/EF/+Q
239
+ Ru5lf45Z9d39iD1qnT9fQs3mr9k8svN3+FvHhCCwtgJ83Zd9PYUkg0kVmTIM
240
+ s5LMKIZYTabdmIpB82yvWTdGiGFAYqglYgOZP6fsi7mU0zQ73LROn/+A8tts
241
+ VeTp0VU2fhxuMsz1ZTUXQpgbtFRO/2RHZnF9N3ZUSk6k61HWHwshPHwXC8Lc
242
+ 9Ap3UmiQMbVQNBUFZJANUmgGvm6bM8g2TWgGZC3JxiY0A3JbyzZKaIYIyCDb
243
+ IaEZkPGIkoxHNFrN17keDJIdEQ0D34n3YJBshbA9kzCDbA9EQzGi5oeGAqnV
244
+ wl0PDQVSrYXbHRoKpF4L9zk0FEjFFm5waCiQmi3a2dAwIDVb+KXBmns7pGp7
245
+ dlR7nE0Mmoei+fEfsOfe4odoAAA=
246
+ http_version:
247
+ recorded_at: Thu, 13 Jun 2013 07:06:39 GMT
248
+ recorded_with: VCR 2.5.0
@@ -0,0 +1,66 @@
1
+ require "spec_helper"
2
+
3
+ describe "SauceWhisk::Sauce", :vcr => {:cassette_name => "info"} do
4
+ describe "#service_status"do
5
+ it "calls the correct URI" do
6
+ SauceWhisk::Sauce.service_status
7
+ assert_requested :get, "https://saucelabs.com/rest/v1/info/status"
8
+ end
9
+
10
+ it "returns a hash" do
11
+ SauceWhisk::Sauce.service_status.should be_a_kind_of Hash
12
+ end
13
+
14
+ it "symbolizes the keys" do
15
+ SauceWhisk::Sauce.service_status.each do |k,v|
16
+ k.should be_an_instance_of Symbol
17
+ end
18
+ end
19
+ end
20
+
21
+ describe "#test_count" do
22
+ it "calls the correct URI" do
23
+ SauceWhisk::Sauce.total_job_count
24
+ assert_requested :get, "https://saucelabs.com/rest/v1/info/counter"
25
+ end
26
+
27
+ it "returns an integer" do
28
+ SauceWhisk::Sauce.total_job_count.should be_a_kind_of Integer
29
+ end
30
+ end
31
+
32
+ describe "#platforms" do
33
+ it "calls the correct URI" do
34
+ SauceWhisk::Sauce.platforms
35
+ assert_requested :get, "https://saucelabs.com/rest/v1/info/browsers/webdriver"
36
+ end
37
+
38
+ it "only calls the api once" do
39
+ SauceWhisk::Sauce.instance_variable_set(:@platforms, nil)
40
+ SauceWhisk::Sauce.platforms
41
+ SauceWhisk::Sauce.platforms
42
+ assert_requested :get, "https://saucelabs.com/rest/v1/info/browsers/webdriver"
43
+ end
44
+
45
+ it "returns an array" do
46
+ platforms = SauceWhisk::Sauce.platforms
47
+ platforms.should be_a_kind_of Array
48
+ end
49
+
50
+ context "when called with true" do
51
+ it "calls the API each time" do
52
+ SauceWhisk::Sauce.instance_variable_set(:@platforms, nil)
53
+ SauceWhisk::Sauce.platforms
54
+ SauceWhisk::Sauce.platforms(true)
55
+
56
+ assert_requested :get, "https://saucelabs.com/rest/v1/info/browsers/webdriver", :times => 2
57
+ end
58
+ end
59
+ end
60
+
61
+ describe "operational?" do
62
+ it "returns true when the service is running" do
63
+ SauceWhisk::Sauce.operational?.should be_true
64
+ end
65
+ end
66
+ end
@@ -12,11 +12,31 @@ describe SauceWhisk::RestRequestBuilder do
12
12
  end
13
13
  }
14
14
 
15
+ let(:dummy_client_without_resource) {
16
+ Class.new do
17
+ extend SauceWhisk::RestRequestBuilder
18
+ end
19
+ }
20
+
15
21
  let (:mock_auth) {{
16
22
  :user => ENV["SAUCE_USERNAME"],
17
23
  :password => ENV["SAUCE_ACCESS_KEY"]
18
24
  }}
19
25
 
26
+ describe "#fully_qualified_resource" do
27
+ context "with a resource defined" do
28
+ it "should end with the resource" do
29
+ dummy_client.fully_qualified_resource.should eq "#{SauceWhisk.base_url}/#{dummy_client.resource}"
30
+ end
31
+ end
32
+
33
+ context "without a resource defined" do
34
+ it "should return the base url" do
35
+ dummy_client_without_resource.fully_qualified_resource.should eq SauceWhisk.base_url
36
+ end
37
+ end
38
+ end
39
+
20
40
  describe "#auth_details" do
21
41
  it "should return the env vars" do
22
42
  dummy_client.auth_details.should eq mock_auth
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.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Lacey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-12 00:00:00.000000000 Z
11
+ date: 2013-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -95,12 +95,14 @@ files:
95
95
  - changelog.markdown
96
96
  - lib/sauce_whisk.rb
97
97
  - lib/sauce_whisk/assets.rb
98
+ - lib/sauce_whisk/info.rb
98
99
  - lib/sauce_whisk/jobs.rb
99
100
  - lib/sauce_whisk/rest_request_builder.rb
100
101
  - lib/sauce_whisk/tunnels.rb
101
102
  - lib/sauce_whisk/version.rb
102
103
  - sauce_whisk.gemspec
103
104
  - spec/fixtures/vcr_cassettes/assets.yml
105
+ - spec/fixtures/vcr_cassettes/info.yml
104
106
  - spec/fixtures/vcr_cassettes/jobs.yml
105
107
  - spec/fixtures/vcr_cassettes/no_jobs.yml
106
108
  - spec/fixtures/vcr_cassettes/no_tunnels.yml
@@ -108,6 +110,7 @@ files:
108
110
  - spec/fixtures/vcr_cassettes/tunnels.yml
109
111
  - spec/lib/sauce_whisk/asset_spec.rb
110
112
  - spec/lib/sauce_whisk/assets_spec.rb
113
+ - spec/lib/sauce_whisk/info_spec.rb
111
114
  - spec/lib/sauce_whisk/job_spec.rb
112
115
  - spec/lib/sauce_whisk/jobs_spec.rb
113
116
  - spec/lib/sauce_whisk/rest_request_builder_spec.rb
@@ -188,6 +191,7 @@ summary: Sauce_Whisk lets you mix extra data into your Sauce test results! Fetch
188
191
  update Job details, screenshots, videos and logs.
189
192
  test_files:
190
193
  - spec/fixtures/vcr_cassettes/assets.yml
194
+ - spec/fixtures/vcr_cassettes/info.yml
191
195
  - spec/fixtures/vcr_cassettes/jobs.yml
192
196
  - spec/fixtures/vcr_cassettes/no_jobs.yml
193
197
  - spec/fixtures/vcr_cassettes/no_tunnels.yml
@@ -195,6 +199,7 @@ test_files:
195
199
  - spec/fixtures/vcr_cassettes/tunnels.yml
196
200
  - spec/lib/sauce_whisk/asset_spec.rb
197
201
  - spec/lib/sauce_whisk/assets_spec.rb
202
+ - spec/lib/sauce_whisk/info_spec.rb
198
203
  - spec/lib/sauce_whisk/job_spec.rb
199
204
  - spec/lib/sauce_whisk/jobs_spec.rb
200
205
  - spec/lib/sauce_whisk/rest_request_builder_spec.rb