sauce_whisk 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/changelog.markdown +4 -0
- data/lib/sauce_whisk.rb +15 -1
- data/lib/sauce_whisk/rest_request_builder.rb +1 -1
- data/lib/sauce_whisk/version.rb +1 -1
- data/sauce_whisk.gemspec +4 -4
- data/spec/lib/sauce_whisk/jobs_spec.rb +4 -4
- data/spec/lib/sauce_whisk/rest_request_builder_spec.rb +0 -5
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 580cc7466c29d1ed8d8504c6afb3cb80354884c8
|
4
|
+
data.tar.gz: 043b5e0f5b53be3599349913b0d8926e0abc95aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54942e8ed65c2c4a7e1f82848ba1cb06c080c20e2427b9b78019acc833cfabb700a2a81df1ce3d54b6956aef46c4c52d9cb97e045b800e3b9467d195f4a838ef
|
7
|
+
data.tar.gz: 4c2dc81b0a7a7281bb926006f43e9ecb7d4fb0ab7d652d78da16e7f4b2fd48e41b1b9c2d838015e89270bb63080af0ecb5a1cdc9f13f103bd2c1bddc64431f51
|
data/README.md
CHANGED
@@ -36,11 +36,12 @@ You'll need a [Sauce Labs account](http://wwww.saucelabs.com/signup). They're f
|
|
36
36
|
|
37
37
|
|
38
38
|
### Locations
|
39
|
-
There are
|
39
|
+
There are four ways to configure SauceWhisk. The gem tries each of the following locations in turn. Note, Environment Variables are the preferred means of setting configuration.
|
40
40
|
|
41
41
|
#### Directly on the SauceWhisk object
|
42
|
-
`asset_fetch_retries` and `rest_retries` can be set directly on the SauceWhisk object:
|
42
|
+
`username`, `access_key`, `asset_fetch_retries` and `rest_retries` can be set directly on the SauceWhisk object:
|
43
43
|
```ruby
|
44
|
+
SauceWhisk.username = 'some_rad_tester'
|
44
45
|
SauceWhisk.asset_fetch_retries = 5
|
45
46
|
```
|
46
47
|
|
data/changelog.markdown
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
# Major Version 0
|
2
|
+
### 0.0.19
|
3
|
+
* You can now configure SauceWhisk.username and SauceWhisk.access_key. These values override all other configuration settings
|
4
|
+
* Removed Content-Type header from PUT commands as per documentation
|
5
|
+
|
2
6
|
### 0.0.18
|
3
7
|
* @tommeier is a champion and bumped rest_client to 1.8.0 to avoid a security flaw (Fixes #42).
|
4
8
|
|
data/lib/sauce_whisk.rb
CHANGED
@@ -17,6 +17,14 @@ module SauceWhisk
|
|
17
17
|
"https://saucelabs.com/rest/v1"
|
18
18
|
end
|
19
19
|
|
20
|
+
def self.username= username
|
21
|
+
@username = username
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.access_key= access_key
|
25
|
+
@access_key = access_key
|
26
|
+
end
|
27
|
+
|
20
28
|
def self.username
|
21
29
|
return self.load_first_found(:username)
|
22
30
|
end
|
@@ -98,8 +106,14 @@ module SauceWhisk
|
|
98
106
|
end
|
99
107
|
|
100
108
|
def self.load_first_found(key)
|
101
|
-
value =
|
109
|
+
value = self.instance_variable_get "@#{key}".to_sym
|
110
|
+
|
111
|
+
unless value
|
112
|
+
value = ::Sauce::Config.new[key] if defined? ::Sauce
|
113
|
+
end
|
114
|
+
|
102
115
|
value = self.from_yml(key) unless value
|
116
|
+
|
103
117
|
unless value
|
104
118
|
env_key = "SAUCE_#{key.to_s.upcase}"
|
105
119
|
value = ENV[env_key]
|
data/lib/sauce_whisk/version.rb
CHANGED
data/sauce_whisk.gemspec
CHANGED
@@ -19,10 +19,10 @@ Gem::Specification.new do |gem|
|
|
19
19
|
|
20
20
|
gem.license = 'MIT'
|
21
21
|
|
22
|
-
gem.add_runtime_dependency 'rest-client', '~> 1.
|
22
|
+
gem.add_runtime_dependency 'rest-client', '~> 1.8.0'
|
23
23
|
gem.add_runtime_dependency 'json', '~> 1.8.1'
|
24
24
|
gem.add_development_dependency 'vcr', '~> 2.9.0'
|
25
|
-
gem.add_development_dependency 'webmock', '~> 1.
|
26
|
-
gem.add_development_dependency 'rspec', '~> 3.
|
27
|
-
gem.add_development_dependency 'rake', '~> 10.
|
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
28
|
end
|
@@ -24,7 +24,7 @@ describe SauceWhisk::Jobs do
|
|
24
24
|
it "passes a test status to the REST api" do
|
25
25
|
job_id = "bd9c43dd6b5549f1b942d1d581d98cac"
|
26
26
|
SauceWhisk::Jobs.change_status job_id, true
|
27
|
-
assert_requested :put, "https://#{auth}@saucelabs.com/rest/v1/#{user}/jobs/#{job_id}", :body => pass_string
|
27
|
+
assert_requested :put, "https://#{auth}@saucelabs.com/rest/v1/#{user}/jobs/#{job_id}", :body => pass_string
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -51,7 +51,7 @@ describe SauceWhisk::Jobs do
|
|
51
51
|
job_id = "bd9c43dd6b5549f1b942d1d581d98cac"
|
52
52
|
job = SauceWhisk::Job.new({:id => job_id})
|
53
53
|
SauceWhisk::Jobs.save (job)
|
54
|
-
assert_requested :put, "https://#{auth}@saucelabs.com/rest/v1/#{user}/jobs/#{job.id}", :body => anything
|
54
|
+
assert_requested :put, "https://#{auth}@saucelabs.com/rest/v1/#{user}/jobs/#{job.id}", :body => anything
|
55
55
|
end
|
56
56
|
|
57
57
|
it "only sends updated information" do
|
@@ -60,7 +60,7 @@ describe SauceWhisk::Jobs do
|
|
60
60
|
job.name = "Updated Name"
|
61
61
|
SauceWhisk::Jobs.save (job)
|
62
62
|
expected_body = {:name => "Updated Name"}.to_json
|
63
|
-
assert_requested :put, "https://#{auth}@saucelabs.com/rest/v1/#{user}/jobs/#{job.id}", :body => expected_body
|
63
|
+
assert_requested :put, "https://#{auth}@saucelabs.com/rest/v1/#{user}/jobs/#{job.id}", :body => expected_body
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
@@ -116,7 +116,7 @@ describe SauceWhisk::Jobs do
|
|
116
116
|
describe "##stop", :vcr => {:cassette_name => "jobs"} do
|
117
117
|
it "calls the API correctly" do
|
118
118
|
SauceWhisk::Jobs.stop "3edc8fe6d52645bf931b1003da65af1f"
|
119
|
-
assert_requested :put, "https://#{auth}@saucelabs.com/rest/v1/#{user}/jobs/3edc8fe6d52645bf931b1003da65af1f/stop"
|
119
|
+
assert_requested :put, "https://#{auth}@saucelabs.com/rest/v1/#{user}/jobs/3edc8fe6d52645bf931b1003da65af1f/stop"
|
120
120
|
end
|
121
121
|
|
122
122
|
it "does something interesting when the job is already stopped" do
|
@@ -144,11 +144,6 @@ end
|
|
144
144
|
dummy_client.put "something", "another_thing"
|
145
145
|
end
|
146
146
|
|
147
|
-
it "includes the right content_type" do
|
148
|
-
expect( RestClient::Request ).to receive(:execute).with(hash_including({:content_type => "application/json"}))
|
149
|
-
dummy_client.put "something", "another_thing"
|
150
|
-
end
|
151
|
-
|
152
147
|
it "includes the right method" do
|
153
148
|
expect( RestClient::Request ).to receive(:execute).with(hash_including({:method => :put}))
|
154
149
|
dummy_client.put "something", "another_thing"
|
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
|
+
version: 0.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Lacey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.8.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 1.8.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,42 +58,42 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.21.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.21.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 3.
|
75
|
+
version: 3.3.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 3.
|
82
|
+
version: 3.3.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 10.
|
89
|
+
version: 10.4.2
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 10.
|
96
|
+
version: 10.4.2
|
97
97
|
description: A Wrapper for the Sauce Labs REST API.
|
98
98
|
email:
|
99
99
|
- github@dylanlacey.com
|