xamarin-test-cloud 0.9.29 → 0.9.30

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: 646dc4bedaa2c3dacd054424b0c8acb56834cecd
4
- data.tar.gz: 18b96d1c4fe04dcb035860077a0ad0027398cdb3
3
+ metadata.gz: 5acba22a909be04f6082a6889878d66ebe1b5cad
4
+ data.tar.gz: 3feb44bf79cdb4c451684bafe7640b55f12abdc0
5
5
  SHA512:
6
- metadata.gz: 75a263fb95c65c03a527cfbd03b7c114314890e14768f71ef6f0267fa49cda875349e651e779f31c67dfac5df5165b96abb06eb4a4b637ef80baaeee8d21a479
7
- data.tar.gz: 1918b8dd78a3764bb41642a12ff5576f367a0297e64864991c4eab0bce4566e5f0764fd5833d0f7b46266b01ee642621968e0d1d878255ddf557bff16e8bb61a
6
+ metadata.gz: 46fc122afaf9f2e734ad40b4268cde24907a3532db1c40dccf502d3e3ccf6400bdcc6de3c66c77de5c7e128e78db10c1d70ebe49913bf845830486ed5fb3057e
7
+ data.tar.gz: 6e157b20859950aed4a801a909f787aff88ddb3e0295b642434f99d1f2f283d77930884f02a345ee7f01be76e34548dcbcc2a56a8a925225985b82676e19156c
@@ -22,10 +22,9 @@ module XamarinTestCloud
22
22
  include Thor::Actions
23
23
 
24
24
  attr_accessor :host, :app, :api_key, :appname, :app_explorer, :test_parameters,
25
- :workspace, :config, :profile, :skip_config_check
26
- attr_accessor :dry_run, :device_selection
27
- attr_accessor :pretty, :async
28
- attr_accessor :endpoint_path
25
+ :workspace, :config, :profile, :skip_config_check, :dry_run,
26
+ :device_selection, :pretty, :async, :endpoint_path,
27
+ :locale, :series
29
28
 
30
29
  FILE_UPLOAD_ENDPOINT = 'upload2'
31
30
  FORM_URL_ENCODED_ENDPOINT = 'upload'
@@ -55,7 +54,7 @@ module XamarinTestCloud
55
54
  :required => false,
56
55
  :type => :string
57
56
 
58
- method_option 'device-selection',
57
+ method_option 'devices',
59
58
  :desc => 'Device selection',
60
59
  :aliases => '-d',
61
60
  :required => true,
@@ -108,6 +107,15 @@ module XamarinTestCloud
108
107
  :type => :boolean,
109
108
  :default => false #do upload by default
110
109
 
110
+ method_option 'locale',
111
+ :desc => "System language",
112
+ :type => :string
113
+
114
+ method_option 'series',
115
+ :desc => "Test series",
116
+ :type => :string
117
+
118
+
111
119
  def submit(app, api_key)
112
120
 
113
121
  self.host = options[:host]
@@ -145,12 +153,16 @@ module XamarinTestCloud
145
153
 
146
154
  self.appname = options['app-name']
147
155
 
148
- self.device_selection = options['device-selection']
156
+ self.device_selection = options['devices']
149
157
 
150
158
  device_selection_data = validate_device_selection
151
159
 
152
160
  self.app_explorer = options['app-explorer']
153
161
 
162
+ self.locale = options['locale']
163
+
164
+ self.series = options['series']
165
+
154
166
 
155
167
  self.skip_config_check = options['skip-config-check']
156
168
 
@@ -202,7 +214,7 @@ module XamarinTestCloud
202
214
  end
203
215
 
204
216
 
205
- if ENV['DEBUG']
217
+ if debug?
206
218
  puts "Host = #{self.host}"
207
219
  puts "App = #{self.app}"
208
220
  puts "App Name = #{self.app}"
@@ -223,7 +235,7 @@ module XamarinTestCloud
223
235
  return
224
236
  end
225
237
  json = test_jon_data[:body]
226
- if ENV['DEBUG']=='1'
238
+ if debug?
227
239
  p json
228
240
  end
229
241
 
@@ -257,6 +269,10 @@ module XamarinTestCloud
257
269
 
258
270
  no_tasks do
259
271
 
272
+ def debug?
273
+ ENV['DEBUG'] == '1'
274
+ end
275
+
260
276
  def exit_on_failure?
261
277
  true
262
278
  end
@@ -270,7 +286,7 @@ module XamarinTestCloud
270
286
  log "Status: #{status_json["status_description"]}"
271
287
  if status_json["status"] == "finished"
272
288
  puts "Done!"
273
- if ENV['DEBUG'] == '1'
289
+ if debug?
274
290
  log "Status JSON result"
275
291
  puts status_json
276
292
  end
@@ -303,7 +319,7 @@ module XamarinTestCloud
303
319
  end
304
320
  exit 1
305
321
  end
306
- if ENV['DEBUG']=='1'
322
+ if debug?
307
323
  sleep 1
308
324
  else
309
325
  sleep 10
@@ -328,7 +344,7 @@ module XamarinTestCloud
328
344
 
329
345
  def submit_test_job(device_selection_data)
330
346
  tmpdir = Dir.mktmpdir
331
- if ENV['DEBUG']
347
+ if debug?
332
348
  log "Packaging gems in: #{tmpdir}"
333
349
  end
334
350
  start_at = Time.now
@@ -377,6 +393,8 @@ module XamarinTestCloud
377
393
  'app' => self.appname,
378
394
  'test_parameters' => self.test_parameters,
379
395
  'app_explorer' => self.app_explorer,
396
+ 'locale' => self.locale,
397
+ 'series' => self.series,
380
398
  'api_key' => api_key,
381
399
  'app_filename' => File.basename(app)}
382
400
 
@@ -384,7 +402,7 @@ module XamarinTestCloud
384
402
  upload_data['profile'] = profile
385
403
  end
386
404
 
387
- if ENV['DEBUG']
405
+ if debug?
388
406
  puts JSON.pretty_generate(upload_data)
389
407
  end
390
408
 
@@ -399,13 +417,13 @@ module XamarinTestCloud
399
417
  self.endpoint_path = FORM_URL_ENCODED_ENDPOINT #ruby receives upload
400
418
  end
401
419
 
402
- if ENV['DEBUG']
420
+ if debug?
403
421
  puts "Will upload to file path: #{self.endpoint_path}"
404
422
  end
405
423
 
406
424
 
407
425
  response = http_post(endpoint_path, upload_data) do |response, request, result, &block|
408
- if ENV['DEBUG']
426
+ if debug?
409
427
  puts "Request url: #{request.url}"
410
428
  puts "Response code: #{response.code}"
411
429
  puts "Response body: #{response.body}"
@@ -447,7 +465,7 @@ module XamarinTestCloud
447
465
  end
448
466
 
449
467
  return :status => response.code, :body => JSON.parse(response)
450
-
468
+
451
469
  end
452
470
 
453
471
 
@@ -460,7 +478,7 @@ module XamarinTestCloud
460
478
  log('')
461
479
  log('Warning proceeding with default Gemfile.')
462
480
  log('It is strongly recommended that you create a custom Gemfile.')
463
-
481
+
464
482
  File.open(gemfile_path, "w") do |f|
465
483
  f.puts "source 'http://rubygems.org'"
466
484
  if is_android?
@@ -788,7 +806,7 @@ module XamarinTestCloud
788
806
  raise ValidationError, e
789
807
  end
790
808
 
791
- if ENV['DEBUG']
809
+ if debug?
792
810
  puts 'Parsed Cucumber config as:'
793
811
  puts config_yml.inspect
794
812
  end
@@ -1,3 +1,3 @@
1
1
  module XamarinTestCloud
2
- VERSION = '0.9.29'
2
+ VERSION = '0.9.30'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xamarin-test-cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.29
4
+ version: 0.9.30
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-06 00:00:00.000000000 Z
12
+ date: 2014-03-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.1.10
158
+ rubygems_version: 2.0.3
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: Command-line interface to Xamarin Test Cloud