sauce_whisk 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/changelog.markdown +4 -0
- data/lib/sauce_whisk.rb +16 -6
- data/lib/sauce_whisk/tunnels.rb +1 -1
- data/lib/sauce_whisk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fb4b00be96653370bf21e1d136f6d2ba9641926
|
4
|
+
data.tar.gz: 87a3c56cd95c6bb0d33d59c8000fbec4ca7af7ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7864b9d150d668ac07483f72ff81ca697c171c59cf43442d33a6637f52c7b12ceb91a1ea3a74bd532bd1f4c154d0e9c44061157292377f5847ea05ead8400bf
|
7
|
+
data.tar.gz: 77434522787871d19fe29cded8144e809a7ca1d129e1cf89a0a40cc9166946f4815e9f50e30838ca2a2dac364d79c7bbf8ea4668851a8fbe20532413da48c066
|
data/changelog.markdown
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Major Version 0
|
2
2
|
## Minor Version 0.2
|
3
|
+
### 0.2.1
|
4
|
+
* Added US_EAST option for headless
|
5
|
+
* Changed preferred value from US_VDC to US_WEST. US_VDC wil continue to work.
|
6
|
+
* @juandelgado added tunnel_identifier to Tunnels endpoint, closing #59; Thanks!
|
3
7
|
### 0.2.0
|
4
8
|
* Added the ability to select between US & EU VDC
|
5
9
|
* Made US VDC the default endpoint
|
data/lib/sauce_whisk.rb
CHANGED
@@ -14,7 +14,16 @@ require 'logger'
|
|
14
14
|
module SauceWhisk
|
15
15
|
|
16
16
|
def self.base_url
|
17
|
-
data_center
|
17
|
+
case data_center
|
18
|
+
when :US_WEST
|
19
|
+
"https://saucelabs.com/rest/v1"
|
20
|
+
when :US_EAST
|
21
|
+
"https://us-east-1.saucelabs.com/rest/v1"
|
22
|
+
when :EU_VDC
|
23
|
+
"https://eu-central-1.saucelabs.com/rest/v1"
|
24
|
+
else
|
25
|
+
raise ::ArgumentError.new "No Data Center Selected (Which should not happen?)"
|
26
|
+
end
|
18
27
|
end
|
19
28
|
|
20
29
|
def self.username= username
|
@@ -72,7 +81,7 @@ module SauceWhisk
|
|
72
81
|
|
73
82
|
if configured_dc.nil?
|
74
83
|
logger.warn "[DEPRECATED] You have not selected a REST API Endpoint - using US by default. This behaviour is deprecated and will be removed in an upcoming version. Please select a data center as described here: https://github.com/saucelabs/sauce_whisk#data-center"
|
75
|
-
configured_dc = :
|
84
|
+
configured_dc = :US_WEST
|
76
85
|
end
|
77
86
|
|
78
87
|
validated_dc = validate_dc configured_dc
|
@@ -84,13 +93,14 @@ module SauceWhisk
|
|
84
93
|
end
|
85
94
|
|
86
95
|
def self.validate_dc dc
|
87
|
-
dc = :eu_vdc if dc == :
|
88
|
-
dc = :
|
96
|
+
dc = :eu_vdc if dc.to_s.upcase.to_sym == :EU
|
97
|
+
dc = :us_west if dc.to_s.upcase.to_sym == :US
|
98
|
+
dc = :us_west if dc.to_s.upcase.to_sym == :US_VDC
|
89
99
|
|
90
100
|
ucdc = dc.to_s.upcase.to_sym
|
91
101
|
|
92
|
-
if ![:EU_VDC, :
|
93
|
-
raise ::ArgumentError.new("Invalid data center requested: #{ucdc}. Value values are :
|
102
|
+
if ![:EU_VDC, :US_EAST, :US_WEST].include? ucdc
|
103
|
+
raise ::ArgumentError.new("Invalid data center requested: #{ucdc}. Value values are :EU_VDC, :US_EAST and :US_WEST.")
|
94
104
|
end
|
95
105
|
|
96
106
|
@data_center = ucdc
|
data/lib/sauce_whisk/tunnels.rb
CHANGED
@@ -49,7 +49,7 @@ module SauceWhisk
|
|
49
49
|
end
|
50
50
|
|
51
51
|
class Tunnel
|
52
|
-
attr_reader :id, :owner, :status, :host, :creation_time, :ssh_port
|
52
|
+
attr_reader :id, :owner, :status, :host, :creation_time, :ssh_port, :tunnel_identifier
|
53
53
|
|
54
54
|
def initialize(params)
|
55
55
|
params.each do |param, val|
|
data/lib/sauce_whisk/version.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Lacey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|