calabash-android 0.2.0.pre3 → 0.2.0.pre4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ 0.2.0.pre4:
2
+ It is no longer needed to do the separate build step.
3
+ If no test server is found calabash-android will now attempt build it.
1
4
  0.2.0.pre3:
2
5
  Reintroduced lib/calabash-android/management/app_installation.rb
3
6
  to stay backwards compatible with generated skeletons.
@@ -42,7 +42,7 @@ elsif cmd == 'run'
42
42
  if ARGV.empty? or not is_apk_file?(ARGV.first)
43
43
  calabash_run(nil, ARGV)
44
44
  else
45
- calabash_run(ARGV.shift)
45
+ calabash_run(relative_to_full_path(ARGV.shift))
46
46
  end
47
47
  exit 0
48
48
  elsif cmd == 'gen'
@@ -36,10 +36,12 @@ def calabash_build(app)
36
36
  end
37
37
  }
38
38
 
39
+ FileUtils.mkdir_p "test_servers" unless File.exist? "test_servers"
40
+
39
41
  test_apk = File.join(@test_server_dir, "bin", "Test.apk")
40
- test_server_file_name = "#{checksum(app)}.apk"
41
- FileUtils.cp(test_apk, File.join(@support_dir, test_server_file_name))
42
- puts "Done building the test server. Moved it to features/support/#{test_server_file_name}"
42
+ test_server_file_name = test_server_path(app)
43
+ FileUtils.cp(test_apk, test_server_file_name)
44
+ puts "Done building the test server. Moved it to #{test_server_file_name}"
43
45
  end
44
46
  end
45
47
 
@@ -12,8 +12,15 @@ def calabash_run(app_path)
12
12
  exit
13
13
  end
14
14
 
15
+
16
+ unless File.exist?(test_server_path(app_path))
17
+ puts "No test server found for this combination of app and calabash version. Rebuilding test server."
18
+ calabash_build(app_path)
19
+ end
20
+
21
+
15
22
  if app_path
16
- test_server_path = "features/support/#{checksum(app_path)}.apk"
23
+ test_server_path = test_server_path(app_path)
17
24
  env = "PACKAGE_NAME=#{package_name(app_path)} "\
18
25
  "TEST_PACKAGE_NAME=#{package_name(test_server_path)} "\
19
26
  "APP_PATH=#{app_path} "\
@@ -51,4 +51,8 @@ def checksum(file_path)
51
51
  Digest::MD5.hexdigest(File.read(file_path))
52
52
  end
53
53
 
54
+ def test_server_path(apk_file_path)
55
+ "test_servers/#{checksum(apk_file_path)}_#{Calabash::Android::VERSION}.apk"
56
+ end
57
+
54
58
 
@@ -1,6 +1,6 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.2.0.pre3"
4
- FRAMEWORK_VERSION = "0.2.0.pre3"
3
+ VERSION = "0.2.0.pre4"
4
+ FRAMEWORK_VERSION = "0.2.0.pre4"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-android
3
3
  version: !ruby/object:Gem::Version
4
- hash: 2063487833
4
+ hash: -4038335878
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
9
  - 0
10
10
  - pre
11
- - 3
12
- version: 0.2.0.pre3
11
+ - 4
12
+ version: 0.2.0.pre4
13
13
  platform: ruby
14
14
  authors:
15
15
  - Jonas Maturana Larsen