sauce 2.2.1 → 2.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -12,5 +12,5 @@ group :test do
12
12
  end
13
13
 
14
14
  group :development do
15
- gem 'debugger'
15
+ gem 'debugger', :platform => :mri_19
16
16
  end
@@ -25,7 +25,7 @@ module Sauce
25
25
  ::Selenium::WebDriver::Error::UnknownError]
26
26
  MAX_RETRIES = 3
27
27
 
28
- def handle_retry(method, *args)
28
+ def handle_retry(method, *args, &block)
29
29
  retries = 0
30
30
 
31
31
  # Disable retries only when we really really want to, this will remain
@@ -35,7 +35,7 @@ module Sauce
35
35
  end
36
36
 
37
37
  begin
38
- send("base_#{method}".to_sym, *args)
38
+ send("base_#{method}".to_sym, *args, &block)
39
39
  rescue *RETRY_ON => e
40
40
  if retries < MAX_RETRIES
41
41
  puts "Received an exception (#{e}), retrying"
@@ -62,8 +62,8 @@ module Sauce
62
62
  [:find, :visit, :current_url, :reset!, :within_frame,
63
63
  :within_window, :find_window, :body, :source,
64
64
  :execute_script, :evaluate_script].each do |method|
65
- define_method(method) do |*args|
66
- handle_retry(method, *args)
65
+ define_method(method) do |*args, &block|
66
+ handle_retry(method, *args, &block)
67
67
  end
68
68
  end
69
69
 
data/sauce.gemspec CHANGED
@@ -3,7 +3,7 @@ require File.expand_path('../lib/sauce/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'sauce'
6
- s.version = "#{Sauce::MAJOR_VERSION}.1"
6
+ s.version = "#{Sauce::MAJOR_VERSION}.2"
7
7
  s.authors = ["Eric Allen", "Sean Grove", "Steven Hazel", "R. Tyler Croy", "Santiago Suarez Ordoñez"]
8
8
  s.homepage = 'http://github.com/saucelabs/sauce_ruby'
9
9
  s.email = 'help@saucelabs.com'
@@ -127,6 +127,15 @@ describe Sauce::Capybara do
127
127
  end
128
128
  end
129
129
 
130
+ describe '#within_frame' do
131
+ it 'should route through #handle_retry and yield block' do
132
+ driver.should_receive(:base_within_frame).and_yield
133
+ driver.within_frame do
134
+ "lol"
135
+ end
136
+ end
137
+ end
138
+
130
139
  end
131
140
 
132
141
  describe '#install_hooks' do
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.2.1
4
+ version: 2.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,11 +13,11 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2012-12-04 00:00:00.000000000 Z
16
+ date: 2012-12-18 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: net-http-persistent
20
- requirement: &16275760 !ruby/object:Gem::Requirement
20
+ requirement: &16379820 !ruby/object:Gem::Requirement
21
21
  none: false
22
22
  requirements:
23
23
  - - ! '>='
@@ -25,10 +25,10 @@ dependencies:
25
25
  version: '0'
26
26
  type: :runtime
27
27
  prerelease: false
28
- version_requirements: *16275760
28
+ version_requirements: *16379820
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: capybara
31
- requirement: &16274460 !ruby/object:Gem::Requirement
31
+ requirement: &16378080 !ruby/object:Gem::Requirement
32
32
  none: false
33
33
  requirements:
34
34
  - - ~>
@@ -36,10 +36,10 @@ dependencies:
36
36
  version: '1.0'
37
37
  type: :runtime
38
38
  prerelease: false
39
- version_requirements: *16274460
39
+ version_requirements: *16378080
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: rest-client
42
- requirement: &16272980 !ruby/object:Gem::Requirement
42
+ requirement: &16376340 !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements:
45
45
  - - ! '>='
@@ -47,10 +47,10 @@ dependencies:
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
- version_requirements: *16272980
50
+ version_requirements: *16376340
51
51
  - !ruby/object:Gem::Dependency
52
52
  name: net-ssh
53
- requirement: &16271640 !ruby/object:Gem::Requirement
53
+ requirement: &16375080 !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements:
56
56
  - - ! '>='
@@ -58,10 +58,10 @@ dependencies:
58
58
  version: '0'
59
59
  type: :runtime
60
60
  prerelease: false
61
- version_requirements: *16271640
61
+ version_requirements: *16375080
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: net-ssh-gateway
64
- requirement: &16270120 !ruby/object:Gem::Requirement
64
+ requirement: &16373280 !ruby/object:Gem::Requirement
65
65
  none: false
66
66
  requirements:
67
67
  - - ! '>='
@@ -69,10 +69,10 @@ dependencies:
69
69
  version: '0'
70
70
  type: :runtime
71
71
  prerelease: false
72
- version_requirements: *16270120
72
+ version_requirements: *16373280
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: selenium-webdriver
75
- requirement: &16268660 !ruby/object:Gem::Requirement
75
+ requirement: &16388200 !ruby/object:Gem::Requirement
76
76
  none: false
77
77
  requirements:
78
78
  - - ! '>='
@@ -80,10 +80,10 @@ dependencies:
80
80
  version: 0.1.2
81
81
  type: :runtime
82
82
  prerelease: false
83
- version_requirements: *16268660
83
+ version_requirements: *16388200
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: childprocess
86
- requirement: &16283740 !ruby/object:Gem::Requirement
86
+ requirement: &16385280 !ruby/object:Gem::Requirement
87
87
  none: false
88
88
  requirements:
89
89
  - - ! '>='
@@ -91,10 +91,10 @@ dependencies:
91
91
  version: 0.1.6
92
92
  type: :runtime
93
93
  prerelease: false
94
- version_requirements: *16283740
94
+ version_requirements: *16385280
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: json
97
- requirement: &16280460 !ruby/object:Gem::Requirement
97
+ requirement: &16382900 !ruby/object:Gem::Requirement
98
98
  none: false
99
99
  requirements:
100
100
  - - ! '>='
@@ -102,10 +102,10 @@ dependencies:
102
102
  version: 1.2.0
103
103
  type: :runtime
104
104
  prerelease: false
105
- version_requirements: *16280460
105
+ version_requirements: *16382900
106
106
  - !ruby/object:Gem::Dependency
107
107
  name: cmdparse
108
- requirement: &16278000 !ruby/object:Gem::Requirement
108
+ requirement: &16381280 !ruby/object:Gem::Requirement
109
109
  none: false
110
110
  requirements:
111
111
  - - ! '>='
@@ -113,10 +113,10 @@ dependencies:
113
113
  version: 2.0.2
114
114
  type: :runtime
115
115
  prerelease: false
116
- version_requirements: *16278000
116
+ version_requirements: *16381280
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: highline
119
- requirement: &16276100 !ruby/object:Gem::Requirement
119
+ requirement: &16396360 !ruby/object:Gem::Requirement
120
120
  none: false
121
121
  requirements:
122
122
  - - ! '>='
@@ -124,7 +124,7 @@ dependencies:
124
124
  version: 1.5.0
125
125
  type: :runtime
126
126
  prerelease: false
127
- version_requirements: *16276100
127
+ version_requirements: *16396360
128
128
  description: A Ruby helper for running tests in Sauce OnDemand, Sauce Labs' browsers
129
129
  in the cloud service
130
130
  email: help@saucelabs.com
@@ -196,7 +196,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
196
  version: '0'
197
197
  segments:
198
198
  - 0
199
- hash: -1925949126770304856
199
+ hash: 669678211782537327
200
200
  required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  none: false
202
202
  requirements:
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  version: '0'
206
206
  segments:
207
207
  - 0
208
- hash: -1925949126770304856
208
+ hash: 669678211782537327
209
209
  requirements: []
210
210
  rubyforge_project:
211
211
  rubygems_version: 1.8.10