calabash-android 0.3.0.pre6 → 0.3.0.pre7

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.
@@ -12,18 +12,24 @@ def calabash_build(app)
12
12
 
13
13
  unless system %Q{ruby -pi.bak -e "gsub(/#targetPackage#/, '#{package_name(app)}')" AndroidManifest.xml}
14
14
  raise "Could not replace package name in manifest"
15
- end
16
-
15
+ end
16
+
17
17
  unless system("#{ENV["ANDROID_HOME"]}/platform-tools/aapt package -M AndroidManifest.xml -I #{android_platform}/android.jar -F dummy.apk")
18
18
  raise "Could not create dummy.apk"
19
- end
20
-
19
+ end
20
+
21
21
  Zip::ZipFile.new("dummy.apk").extract("AndroidManifest.xml","customAndroidManifest.xml")
22
22
  Zip::ZipFile.open("TestServer.apk") do |zip_file|
23
23
  zip_file.add("AndroidManifest.xml", "customAndroidManifest.xml")
24
24
  end
25
25
  end
26
- cmd = "jarsigner -sigalg MD5withRSA -digestalg SHA1 -signedjar #{test_server_file_name} -storepass #{keystore["keystore_password"]} -keystore \"#{File.expand_path keystore["keystore_location"]}\" #{workspace_dir}/TestServer.apk #{keystore["keystore_alias"]}"
26
+ if is_windows?
27
+ jarsigner_path = "#{ENV["JAVA_HOME"]}/bin/jarsigner.exe"
28
+ else
29
+ jarsigner_path = "jarsigner"
30
+ end
31
+
32
+ cmd = "#{jarsigner_path} -sigalg MD5withRSA -digestalg SHA1 -signedjar #{test_server_file_name} -storepass #{keystore["keystore_password"]} -keystore \"#{File.expand_path keystore["keystore_location"]}\" #{workspace_dir}/TestServer.apk #{keystore["keystore_alias"]}"
27
33
  unless system(cmd)
28
34
  raise "Could not sign test server"
29
35
  end
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.3.0.pre6"
3
+ VERSION = "0.3.0.pre7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-android
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.pre6
4
+ version: 0.3.0.pre7
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-28 00:00:00.000000000 Z
12
+ date: 2012-10-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cucumber