Ruby_AppThwack 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb3be23cfdfdb61928eec6f248d179dd2937f707
4
- data.tar.gz: b8f082d121a01efc7d8200bbfadc90c824cc21fe
3
+ metadata.gz: 74226e7cbde20cc815ba3574af2b0794483ef4cc
4
+ data.tar.gz: 4d2cc2df2194d02bb53747537cf11d5f9cb3eb47
5
5
  SHA512:
6
- metadata.gz: 82b4c85921e4c0c3b9e7c67a635739fba676ad04fe79700f02cf36f086ba897b7f31c784142be4936d081ed0b83e43f609b1c78c5c9e27e830e0c2ada6d04a8d
7
- data.tar.gz: 3fbb37a3afe86ffe64ba939bd9661c295637e362c5ee8ee921d3f9f908665efaf8fd93b7c34dc0242a7c4d3cf7455af7132935e9ba532bbe44e802615e93e85e
6
+ metadata.gz: cb91484c4466f0487c391eb51b5a0237f73895d88b186917af12cdfee2be2e86365d717e743be510f391ac2e62e28826c98b1245acd89fac6231dd6db45c502a
7
+ data.tar.gz: cbbd39341ec3575dd517c4347f51088d0eefaee3db305b0155c4d0176168d8dc51caa370686353bc6f591e08ec3c1869de6d69ddcc5a146f6c0fc1b46a81ff5d
Binary file
data/features.zip ADDED
Binary file
@@ -32,11 +32,10 @@ module AppThwack::API
32
32
  return (res.select { |pool| pool['name'].eql? name }).first['id']
33
33
  end
34
34
 
35
+
35
36
  def download_file(src, dst)
36
-
37
- File.open(dst, 'w') { |f| f.write(Typhoeus.get(src).body) }
38
-
39
- return dst
37
+ # We use curl to download the file to avoid running out of RAM
38
+ return dst if system "curl -X GET '#{src}' -o '#{dst}' --silent"
40
39
  end
41
40
 
42
41
  def upload_file(src)
@@ -0,0 +1,31 @@
1
+ command :reports do |c|
2
+ c.syntax = 'appthwack reports [arguments]'
3
+ c.summary = 'Downloads reports and tidies reports'
4
+ c.description = ''
5
+
6
+ c.option '--project PROJECT', 'The project name of the running tests'
7
+ c.option '--runid INT', 'The run ID of the test'
8
+ c.option '--platform PLATFORM', 'The mobile platform of the app under test'
9
+
10
+ c.action do |args, options|
11
+ say_error 'Need project name and run ID' if options.runid.nil? or options.project.nil?
12
+
13
+ options.proj_id = AppThwack::API.get_project_id(options.project)
14
+
15
+ say_ok "Project ID: #{options.proj_id}"
16
+
17
+ status = AppThwack::API.test_status? options.proj_id, options.runid
18
+
19
+ say_error 'Project is not finished' unless status.eql? 'completed'
20
+
21
+ say_ok 'Downloading reports...'
22
+
23
+ reports = AppThwack::API.download_results options.proj_id, options.runid
24
+
25
+ say_ok "Downloaded raw reports: #{reports}"
26
+
27
+ AppThwack::Reports.convert_reports reports, options.platform
28
+
29
+ say_ok 'Converted reports'
30
+ end
31
+ end
@@ -52,7 +52,7 @@ command :run do |c|
52
52
  params['junit'] = { junit: options.test_id }
53
53
 
54
54
  result = AppThwack::API.start_test(
55
- File.basename(Dir.glob(options.app).first),
55
+ File.basename(Dir.glob(options.app).first) + ' -- CLI',
56
56
  options.proj_id,
57
57
  options.app_id,
58
58
  options.pool_id,
@@ -79,6 +79,8 @@ command :run do |c|
79
79
 
80
80
  # download the results and we should have waited
81
81
  if options.downloadresults and options.wait
82
+ say_ok 'Downloading results...'
83
+
82
84
  zip = AppThwack::API.download_results options.proj_id, options.run_id
83
85
 
84
86
  say_ok "Results zip #{zip}"
@@ -1,4 +1,5 @@
1
1
  $:.push File.expand_path('../', __FILE__)
2
2
 
3
3
  require 'commands/status'
4
- require 'commands/run'
4
+ require 'commands/run'
5
+ require 'commands/report'
@@ -36,6 +36,7 @@ module AppThwack::Reports
36
36
  puts device
37
37
 
38
38
  f = File.join(reports, f, intermediate_folders, 'raw_calabash_json_output.instrtxt')
39
+
39
40
  if File.exists? f
40
41
  features = []
41
42
 
@@ -1,5 +1,5 @@
1
1
  module AppThwack
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
4
4
 
5
5
  require_relative 'ruby_appthwack/reports.rb'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Ruby_AppThwack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stewart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-22 00:00:00.000000000 Z
11
+ date: 2013-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander
@@ -129,7 +129,9 @@ executables:
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
+ - ./features.zip
132
133
  - ./lib/ruby_appthwack/appthwack_api.rb
134
+ - ./lib/ruby_appthwack/commands/report.rb
133
135
  - ./lib/ruby_appthwack/commands/run.rb
134
136
  - ./lib/ruby_appthwack/commands/status.rb
135
137
  - ./lib/ruby_appthwack/commands.rb
@@ -138,7 +140,7 @@ files:
138
140
  - ./lib/ruby_appthwack.rb
139
141
  - ./LICENSE
140
142
  - ./README.md
141
- - ./Ruby_AppThwack-0.0.4.gem
143
+ - ./Ruby_AppThwack-0.0.5.gem
142
144
  - ./ruby_appthwack.gemspec
143
145
  - bin/appthwack
144
146
  homepage: https://github.com/samstewart/ruby_appthwack
Binary file