sauce_whisk 0.0.13 → 0.0.14
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 +4 -4
- data/.travis.yml +1 -0
- data/Gemfile +3 -2
- data/README.md +40 -5
- data/changelog.markdown +10 -0
- data/lib/sauce_whisk.rb +21 -2
- data/lib/sauce_whisk/assets.rb +25 -2
- data/lib/sauce_whisk/jobs.rb +35 -6
- data/lib/sauce_whisk/rest_request_builder.rb +19 -4
- data/lib/sauce_whisk/version.rb +1 -1
- data/sauce_whisk.gemspec +4 -4
- data/spec/fixtures/vcr_cassettes/assets.yml +205 -57
- data/spec/fixtures/vcr_cassettes/info.yml +131 -5
- data/spec/fixtures/vcr_cassettes/jobs.yml +130 -10
- data/spec/lib/sauce_whisk/account_spec.rb +8 -8
- data/spec/lib/sauce_whisk/accounts_spec.rb +8 -8
- data/spec/lib/sauce_whisk/asset_spec.rb +5 -5
- data/spec/lib/sauce_whisk/assets_spec.rb +18 -3
- data/spec/lib/sauce_whisk/info_spec.rb +5 -5
- data/spec/lib/sauce_whisk/job_spec.rb +32 -18
- data/spec/lib/sauce_whisk/jobs_spec.rb +46 -10
- data/spec/lib/sauce_whisk/rest_request_builder_spec.rb +41 -18
- data/spec/lib/sauce_whisk/sauce_whisk_spec.rb +25 -6
- data/spec/lib/sauce_whisk/subaccounts_spec.rb +2 -2
- data/spec/lib/sauce_whisk/tunnel_spec.rb +6 -6
- data/spec/lib/sauce_whisk/tunnels_spec.rb +9 -9
- metadata +10 -10
@@ -6,11 +6,11 @@ describe "a subaccount" do
|
|
6
6
|
|
7
7
|
it "is an Account object" do
|
8
8
|
sub = SauceWhisk::SubAccount.new(parent, params)
|
9
|
-
sub.
|
9
|
+
expect( sub ).to be_a_kind_of SauceWhisk::Account
|
10
10
|
end
|
11
11
|
|
12
12
|
it "takes a parent as a parameter" do
|
13
13
|
sub = SauceWhisk::SubAccount.new(parent, params)
|
14
|
-
sub.parent.
|
14
|
+
expect( sub.parent ).to be parent
|
15
15
|
end
|
16
16
|
end
|
@@ -12,18 +12,18 @@ describe SauceWhisk::Tunnel do
|
|
12
12
|
describe "#new" do
|
13
13
|
it "sets all parameters passed in" do
|
14
14
|
tunnel = SauceWhisk::Tunnel.new params
|
15
|
-
tunnel.id.
|
16
|
-
tunnel.owner.
|
17
|
-
tunnel.status.
|
18
|
-
tunnel.host.
|
19
|
-
tunnel.creation_time.
|
15
|
+
expect( tunnel.id ).to eq "tunnel_id"
|
16
|
+
expect( tunnel.owner ).to eq "test_user"
|
17
|
+
expect( tunnel.status ).to eq "open"
|
18
|
+
expect( tunnel.host ).to eq "yacko.wacko.dot"
|
19
|
+
expect( tunnel.creation_time ).to eq params[:creation_time]
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
describe "#stop" do
|
24
24
|
it "calls the Repository class" do
|
25
25
|
tunnel = SauceWhisk::Tunnel.new params
|
26
|
-
SauceWhisk::Tunnels.
|
26
|
+
expect( SauceWhisk::Tunnels ).to receive(:stop).with("tunnel_id")
|
27
27
|
|
28
28
|
tunnel.stop
|
29
29
|
end
|
@@ -12,22 +12,22 @@ describe SauceWhisk::Tunnels, :vcr => {:cassette_name => "tunnels"} do
|
|
12
12
|
|
13
13
|
it "returns nothing when no tunnels are found", :vcr => {:cassette_name => "no_tunnels", :exclusive => true} do
|
14
14
|
tunnels = SauceWhisk::Tunnels.all
|
15
|
-
tunnels.
|
15
|
+
expect( tunnels ).to eq []
|
16
16
|
end
|
17
17
|
|
18
18
|
context "called without the 'fetch' parameter" do
|
19
19
|
it "returns an array of Tunnels" do
|
20
20
|
tunnels = SauceWhisk::Tunnels.all
|
21
|
-
tunnels.
|
22
|
-
tunnels.each {|tunnel| tunnel.
|
21
|
+
expect( tunnels ).to be_an_instance_of Array
|
22
|
+
tunnels.each {|tunnel| expect( tunnel ).to be_an_instance_of SauceWhisk::Tunnel}
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
26
|
context "called with the fetch parameter set false" do
|
27
27
|
it "returns an array of strings" do
|
28
28
|
tunnels = SauceWhisk::Tunnels.all(:fetch_each => false)
|
29
|
-
tunnels.
|
30
|
-
tunnels.each {|tunnel| tunnel.
|
29
|
+
expect( tunnels ).to be_an_instance_of Array
|
30
|
+
tunnels.each {|tunnel| expect( tunnel ).to be_an_instance_of String }
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -41,7 +41,7 @@ describe SauceWhisk::Tunnels, :vcr => {:cassette_name => "tunnels"} do
|
|
41
41
|
|
42
42
|
it "returns instances of Tunnel" do
|
43
43
|
tunnel = SauceWhisk::Tunnels.fetch job_id
|
44
|
-
tunnel.
|
44
|
+
expect( tunnel ).to be_an_instance_of SauceWhisk::Tunnel
|
45
45
|
end
|
46
46
|
|
47
47
|
it "raises an exception with called without an id" do
|
@@ -66,11 +66,11 @@ describe SauceWhisk::Tunnels, :vcr => {:cassette_name => "tunnels"} do
|
|
66
66
|
|
67
67
|
it "returns an instance of tunnel" do
|
68
68
|
tunnel = SauceWhisk::Tunnels.open params
|
69
|
-
tunnel.
|
69
|
+
expect( tunnel ).to be_an_instance_of SauceWhisk::Tunnel
|
70
70
|
|
71
71
|
# These aren't magic, they're taken from the tunnels fixture. <3 VCR.
|
72
|
-
tunnel.id.
|
73
|
-
tunnel.ssh_port.
|
72
|
+
expect( tunnel.id ).to eq "4824d6b282e04d1184daff5401a52e1e"
|
73
|
+
expect( tunnel.ssh_port ).to eq 9123
|
74
74
|
end
|
75
75
|
|
76
76
|
context "When asked to wait until running", :vcr => {:cassette_name => 'tunnels_with_wait'} do
|
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.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Lacey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-15 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: 1.
|
19
|
+
version: 1.7.1
|
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: 1.
|
26
|
+
version: 1.7.1
|
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.18.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.18.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:
|
75
|
+
version: 3.0.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:
|
82
|
+
version: 3.0.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.3.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.3.2
|
97
97
|
description: A Wrapper for the Sauce Labs REST API.
|
98
98
|
email:
|
99
99
|
- github@dylanlacey.com
|