calabash-android 0.8.3.pre1 → 0.8.3

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: 97aa1dc145aa4f9b5f9779e4ae5158f6a5b56d67
4
- data.tar.gz: ee6b5bc3397b291bacfb4b5833f1b13eb35d6485
3
+ metadata.gz: ca873f3c4e04e5159b56bf21503fdaf167d7614c
4
+ data.tar.gz: cb0157cefcf4aafd01489113c0958d58efc07a62
5
5
  SHA512:
6
- metadata.gz: b734dde4121260d8ca34fb278ad7fb2cb47de78b9d88086829aa0da73cb693caf2faff0d355b807fe9d8cf66618f492626b5fbb35e63eea348054f1efb4b85b9
7
- data.tar.gz: afe3a8e5a0bdc21abc3c33d221b75a4be20b92e0575ca64a5a1db22eab0b47b11b3d67a586249d90be38bc751f90df20ef230f1baab805b82376d4e4eb0a9d26
6
+ metadata.gz: 5c77edda67a7f6fd6d38afb3840ded78f8bbc53d6edf97069a1d43d98fee4d3f351fd79edf181ddeef6cf7c0003afd3f771e9558e21f3f3f5647044771541745
7
+ data.tar.gz: 5d846e747e8cea8a9511bb1cc19e216c9174eb151222f6d023165bc36d4f1cf60bdb9d097c62ad376fe9977995cb7446db537b2eb7005d48876b3996068f28ad
data/bin/calabash-android CHANGED
@@ -53,6 +53,7 @@ else
53
53
  print_help
54
54
  when 'build'
55
55
  require 'calabash-android/helpers'
56
+ require 'calabash-android/utils'
56
57
  require 'calabash-android/java_keystore'
57
58
  require 'calabash-android/env'
58
59
  require File.join(File.dirname(__FILE__), "calabash-android-build")
@@ -50,20 +50,22 @@ def calabash_build(app)
50
50
  raise "Could not create dummy.apk"
51
51
  end
52
52
 
53
- Zip::File.new("dummy.apk").extract("AndroidManifest.xml","customAndroidManifest.xml")
54
- Zip::File.open("TestServer.apk") do |zip_file|
55
- begin
56
- check_file("AndroidManifest.xml")
57
- manifest_exists = true
58
- rescue
59
- manifest_exists = false
60
- end
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
- if manifest_exists
63
- zip_file.remove("AndroidManifest.xml")
64
- end
63
+ if manifest_exists
64
+ zip_file.remove("AndroidManifest.xml")
65
+ end
65
66
 
66
- zip_file.add("AndroidManifest.xml", "customAndroidManifest.xml")
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)
@@ -1,3 +1,4 @@
1
+ require 'calabash-android/utils'
1
2
  require 'calabash-android/defaults'
2
3
  require 'calabash-android/environment'
3
4
  require 'calabash-android/dot_dir'
@@ -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
- Zip::File.foreach("app.apk") do |z|
173
- z.extract if /^META-INF\/\w+.(rsa|dsa)/i =~ z.name
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:'
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.8.3.pre1"
3
+ VERSION = "0.8.3"
4
4
  end
5
5
  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.pre1
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-10-29 00:00:00.000000000 Z
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: 1.3.1
390
+ version: '0'
390
391
  requirements: []
391
392
  rubyforge_project:
392
393
  rubygems_version: 2.5.1