sauce 2.4.5 → 2.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/sauce/version.rb +1 -1
- data/lib/sauce.rb +14 -0
- data/spec/integration/connect_integration_spec.rb +17 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWEzMDRmOGQzNWM5MDNmOTVlYjk0ODdhNzVmYTFlODA2NzZhN2E2MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDE3YmM3M2Q3YmY1Nzk2ZjNiY2FjM2M3NGQ0ZmI1ZmE1NDhjNDYzZA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzQ4NzM3OWZiZmUwMWE2NDQwMTk4OTU1ODQ0ZGNlY2JjNmNjYzU4YTkyYjNm
|
10
|
+
MDM2NDVkZGIwM2ZkMjM0ZTU5YjI1NmFiNDRmMjNhZDZkNzgzMDc0MjcxMTVi
|
11
|
+
MGViNDk5ZGIxN2FlNmMxODkyZjliZTk4OTJjZmQxMDJjMTRhNTI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTBkY2NiZGNlOTNiOTdkMDU5NTdmYzJlZDFlOTE5ODE4YzE0YjMwMWFkNjZi
|
14
|
+
ZGJlYjBiM2VkN2JjYTU2NDczODFmMzk0MmZjM2Y0ZjBhY2I0YjA2ODk0Njg1
|
15
|
+
ZjYwYjNmMTM2ZTA3YzVjMzk1YzVhMjE5Zjg2Y2E3NDlmODc5NWE=
|
data/lib/sauce/version.rb
CHANGED
data/lib/sauce.rb
CHANGED
@@ -5,3 +5,17 @@ require 'sauce/client'
|
|
5
5
|
require 'sauce/config'
|
6
6
|
require 'sauce/selenium'
|
7
7
|
require 'sauce/integrations'
|
8
|
+
|
9
|
+
# Ruby before 1.9.3-p382 does not handle exit codes correctly when nested
|
10
|
+
if RUBY_VERSION == "1.9.3" && RUBY_PATCHLEVEL < 392
|
11
|
+
module Kernel
|
12
|
+
alias :existing_at_exit :at_exit
|
13
|
+
def at_exit(&block)
|
14
|
+
existing_at_exit do
|
15
|
+
exit_status = $!.status if $!.is_a?(SystemExit)
|
16
|
+
block.call
|
17
|
+
exit exit_status if exit_status
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -6,6 +6,16 @@ describe 'Sauce::Connect integration testing' do
|
|
6
6
|
Sauce::Connect.new({})
|
7
7
|
end
|
8
8
|
|
9
|
+
def backup_and_wipe_env_var(var)
|
10
|
+
self.instance_variable_set("@env_#{var}", ENV[var])
|
11
|
+
ENV[var] = nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def restore_env_var(var)
|
15
|
+
value_of_variable = self.instance_variable_get("@env_#{var}")
|
16
|
+
ENV[var] = value_of_variable unless value_of_variable.nil?
|
17
|
+
end
|
18
|
+
|
9
19
|
before :each do
|
10
20
|
Sauce.clear_config
|
11
21
|
end
|
@@ -41,8 +51,9 @@ describe 'Sauce::Connect integration testing' do
|
|
41
51
|
end
|
42
52
|
end
|
43
53
|
|
44
|
-
it 'should fail if the SAUCE_USERNAME is
|
54
|
+
it 'should fail if the SAUCE_USERNAME is empty' do
|
45
55
|
expect {
|
56
|
+
backup_and_wipe_env_var "SAUCE_USERNAME"
|
46
57
|
ENV['SAUCE_USERNAME'] = nil
|
47
58
|
make_connection
|
48
59
|
}.to raise_error(ArgumentError)
|
@@ -50,15 +61,18 @@ describe 'Sauce::Connect integration testing' do
|
|
50
61
|
|
51
62
|
it 'should fail if the SAUCE_ACCESS_KEY is empty' do
|
52
63
|
expect {
|
64
|
+
backup_and_wipe_env_var "SAUCE_ACCESS_KEY"
|
65
|
+
backup_and_wipe_env_var "SAUCE_USERNAME"
|
66
|
+
|
53
67
|
ENV['SAUCE_USERNAME'] = 'testman'
|
54
|
-
ENV['SAUCE_ACCESS_KEY'] = nil
|
55
68
|
make_connection
|
56
69
|
}.to raise_error(ArgumentError)
|
57
70
|
|
58
71
|
end
|
59
72
|
|
60
73
|
after :each do
|
61
|
-
|
74
|
+
restore_env_var "SAUCE_USERNAME"
|
75
|
+
restore_env_var "SAUCE_ACCESS_KEY"
|
62
76
|
end
|
63
77
|
end
|
64
78
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sauce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Lacey
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2013-05-
|
16
|
+
date: 2013-05-30 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: capybara
|