calabash-android 0.4.14 → 0.4.15.pre1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 686ce444b80c0168765d702520f076e25095a850
4
- data.tar.gz: 8c3bad5660092c992bdd8518fcd16ee26527d06d
3
+ metadata.gz: d5eae7958aa42bb890bce213080b57a787677f4b
4
+ data.tar.gz: 6c053a02a4974b3b87738453e9f516a9ea4927e4
5
5
  SHA512:
6
- metadata.gz: 52c6a0381bf2359c784a8ec11413153badb6eb830a66665f275438f1c5b9253c3efe6ca0bfef4a34ee1e8c9f44600d27d76135980a123d4e594892e960a1355b
7
- data.tar.gz: e73d5547c021d178dae00c4fb7aaef7aa200175527d5f62fcb419d57b395624239401c713180e19246fdc9640f00eb2a14bdd3e34ef3fbb784c784e9a4c49158
6
+ metadata.gz: a53197a47f6009f6cf5b1f6017df9065396bd4aad5e5c97dcac0dcb5fe03dfb81513202a4c9ebf1049f0a54f8a938c7ce256a44c9f51ca54ab7b7a87e4fc82d0
7
+ data.tar.gz: 19dfb707600e501ff59abb80f8fb0cbb881d32658b376cbe4be6fe9f912c75a903c0f969b16f7130f5cd3bc1c24ce25e7108977e33a4f23d24cc3e644eebe80c
@@ -99,6 +99,7 @@ elsif cmd == 'extract-manifest'
99
99
 
100
100
  puts manifest ARGV.first
101
101
  elsif cmd == 'resign'
102
+ Env.exit_if_env_not_set_up
102
103
  unless File.exist?(File.expand_path(ARGV.first))
103
104
  puts "No such file #{ARGV.first}"
104
105
  exit 1
@@ -41,13 +41,18 @@ class Env
41
41
  "\"#{jdk_path}/bin/#{jarsigner_executable}\""
42
42
  end
43
43
 
44
+ def self.java_path
45
+ find_executable_on_path(java_executable) ||
46
+ "\"#{jdk_path}/bin/#{java_executable}\""
47
+ end
48
+
44
49
  def self.jdk_path
45
50
  path_if_jdk(ENV['JAVA_HOME']) ||
46
51
  if is_windows?
47
52
  path_if_jdk(read_registry(::Win32::Registry::HKEY_LOCAL_MACHINE, 'SOFTWARE\\JavaSoft\\Java Development Kit\\1.7', 'JavaHome')) ||
48
53
  path_if_jdk(read_registry(::Win32::Registry::HKEY_LOCAL_MACHINE, 'SOFTWARE\\JavaSoft\\Java Development Kit\\1.6', 'JavaHome'))
49
54
  else
50
- path_if_android_home(read_attribute_from_monodroid_config('java-sdk', 'path'))
55
+ path_if_jdk(read_attribute_from_monodroid_config('java-sdk', 'path'))
51
56
  end
52
57
  end
53
58
 
@@ -76,6 +81,10 @@ class Env
76
81
  def self.jarsigner_executable
77
82
  is_windows? ? 'jarsigner.exe' : 'jarsigner'
78
83
  end
84
+
85
+ def self.java_executable
86
+ is_windows? ? 'java.exe' : 'java'
87
+ end
79
88
 
80
89
  def self.keytool_executable
81
90
  is_windows? ? 'keytool.exe' : 'keytool'
@@ -34,7 +34,7 @@ def manifest(app)
34
34
  manifest_file = File.join(out_path, 'AndroidManifest.xml')
35
35
  unless File.size?(manifest_file)
36
36
  manifest_extractor = File.join(File.expand_path(File.dirname(__FILE__)),'lib', 'apktool-cli-1.5.3-SNAPSHOT.jar')
37
- output = `java -jar "#{manifest_extractor}" d -s --frame-path "#{framework_path(app)}" -f "#{app}" #{out_path} 2>&1`
37
+ output = `#{Env.java_path} -jar "#{manifest_extractor}" d -s --frame-path "#{framework_path(app)}" -f "#{app}" #{out_path} 2>&1`
38
38
  raise "Unable to extract manifest: #{output}" unless File.size?(manifest_file)
39
39
  # Tidy up a bit. It would be nice if apktool could just dump the manifest alone.
40
40
  FileUtils.rm_rf(%w{res assets classes.dex}.map {|f| File.join(out_path, f) })
@@ -78,7 +78,7 @@ def resign_apk(app_path)
78
78
  unsigned_path = File.join(tmp_dir, 'unsigned.apk')
79
79
  FileUtils.cp(app_path, unsigned_path)
80
80
 
81
- `java -jar "#{File.dirname(__FILE__)}/lib/unsign.jar" "#{unsigned_path}"`
81
+ `#{Env.java_path} -jar "#{File.dirname(__FILE__)}/lib/unsign.jar" "#{unsigned_path}"`
82
82
 
83
83
  sign_apk(unsigned_path, app_path)
84
84
  end
@@ -29,7 +29,8 @@ class JavaKeystore
29
29
  end
30
30
 
31
31
  def system_with_stdout_on_success(cmd, *args)
32
- cmd = "#{cmd} #{Escape.shell_command(args)}"
32
+ a = Escape.shell_command(args)
33
+ cmd = "#{cmd} #{a.gsub("'", '"')}"
33
34
  log cmd
34
35
  out = `#{cmd}`
35
36
  if $?.exitstatus == 0
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.4.14"
3
+ VERSION = "0.4.15.pre1"
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.4.14
4
+ version: 0.4.15.pre1
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: 2013-10-02 00:00:00.000000000 Z
11
+ date: 2013-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -891,12 +891,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
891
891
  version: '0'
892
892
  required_rubygems_version: !ruby/object:Gem::Requirement
893
893
  requirements:
894
- - - '>='
894
+ - - '>'
895
895
  - !ruby/object:Gem::Version
896
- version: '0'
896
+ version: 1.3.1
897
897
  requirements: []
898
898
  rubyforge_project:
899
- rubygems_version: 2.0.5
899
+ rubygems_version: 2.1.5
900
900
  signing_key:
901
901
  specification_version: 4
902
902
  summary: Client for calabash-android for automated functional testing on Android