calabash-android 0.0.13 → 0.0.14
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.
- data/CHANGES.txt +4 -0
- data/bin/calabash-android +1 -0
- data/bin/calabash-android-helpers.rb +2 -33
- data/bin/calabash-android-submit.rb +48 -0
- data/doc/calabash-android-help.txt +5 -2
- data/lib/calabash-android/version.rb +2 -2
- metadata +62 -56
- data/pkg/calabash-android-0.0.1.gem +0 -0
data/CHANGES.txt
CHANGED
data/bin/calabash-android
CHANGED
@@ -7,6 +7,7 @@ require File.join(File.dirname(__FILE__), "calabash-android-generate")
|
|
7
7
|
require File.join(File.dirname(__FILE__), "calabash-android-build")
|
8
8
|
require File.join(File.dirname(__FILE__), "calabash-android-run")
|
9
9
|
require File.join(File.dirname(__FILE__), "calabash-android-setup")
|
10
|
+
require File.join(File.dirname(__FILE__), "calabash-android-submit")
|
10
11
|
|
11
12
|
@features_dir = File.join(FileUtils.pwd, "features")
|
12
13
|
@support_dir = File.join(@features_dir, "support")
|
@@ -27,7 +27,8 @@ def print_usage
|
|
27
27
|
You need to run this command every time you make changes to the app.
|
28
28
|
run
|
29
29
|
runs Cucumber in the current folder with the enviroment needed.
|
30
|
-
|
30
|
+
submit
|
31
|
+
submits an apk along with your features to www.lesspainful.com
|
31
32
|
|
32
33
|
<options> can be
|
33
34
|
-v, --verbose
|
@@ -47,38 +48,6 @@ def is_json?(str)
|
|
47
48
|
str[0..0] == '{'
|
48
49
|
end
|
49
50
|
|
50
|
-
def calabash_submit(args)
|
51
|
-
if args.size < 2
|
52
|
-
msg("Error") do
|
53
|
-
puts "You must supply at path to apk and secret."
|
54
|
-
end
|
55
|
-
exit 1
|
56
|
-
end
|
57
|
-
|
58
|
-
apk_file = ARGV[0]
|
59
|
-
puts "No such file '#{apk_file}'" unless File.exist?(apk_file)
|
60
|
-
secret = ARGV[1]
|
61
|
-
|
62
|
-
archive_path = "#{Tempfile.new("archive").path}.zip"
|
63
|
-
puts "Creating zip file"
|
64
|
-
system("zip -r -o #{archive_path} features && zip -j #{archive_path} bin/Test.apk")
|
65
|
-
|
66
|
-
puts "Uploading apk and features to www.lesspainful.com"
|
67
|
-
result = `curl -F "secret=#{secret}" -F "app=@#{apk_file}" -F "env=@#{archive_path}" https://www.lesspainful.com/cmd_upload`
|
68
|
-
|
69
|
-
if is_json? result
|
70
|
-
json_result = JSON.parse(result)
|
71
|
-
puts "Test status is '#{json_result['status']}"
|
72
|
-
puts "Test id is '#{json_result['id']}"
|
73
|
-
puts "You can see the test result here: #{json_result['url']}"
|
74
|
-
puts "You can pull the status by using this command:"
|
75
|
-
puts "curl -F \"secret=#{secret}\" -F \"id=#{json_result['id']}\" https://www.lesspainful.com/cmd_status"
|
76
|
-
else
|
77
|
-
puts result
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
|
82
51
|
def run_build_if_test_server_does_not_exist
|
83
52
|
unless File.exists?(File.join(@support_dir, "Test.apk"))
|
84
53
|
puts "Could not find the test server"
|
@@ -0,0 +1,48 @@
|
|
1
|
+
def calabash_submit(args)
|
2
|
+
require "rubygems"
|
3
|
+
require 'tempfile'
|
4
|
+
require 'json'
|
5
|
+
|
6
|
+
if is_windows?
|
7
|
+
puts "Submitting to LessPainful.com from Windows is currently not supported"
|
8
|
+
exit
|
9
|
+
end
|
10
|
+
|
11
|
+
|
12
|
+
if args.size != 2
|
13
|
+
puts "Usage: calabash-android submit apk_file secret"
|
14
|
+
exit
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
apk_file = args[0]
|
19
|
+
puts "No such file '#{apk_file}'" unless File.exist?(apk_file)
|
20
|
+
secret = args[1]
|
21
|
+
|
22
|
+
unless File.exist?("features/support/Test.apk")
|
23
|
+
puts "No test server in features/support/"
|
24
|
+
puts "Please run 'calabash-android build' and then retry"
|
25
|
+
exit
|
26
|
+
end
|
27
|
+
|
28
|
+
archive_path = "#{Tempfile.new("archive").path}.zip"
|
29
|
+
puts "Creating zip file"
|
30
|
+
system("zip -r -o #{archive_path} features")
|
31
|
+
|
32
|
+
puts "Uploading to www.lesspainful.com"
|
33
|
+
puts 'curl -F "secret=#{secret}" -F "app=@#{apk_file}" -F "env=@#{archive_path}" https://www.lesspainful.com/calabash_android_upload'
|
34
|
+
result = `curl -F "secret=#{secret}" -F "app=@#{apk_file}" -F "env=@#{archive_path}" https://www.lesspainful.com/calabash_android_upload`
|
35
|
+
|
36
|
+
if is_json? result
|
37
|
+
json_result = JSON.parse(result)
|
38
|
+
puts "Test status is '#{json_result['status']}"
|
39
|
+
puts "Test id is '#{json_result['id']}"
|
40
|
+
puts "You can see the test result here: #{json_result['url']}"
|
41
|
+
puts "You can pull the status by using this command:"
|
42
|
+
puts "curl -F \"secret=#{secret}\" -F \"id=#{json_result['id']}\" https://www.lesspainful.com/cmd_status"
|
43
|
+
else
|
44
|
+
puts result
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
end
|
@@ -5,13 +5,14 @@ Usage: calabash-android <command-name> [parameters] [options]
|
|
5
5
|
setup
|
6
6
|
build
|
7
7
|
run [parameters]
|
8
|
+
submit <path_to_app> <lesspainful_secret>
|
8
9
|
|
9
10
|
Commands:
|
10
|
-
|
11
|
+
gen creates a skeleton features dir. This is usually used once when
|
11
12
|
setting up calabash to ensure that the features folder contains
|
12
13
|
the right step definitions and environment to run with cucumber.
|
13
14
|
|
14
|
-
|
15
|
+
setup sets up the current folder to run calabash against your
|
15
16
|
application.
|
16
17
|
Will ask you some questions about you application, development
|
17
18
|
environment and key store to user for signing.
|
@@ -21,6 +22,8 @@ Usage: calabash-android <command-name> [parameters] [options]
|
|
21
22
|
|
22
23
|
run runs Cucumber in the current folder with the enviroment needed.
|
23
24
|
|
25
|
+
submit submits an apk along with your features to www.lesspainful.com
|
26
|
+
|
24
27
|
|
25
28
|
Options:
|
26
29
|
-v, --verbose Turns on verbose logging
|
metadata
CHANGED
@@ -1,61 +1,72 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-android
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.14
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.13
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Jonas Maturana Larsen
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-06-06 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: cucumber
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
22
|
-
- -
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
25
22
|
type: :runtime
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: json
|
29
23
|
prerelease: false
|
30
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
31
25
|
none: false
|
32
|
-
requirements:
|
33
|
-
- -
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version:
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: json
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
36
38
|
type: :runtime
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: slowhandcuke
|
40
39
|
prerelease: false
|
41
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
41
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: slowhandcuke
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
47
54
|
type: :runtime
|
48
|
-
|
49
|
-
|
50
|
-
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
description: ! 'calabash-android drives tests for native and hybrid Android apps. '
|
63
|
+
email:
|
51
64
|
- jonas@lesspainful.com
|
52
|
-
executables:
|
65
|
+
executables:
|
53
66
|
- calabash-android
|
54
67
|
extensions: []
|
55
|
-
|
56
68
|
extra_rdoc_files: []
|
57
|
-
|
58
|
-
files:
|
69
|
+
files:
|
59
70
|
- .calabash_settings
|
60
71
|
- CHANGES.txt
|
61
72
|
- Gemfile
|
@@ -68,6 +79,7 @@ files:
|
|
68
79
|
- bin/calabash-android-helpers.rb
|
69
80
|
- bin/calabash-android-run.rb
|
70
81
|
- bin/calabash-android-setup.rb
|
82
|
+
- bin/calabash-android-submit.rb
|
71
83
|
- calabash-android.gemspec
|
72
84
|
- doc/calabash-android-help.txt
|
73
85
|
- epl-v10.html
|
@@ -104,7 +116,6 @@ files:
|
|
104
116
|
- lib/calabash-android/steps/spinner_steps.rb
|
105
117
|
- lib/calabash-android/steps/time_picker_steps.rb
|
106
118
|
- lib/calabash-android/version.rb
|
107
|
-
- pkg/calabash-android-0.0.1.gem
|
108
119
|
- test-server/AndroidManifest.xml
|
109
120
|
- test-server/build.xml
|
110
121
|
- test-server/instrumentation-backend/.classpath
|
@@ -591,33 +602,28 @@ files:
|
|
591
602
|
- test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/package-info.java
|
592
603
|
- test-server/calabash-js/src/calabash.js
|
593
604
|
- test-server/calabash-js/src/set_text.js
|
594
|
-
has_rdoc: true
|
595
605
|
homepage: http://github.com/calabash
|
596
606
|
licenses: []
|
597
|
-
|
598
607
|
post_install_message:
|
599
608
|
rdoc_options: []
|
600
|
-
|
601
|
-
require_paths:
|
609
|
+
require_paths:
|
602
610
|
- lib
|
603
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
611
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
604
612
|
none: false
|
605
|
-
requirements:
|
606
|
-
- -
|
607
|
-
- !ruby/object:Gem::Version
|
608
|
-
version:
|
609
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
613
|
+
requirements:
|
614
|
+
- - ! '>='
|
615
|
+
- !ruby/object:Gem::Version
|
616
|
+
version: '0'
|
617
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
610
618
|
none: false
|
611
|
-
requirements:
|
612
|
-
- -
|
613
|
-
- !ruby/object:Gem::Version
|
614
|
-
version:
|
619
|
+
requirements:
|
620
|
+
- - ! '>='
|
621
|
+
- !ruby/object:Gem::Version
|
622
|
+
version: '0'
|
615
623
|
requirements: []
|
616
|
-
|
617
624
|
rubyforge_project:
|
618
|
-
rubygems_version: 1.
|
625
|
+
rubygems_version: 1.8.23
|
619
626
|
signing_key:
|
620
627
|
specification_version: 3
|
621
628
|
summary: Client for calabash-android for automated functional testing on Android
|
622
629
|
test_files: []
|
623
|
-
|
Binary file
|