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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e054d13b0187277b77496a400e4fc801cdbbfaa
4
- data.tar.gz: 86c3c3b0421604c47ded59dfd13f325541ce86b8
3
+ metadata.gz: 7fb4b00be96653370bf21e1d136f6d2ba9641926
4
+ data.tar.gz: 87a3c56cd95c6bb0d33d59c8000fbec4ca7af7ad
5
5
  SHA512:
6
- metadata.gz: d841ca7bf1c4ac3a7bb9f3e651bdd3295c3a7512a3374a34aa8eb3a5f18226071899dc802054a3783ca8e0057089b2bc52cb5e3e1bcae5f03370db2519f353e0
7
- data.tar.gz: 7b42821bb29b03c17dd8aa812a03c74f7305d665bb572697e3ce61481cb61d09d63ba9451f68879cb71c419982d4b062b2b537506d2774024b07843082173af1
6
+ metadata.gz: d7864b9d150d668ac07483f72ff81ca697c171c59cf43442d33a6637f52c7b12ceb91a1ea3a74bd532bd1f4c154d0e9c44061157292377f5847ea05ead8400bf
7
+ data.tar.gz: 77434522787871d19fe29cded8144e809a7ca1d129e1cf89a0a40cc9166946f4815e9f50e30838ca2a2dac364d79c7bbf8ea4668851a8fbe20532413da48c066
@@ -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
@@ -14,7 +14,16 @@ require 'logger'
14
14
  module SauceWhisk
15
15
 
16
16
  def self.base_url
17
- data_center == :US_VDC ? "https://saucelabs.com/rest/v1" : "https://eu-central-1.saucelabs.com/rest/v1"
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 = :US_VDC
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 == :eu
88
- dc = :us_vdc if dc == :us
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, :US_VDC].include? ucdc
93
- raise ::ArgumentError.new("Invalid data center requested: #{ucdc}. Value values are :eu_vdc and :us_vdc.")
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
@@ -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|
@@ -1,3 +1,3 @@
1
1
  module SauceWhisk
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
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.2.0
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-08 00:00:00.000000000 Z
11
+ date: 2019-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client