sauce 3.4.3 → 3.4.4

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: 82709ffd28a9f8de7af48b684fc7daecab419853
4
- data.tar.gz: a8e0bbf819adc32e8521246a3dacbded39df5cfb
3
+ metadata.gz: b295695e9e58ce2d7c0f984a2e560d73e73e4bf0
4
+ data.tar.gz: 49edf17ae68a309ef9c2f8721a7b6edd1890aefc
5
5
  SHA512:
6
- metadata.gz: 2c8411663dd30c154871b8c408f0f16b308c3a9548800a15843a393dfd1c91b2da693a122bd5bfe41e368322a2098a438197164206821d55ed73e5cf81fd867d
7
- data.tar.gz: ad1b0ae40cb57c5b2b0a17bc199a39d7d2f4acc9a2261a1caecd79f7a07ab5d17555043557b22c5634cfd26c032ca6714d73f834a305795fd1ab351fb40c3c5a
6
+ metadata.gz: 81da8f513bc0a91d3301b40c8664cd0f93a34496eb00e96d2199f64addc3c524002e23622962a1094c7b7e5e868c26dcfa6f9e2b82611c986dff7ad1199d6caa
7
+ data.tar.gz: 7d756a48d4fa99217ad249b1d825a9583b76f95fbfe873023d8fb94dbb8f2b72596afebbf58a54cfea6c4d13b179ec8d2e23bc0b874702c1041ca3b5fc9f284f
@@ -19,11 +19,9 @@ module ParallelTests
19
19
  execute_command(cmd, process_number, num_processes, options)
20
20
  end
21
21
 
22
-
23
-
24
22
  def self.tests_in_groups(tests, num_groups, options={})
25
23
  originals = (options[:group_by] == :steps) ? Grouper.by_steps(find_tests(tests, options), num_groups, options) : super
26
- all_tests = originals.flatten * Sauce::TestBroker.test_platforms.length
24
+ all_tests = originals.flatten * Sauce::TestBroker.test_platforms(:cucumber).length
27
25
  base_group_size = all_tests.length / num_groups
28
26
  num_full_groups = all_tests.length - (base_group_size * num_groups)
29
27
 
@@ -18,7 +18,7 @@ module ParallelTests
18
18
 
19
19
 
20
20
  def self.tests_in_groups(tests, num_groups, options={})
21
- all_tests = super.flatten * Sauce::TestBroker.test_platforms.length
21
+ all_tests = super.flatten * Sauce::TestBroker.test_platforms(:rspec).length
22
22
  base_group_size = all_tests.length / num_groups
23
23
  num_full_groups = all_tests.length - (base_group_size * num_groups)
24
24
 
@@ -6,6 +6,8 @@ require "thread"
6
6
 
7
7
  module Sauce
8
8
  class TestBroker
9
+ CUCUMBER_CONFIG_FILES = ["./features/support/sauce_helper.rb"]
10
+ RSPEC_CONFIG_FILES = ["./spec/sauce_helper.rb", "./spec/spec_helper.rb"]
9
11
 
10
12
  def self.reset
11
13
  if defined? @@platforms
@@ -56,9 +58,9 @@ module Sauce
56
58
  @group_indexes[group].shift
57
59
  end
58
60
 
59
- def self.test_platforms
61
+ def self.test_platforms(tool=:rspec)
60
62
  unless defined? @@platforms
61
- load_sauce_config
63
+ load_sauce_config(tool)
62
64
  @@platforms ||= Sauce.get_config[:browsers]
63
65
  end
64
66
  @@platforms
@@ -73,26 +75,31 @@ module Sauce
73
75
  "https://#{AUTH_DETAILS}@saucelabs.com/rest/v1"
74
76
  end
75
77
 
76
- def self.load_sauce_config
77
- begin
78
- if File.exists? "./spec/sauce_helper.rb"
79
- require "./spec/sauce_helper"
80
- else
81
- require "./spec/spec_helper"
82
- end
83
- rescue LoadError => e
84
- # Gross, but maybe theyre using Cuke
85
- begin
86
- if File.exists? "./features/support/sauce_helper.rb"
87
- require "./features/support/sauce_helper"
88
- else
89
- raise LoadError "Can't find sauce_helper, please add it in ./features/support/sauce_helper.rb"
90
- end
91
- rescue LoadError => e
92
- #WHO KNOWS
93
- end
78
+ def self.load_sauce_config(tool=:rspec)
79
+ case tool
80
+ when :rspec
81
+ primary_files = RSPEC_CONFIG_FILES
82
+ secondary_files = CUCUMBER_CONFIG_FILES
83
+ when :cucumber
84
+ primary_files = CUCUMBER_CONFIG_FILES
85
+ secondary_files = RSPEC_CONFIG_FILES
86
+ end
87
+
88
+ configuration_file = self.find_config_file(primary_files, secondary_files)
89
+ unless configuration_file
90
+ error_message = "Could not find Sauce configuration. Please make sure one of the following files exists:\n"
91
+ error_message << POSSIBLE_CONFIGURATION_FILES.map { |file_path| " - #{file_path}" }.join("\n")
92
+ raise error_message
94
93
  end
94
+ require configuration_file
95
+ end
96
+
97
+ def self.find_config_file(primary_files, secondary_files)
98
+ find_in_file_list(primary_files) || find_in_file_list(secondary_files)
99
+ end
95
100
 
101
+ def self.find_in_file_list(list)
102
+ list.find { |file_path| File.exists?(file_path) }
96
103
  end
97
104
 
98
105
  SAUCE_USERNAME = ENV["SAUCE_USERNAME"]
@@ -1,6 +1,6 @@
1
1
  module Sauce
2
2
  MAJOR_VERSION = '3.4'
3
- PATCH_VERSION = '3'
3
+ PATCH_VERSION = '4'
4
4
 
5
5
  def version
6
6
  "#{MAJOR_VERSION}.#{PATCH_VERSION}"
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: 3.4.3
4
+ version: 3.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Lacey
@@ -14,202 +14,202 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2014-06-18 00:00:00.000000000 Z
17
+ date: 2014-06-24 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rspec
21
21
  requirement: !ruby/object:Gem::Requirement
22
22
  requirements:
23
- - - "~>"
23
+ - - ~>
24
24
  - !ruby/object:Gem::Version
25
25
  version: 2.14.0
26
26
  type: :development
27
27
  prerelease: false
28
28
  version_requirements: !ruby/object:Gem::Requirement
29
29
  requirements:
30
- - - "~>"
30
+ - - ~>
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.14.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: simplecov
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
37
+ - - '>='
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
44
+ - - '>='
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: capybara
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ">="
51
+ - - '>='
52
52
  - !ruby/object:Gem::Version
53
53
  version: 2.2.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
58
+ - - '>='
59
59
  - !ruby/object:Gem::Version
60
60
  version: 2.2.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: yard
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ">="
65
+ - - '>='
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ">="
72
+ - - '>='
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: redcarpet
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ">="
79
+ - - '>='
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ">="
86
+ - - '>='
87
87
  - !ruby/object:Gem::Version
88
88
  version: '0'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: net-http-persistent
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ">="
93
+ - - '>='
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ">="
100
+ - - '>='
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: rest-client
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - ">="
107
+ - - '>='
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - ">="
114
+ - - '>='
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: net-ssh
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
- - - ">="
121
+ - - '>='
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  type: :runtime
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - ">="
128
+ - - '>='
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: net-ssh-gateway
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - ">="
135
+ - - '>='
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  type: :runtime
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
- - - ">="
142
+ - - '>='
143
143
  - !ruby/object:Gem::Version
144
144
  version: '0'
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: selenium-webdriver
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - ">="
149
+ - - '>='
150
150
  - !ruby/object:Gem::Version
151
151
  version: 0.1.2
152
152
  type: :runtime
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
- - - ">="
156
+ - - '>='
157
157
  - !ruby/object:Gem::Version
158
158
  version: 0.1.2
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: childprocess
161
161
  requirement: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - ">="
163
+ - - '>='
164
164
  - !ruby/object:Gem::Version
165
165
  version: 0.1.6
166
166
  type: :runtime
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  requirements:
170
- - - ">="
170
+ - - '>='
171
171
  - !ruby/object:Gem::Version
172
172
  version: 0.1.6
173
173
  - !ruby/object:Gem::Dependency
174
174
  name: json
175
175
  requirement: !ruby/object:Gem::Requirement
176
176
  requirements:
177
- - - ">="
177
+ - - '>='
178
178
  - !ruby/object:Gem::Version
179
179
  version: 1.2.0
180
180
  type: :runtime
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
- - - ">="
184
+ - - '>='
185
185
  - !ruby/object:Gem::Version
186
186
  version: 1.2.0
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: cmdparse
189
189
  requirement: !ruby/object:Gem::Requirement
190
190
  requirements:
191
- - - ">="
191
+ - - '>='
192
192
  - !ruby/object:Gem::Version
193
193
  version: 2.0.2
194
194
  type: :runtime
195
195
  prerelease: false
196
196
  version_requirements: !ruby/object:Gem::Requirement
197
197
  requirements:
198
- - - ">="
198
+ - - '>='
199
199
  - !ruby/object:Gem::Version
200
200
  version: 2.0.2
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: highline
203
203
  requirement: !ruby/object:Gem::Requirement
204
204
  requirements:
205
- - - ">="
205
+ - - '>='
206
206
  - !ruby/object:Gem::Version
207
207
  version: 1.5.0
208
208
  type: :runtime
209
209
  prerelease: false
210
210
  version_requirements: !ruby/object:Gem::Requirement
211
211
  requirements:
212
- - - ">="
212
+ - - '>='
213
213
  - !ruby/object:Gem::Version
214
214
  version: 1.5.0
215
215
  - !ruby/object:Gem::Dependency
@@ -230,14 +230,14 @@ dependencies:
230
230
  name: sauce_whisk
231
231
  requirement: !ruby/object:Gem::Requirement
232
232
  requirements:
233
- - - "~>"
233
+ - - ~>
234
234
  - !ruby/object:Gem::Version
235
235
  version: 0.0.11
236
236
  type: :runtime
237
237
  prerelease: false
238
238
  version_requirements: !ruby/object:Gem::Requirement
239
239
  requirements:
240
- - - "~>"
240
+ - - ~>
241
241
  - !ruby/object:Gem::Version
242
242
  version: 0.0.11
243
243
  description: A Ruby helper for running tests in Sauce Labs' browser testing cloud
@@ -325,12 +325,12 @@ require_paths:
325
325
  - lib
326
326
  required_ruby_version: !ruby/object:Gem::Requirement
327
327
  requirements:
328
- - - ">="
328
+ - - '>='
329
329
  - !ruby/object:Gem::Version
330
330
  version: '0'
331
331
  required_rubygems_version: !ruby/object:Gem::Requirement
332
332
  requirements:
333
- - - ">="
333
+ - - '>='
334
334
  - !ruby/object:Gem::Version
335
335
  version: '0'
336
336
  requirements: []