calabash-android 0.8.3.pre1 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/calabash-android +1 -0
- data/bin/calabash-android-build.rb +14 -12
- data/lib/calabash-android.rb +1 -0
- data/lib/calabash-android/helpers.rb +6 -2
- data/lib/calabash-android/lib/TestServer.apk +0 -0
- data/lib/calabash-android/utils.rb +25 -0
- data/lib/calabash-android/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca873f3c4e04e5159b56bf21503fdaf167d7614c
|
4
|
+
data.tar.gz: cb0157cefcf4aafd01489113c0958d58efc07a62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c77edda67a7f6fd6d38afb3840ded78f8bbc53d6edf97069a1d43d98fee4d3f351fd79edf181ddeef6cf7c0003afd3f771e9558e21f3f3f5647044771541745
|
7
|
+
data.tar.gz: 5d846e747e8cea8a9511bb1cc19e216c9174eb151222f6d023165bc36d4f1cf60bdb9d097c62ad376fe9977995cb7446db537b2eb7005d48876b3996068f28ad
|
data/bin/calabash-android
CHANGED
@@ -50,20 +50,22 @@ def calabash_build(app)
|
|
50
50
|
raise "Could not create dummy.apk"
|
51
51
|
end
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
53
|
+
Calabash::Utils.with_silent_zip do
|
54
|
+
Zip::File.new("dummy.apk").extract("AndroidManifest.xml","customAndroidManifest.xml")
|
55
|
+
Zip::File.open("TestServer.apk") do |zip_file|
|
56
|
+
begin
|
57
|
+
check_file("AndroidManifest.xml")
|
58
|
+
manifest_exists = true
|
59
|
+
rescue
|
60
|
+
manifest_exists = false
|
61
|
+
end
|
61
62
|
|
62
|
-
|
63
|
-
|
64
|
-
|
63
|
+
if manifest_exists
|
64
|
+
zip_file.remove("AndroidManifest.xml")
|
65
|
+
end
|
65
66
|
|
66
|
-
|
67
|
+
zip_file.add("AndroidManifest.xml", "customAndroidManifest.xml")
|
68
|
+
end
|
67
69
|
end
|
68
70
|
end
|
69
71
|
keystore.sign_apk("#{workspace_dir}/TestServer.apk", test_server_file_name)
|
data/lib/calabash-android.rb
CHANGED
@@ -169,9 +169,13 @@ def fingerprint_from_apk(app_path)
|
|
169
169
|
Dir.chdir(tmp_dir) do
|
170
170
|
FileUtils.cp(app_path, "app.apk")
|
171
171
|
FileUtils.mkdir("META-INF")
|
172
|
-
|
173
|
-
|
172
|
+
|
173
|
+
Calabash::Utils.with_silent_zip do
|
174
|
+
Zip::File.foreach("app.apk") do |z|
|
175
|
+
z.extract if /^META-INF\/\w+.(rsa|dsa)/i =~ z.name
|
176
|
+
end
|
174
177
|
end
|
178
|
+
|
175
179
|
signature_files = Dir["#{tmp_dir}/META-INF/*"]
|
176
180
|
|
177
181
|
log 'Signature files:'
|
Binary file
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'zip'
|
2
|
+
|
3
|
+
module Calabash
|
4
|
+
module Utils
|
5
|
+
def self.with_silent_zip(&block)
|
6
|
+
previous_value = false
|
7
|
+
|
8
|
+
if Zip.respond_to?(:warn_invalid_date)
|
9
|
+
previous_value = Zip.warn_invalid_date
|
10
|
+
end
|
11
|
+
|
12
|
+
if Zip.respond_to?(:warn_invalid_date=)
|
13
|
+
Zip.warn_invalid_date = false
|
14
|
+
end
|
15
|
+
|
16
|
+
r = block.call
|
17
|
+
|
18
|
+
if Zip.respond_to?(:warn_invalid_date=)
|
19
|
+
Zip.warn_invalid_date = previous_value
|
20
|
+
end
|
21
|
+
|
22
|
+
r
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-android
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.3
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Maturana Larsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -367,6 +367,7 @@ files:
|
|
367
367
|
- lib/calabash-android/text_helpers.rb
|
368
368
|
- lib/calabash-android/touch_helpers.rb
|
369
369
|
- lib/calabash-android/usage_tracker.rb
|
370
|
+
- lib/calabash-android/utils.rb
|
370
371
|
- lib/calabash-android/version.rb
|
371
372
|
- lib/calabash-android/wait_helpers.rb
|
372
373
|
homepage: http://github.com/calabash
|
@@ -384,9 +385,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
384
385
|
version: '0'
|
385
386
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
386
387
|
requirements:
|
387
|
-
- - "
|
388
|
+
- - ">="
|
388
389
|
- !ruby/object:Gem::Version
|
389
|
-
version:
|
390
|
+
version: '0'
|
390
391
|
requirements: []
|
391
392
|
rubyforge_project:
|
392
393
|
rubygems_version: 2.5.1
|