calabash-android 0.7.3.pre3 → 0.7.3.preintentstart1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b318f68b7441a38baf7bc4898677e13a9c40472a
|
4
|
+
data.tar.gz: 5e9e6c60c4978bada21a7e3d4768d80c2dcef8cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10c0579fba3fe651cf14fe860a7e46488697eb1720d45b0743e4152d3975370465e9bdda0fdc924b66cfdc77878fca7200bc15462c0806d3db1c80cd48bfc570
|
7
|
+
data.tar.gz: c90be72108c623261e7713e89f60be0d955170403042a8f6ca1b891999adf74c2612aeb7e5a13ab99347770768ead6d74306a787f8e61f915fe58298d2936116
|
Binary file
|
@@ -26,8 +26,6 @@ module Calabash
|
|
26
26
|
|
27
27
|
sleep(args.fetch(:hang_time))
|
28
28
|
monkey_touch(:up, to_x, to_y)
|
29
|
-
|
30
|
-
kill_existing_monkey_processes
|
31
29
|
end
|
32
30
|
|
33
31
|
def get_monkey_port
|
@@ -67,7 +65,6 @@ module Calabash
|
|
67
65
|
end
|
68
66
|
|
69
67
|
def kill_monkey_processes_on_device
|
70
|
-
perform_action('send_tcp', @@monkey_port, "quit", true) unless @@monkey_port.nil?
|
71
68
|
existing_monkey_pids.each do |pid|
|
72
69
|
`#{adb_command} shell kill -9 #{pid}`
|
73
70
|
end
|
@@ -105,7 +102,6 @@ module Calabash
|
|
105
102
|
start_monkey if should_start_monkey
|
106
103
|
monkey_touch(:down, x, y)
|
107
104
|
monkey_touch(:up, x, y)
|
108
|
-
kill_existing_monkey_processes
|
109
105
|
end
|
110
106
|
|
111
107
|
def monkey_touch(touch_type, x, y)
|
@@ -139,8 +139,8 @@ module Calabash module Android
|
|
139
139
|
default_device.push(local, remote)
|
140
140
|
end
|
141
141
|
|
142
|
-
def start_test_server_in_background(options={})
|
143
|
-
default_device.start_test_server_in_background(options)
|
142
|
+
def start_test_server_in_background(options={}, &block)
|
143
|
+
default_device.start_test_server_in_background(options, &block)
|
144
144
|
end
|
145
145
|
|
146
146
|
def shutdown_test_server
|
@@ -637,14 +637,15 @@ module Calabash module Android
|
|
637
637
|
raise "Could not push #{local} to #{remote}" unless system(cmd)
|
638
638
|
end
|
639
639
|
|
640
|
-
def start_test_server_in_background(options={})
|
640
|
+
def start_test_server_in_background(options={}, &block)
|
641
641
|
raise "Will not start test server because of previous failures." if ::Cucumber.wants_to_quit
|
642
642
|
|
643
643
|
if keyguard_enabled?
|
644
644
|
wake_up
|
645
645
|
end
|
646
646
|
|
647
|
-
env_options = options
|
647
|
+
env_options = options.clone
|
648
|
+
env_options.delete(:intent)
|
648
649
|
|
649
650
|
env_options[:target_package] ||= package_name(@app_path)
|
650
651
|
env_options[:main_activity] ||= main_activity(@app_path)
|
@@ -719,12 +720,26 @@ module Calabash module Android
|
|
719
720
|
|
720
721
|
log("Client and server versions match (client: #{client_version}, server: #{server_version}). Proceeding...")
|
721
722
|
|
723
|
+
block.call if block
|
724
|
+
|
725
|
+
start_application(options[:intent])
|
726
|
+
|
722
727
|
# What is Calabash tracking? Read this post for information
|
723
728
|
# No private data (like ip addresses) are collected
|
724
729
|
# https://github.com/calabash/calabash-android/issues/655
|
725
730
|
Calabash::Android::UsageTracker.new.post_usage_async
|
726
731
|
end
|
727
732
|
|
733
|
+
def start_application(intent)
|
734
|
+
result = JSON.parse(http("/start-application", {intent: intent.to_json}))
|
735
|
+
|
736
|
+
if result['outcome'] != 'SUCCESS'
|
737
|
+
raise result['detail']
|
738
|
+
end
|
739
|
+
|
740
|
+
result['result']
|
741
|
+
end
|
742
|
+
|
728
743
|
def shutdown_test_server
|
729
744
|
begin
|
730
745
|
http("/kill")
|
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.7.3.
|
4
|
+
version: 0.7.3.preintentstart1
|
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-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|