calabash-android 0.4.10.pre4 → 0.4.10.pre5

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: 2016ab45c236a69628ab4c101eedf7cccf52f426
4
- data.tar.gz: 4b7901137d75df7b77d261b1e2e08875c89caf6d
3
+ metadata.gz: 017f52b14925f58529882401113f92b0afc693fa
4
+ data.tar.gz: 9066c76aaf892a2943a2d6b74e2e74a3b6195330
5
5
  SHA512:
6
- metadata.gz: f617ea30eecbd662873fdfdba9b054d7ce6e2f1f1633e58b7b45c85543b6b5e6c6b87df8462f823811a7790e74653bfc1cc2397a31468683bb33b656872568df
7
- data.tar.gz: f27a5f2d7e9956a0e15c97e8a38190df854d0de9d9d92d650f6629d8a1492c0a6ea3db2511a52756203bcf5790a891c5868e99125342cf716cf07159f3174588
6
+ metadata.gz: 19e6c4a8c15d4b751af388a461608ab78856e636070cf6bf26bb7ec1e006d8934429bde9fc292bc89908b7d28607e25e661279567c90bc3bf5f7321103cf1534
7
+ data.tar.gz: 1266df306d47f531dfb4e89008cfa151ea09db787bbe7b12049024524851cd5d3ce5fb158b2ff4e842fa3125de08a3727b233b5aa3105af316cb5099b4353114
@@ -37,7 +37,16 @@ class Env
37
37
  end
38
38
 
39
39
  def self.android_home_path
40
- ENV["ANDROID_HOME"]
40
+ return ENV["ANDROID_HOME"] if ENV["ANDROID_HOME"]
41
+ monodroid_config_file = File.expand_path("~/.config/xbuild/monodroid-config.xml")
42
+ if File.exists?(monodroid_config_file)
43
+ require 'rexml/document'
44
+ begin
45
+ return REXML::Document.new(IO.read(monodroid_config_file)).elements["//android-sdk"].attributes["path"]
46
+ rescue
47
+ end
48
+ end
49
+ nil
41
50
  end
42
51
 
43
52
  def self.android_platform_path
@@ -3,7 +3,6 @@ require 'rexml/document'
3
3
  require 'rexml/xpath'
4
4
  require 'zip/zip'
5
5
  require 'tempfile'
6
- require 'open3'
7
6
  require 'escape'
8
7
  require 'rbconfig'
9
8
  require 'calabash-android/java_keystore'
@@ -26,17 +26,10 @@ class JavaKeystore
26
26
  end
27
27
 
28
28
  def system_with_stdout_on_success(cmd, *args)
29
- args = args.clone.unshift cmd
30
-
31
- out, err = nil, nil
32
- cmd = Escape.shell_command(args)
33
- log "Command: #{cmd}"
34
- status = Open3::popen3(cmd) do |stdin, stdout, stderr, wait_thread|
35
- out = stdout.read
36
- err = stderr.read
37
- wait_thread.value
38
- end
39
- if status == 0
29
+ cmd = "#{cmd} #{Escape.shell_command(args)}"
30
+ log cmd
31
+ out = `#{cmd}`
32
+ if $?.exitstatus == 0
40
33
  out
41
34
  else
42
35
  nil
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.4.10.pre4"
3
+ VERSION = "0.4.10.pre5"
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.10.pre4
4
+ version: 0.4.10.pre5
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-09-17 00:00:00.000000000 Z
11
+ date: 2013-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber