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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- M2RkZDEzM2YyYThmY2Q5Mjc3ZWU4ZGE4YzJjYzAzNzIzZTFiN2FiMw==
4
+ NWEzMDRmOGQzNWM5MDNmOTVlYjk0ODdhNzVmYTFlODA2NzZhN2E2MA==
5
5
  data.tar.gz: !binary |-
6
- MzU0ODcyMmQ1OTIyOTljM2EzZjFiZTY0YWUxMGU5MzgzMDVhMjcwYQ==
6
+ NDE3YmM3M2Q3YmY1Nzk2ZjNiY2FjM2M3NGQ0ZmI1ZmE1NDhjNDYzZA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MjMzN2VhYmI2NzY0YTdiNDBhNjUxOTJiOTVkZDYzM2UwNmZhMmUyNmQzZGQ5
10
- ZTZkOWRmZmU4ZThkYzUyMmQwYWFiMjdkNTU3ZDg2MTg5ZmRiYTc1ZTZjMmUw
11
- YmJkMmEyZmU1YjgyMjhkMWQ1Yzc1ODUwMDhlMWE1OTQ4YzFmNjA=
9
+ MzQ4NzM3OWZiZmUwMWE2NDQwMTk4OTU1ODQ0ZGNlY2JjNmNjYzU4YTkyYjNm
10
+ MDM2NDVkZGIwM2ZkMjM0ZTU5YjI1NmFiNDRmMjNhZDZkNzgzMDc0MjcxMTVi
11
+ MGViNDk5ZGIxN2FlNmMxODkyZjliZTk4OTJjZmQxMDJjMTRhNTI=
12
12
  data.tar.gz: !binary |-
13
- YzNjNjU2ODhmZDBiYmQ1OWNmZmI2NTlmNmYxNGU0YjE2OTFhZWI1OTBmODdm
14
- MGIxMTUwNjM3YzkzMjY1NmViM2U3NjhjMzIxZGE2MDYxYTkyN2JiYzFmZmY4
15
- M2Y3ZTJmNzU2YTFhZjliMmI1MzE5NTYwN2I3OTNiNjMwYWNjMWM=
13
+ YTBkY2NiZGNlOTNiOTdkMDU5NTdmYzJlZDFlOTE5ODE4YzE0YjMwMWFkNjZi
14
+ ZGJlYjBiM2VkN2JjYTU2NDczODFmMzk0MmZjM2Y0ZjBhY2I0YjA2ODk0Njg1
15
+ ZjYwYjNmMTM2ZTA3YzVjMzk1YzVhMjE5Zjg2Y2E3NDlmODc5NWE=
data/lib/sauce/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Sauce
2
2
  MAJOR_VERSION = '2.4'
3
- PATCH_VERSION = '5'
3
+ PATCH_VERSION = '6'
4
4
 
5
5
  def version
6
6
  "#{MAJOR_VERSION}.#{PATCH_VERSION}"
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 also empty' do
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
- ENV['SAUCE_USERNAME'] = nil
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.5
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-29 00:00:00.000000000 Z
16
+ date: 2013-05-30 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: capybara