calabash-android 0.9.1.pre1 → 0.9.1.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/irbrc +36 -31
- data/lib/calabash-android/lib/TestServer.apk +0 -0
- data/lib/calabash-android/operations.rb +3 -7
- data/lib/calabash-android/text_helpers.rb +14 -0
- data/lib/calabash-android/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb527ede0676e2c566700c53984572883dde21ae
|
4
|
+
data.tar.gz: 9b13e1012370185f9c2369e0e65631354bb13fe7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 372f5ce062f0176201a9b67205020a70b959cfbfb89ccd2053fb223bec88739b4ac816be027110b52f87f5066a816eb2cfc03f6bf62e49eed431f15fa6d7ab8f
|
7
|
+
data.tar.gz: 6b2ecd546dfb0db66dfdfaa62735d9af30f103b5596d910ee6980015b6b580168f6fdd5187af6fb6aff376482c97564baa4cc48d84659fdfe7fe2b6b0270f9ba
|
data/irbrc
CHANGED
@@ -1,40 +1,45 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'irb/completion'
|
3
|
-
require 'irb/ext/save-history'
|
4
|
-
|
5
1
|
begin
|
6
|
-
require '
|
7
|
-
|
8
|
-
|
9
|
-
"#{e}",
|
10
|
-
'',
|
11
|
-
'Use bundler (recommended) or uninstall awesome_print.',
|
12
|
-
'',
|
13
|
-
'# Use bundler (recommended)',
|
14
|
-
'$ bundle update',
|
15
|
-
'$ bundle exec calabash-android console <path to apk>',
|
16
|
-
'',
|
17
|
-
'# Uninstall',
|
18
|
-
'$ gem update --system',
|
19
|
-
'$ gem uninstall -Vax --force --no-abort-on-dependent awesome_print']
|
20
|
-
puts msg
|
21
|
-
exit(1)
|
22
|
-
end
|
2
|
+
require 'rubygems'
|
3
|
+
require 'irb/completion'
|
4
|
+
require 'irb/ext/save-history'
|
23
5
|
|
24
|
-
|
6
|
+
begin
|
7
|
+
require 'awesome_print'
|
8
|
+
rescue LoadError => e
|
9
|
+
msg = ["Caught a LoadError: could not load 'awesome_print'",
|
10
|
+
"#{e}",
|
11
|
+
'',
|
12
|
+
'Use bundler (recommended) or uninstall awesome_print.',
|
13
|
+
'',
|
14
|
+
'# Use bundler (recommended)',
|
15
|
+
'$ bundle update',
|
16
|
+
'$ bundle exec calabash-android console <path to apk>',
|
17
|
+
'',
|
18
|
+
'# Uninstall',
|
19
|
+
'$ gem update --system',
|
20
|
+
'$ gem uninstall -Vax --force --no-abort-on-dependent awesome_print']
|
21
|
+
puts msg
|
22
|
+
exit(1)
|
23
|
+
end
|
25
24
|
|
26
|
-
|
27
|
-
"--prompt-mode",
|
28
|
-
"simple" ]
|
25
|
+
AwesomePrint.irb!
|
29
26
|
|
30
|
-
|
31
|
-
|
27
|
+
ARGV.concat [ "--readline",
|
28
|
+
"--prompt-mode",
|
29
|
+
"simple" ]
|
32
30
|
|
33
|
-
#
|
34
|
-
IRB.conf[:
|
31
|
+
# 50 entries in the list
|
32
|
+
IRB.conf[:SAVE_HISTORY] = 50
|
35
33
|
|
36
|
-
|
37
|
-
|
34
|
+
# Store results in home directory with specified file name
|
35
|
+
IRB.conf[:HISTORY_FILE] = ".irb-history"
|
36
|
+
|
37
|
+
require 'calabash-android/defaults'
|
38
|
+
require 'calabash-android/operations'
|
39
|
+
rescue Exception => e
|
40
|
+
puts "Error loading Calabash irbrc: #{e}"
|
41
|
+
exit(1)
|
42
|
+
end
|
38
43
|
|
39
44
|
module Calabash
|
40
45
|
module Android
|
Binary file
|
@@ -390,7 +390,7 @@ module Calabash module Android
|
|
390
390
|
|
391
391
|
def update_app(app_path)
|
392
392
|
if _sdk_version >= 23
|
393
|
-
cmd = "#{adb_command} install -
|
393
|
+
cmd = "#{adb_command} install -r -g \"#{app_path}\""
|
394
394
|
else
|
395
395
|
cmd = "#{adb_command} install -r \"#{app_path}\""
|
396
396
|
end
|
@@ -733,8 +733,8 @@ module Calabash module Android
|
|
733
733
|
log cmd
|
734
734
|
raise "Could not execute command to start test server" unless system("#{cmd} 2>&1")
|
735
735
|
|
736
|
-
Calabash::Android::Retry.retry :tries =>
|
737
|
-
raise "App did not start" unless app_running?
|
736
|
+
Calabash::Android::Retry.retry :tries => 600, :interval => 0.1 do
|
737
|
+
raise "App did not start see adb logcat for details" unless app_running?
|
738
738
|
end
|
739
739
|
|
740
740
|
begin
|
@@ -1122,10 +1122,6 @@ module Calabash module Android
|
|
1122
1122
|
ni
|
1123
1123
|
end
|
1124
1124
|
|
1125
|
-
def done
|
1126
|
-
ni
|
1127
|
-
end
|
1128
|
-
|
1129
1125
|
def find_scrollable_view(options={})
|
1130
1126
|
timeout = options[:timeout] || 30
|
1131
1127
|
|
@@ -41,10 +41,24 @@ module Calabash
|
|
41
41
|
perform_action("delete_surrounding_text", -1, 0)
|
42
42
|
end
|
43
43
|
|
44
|
+
def escape_backslashes(str)
|
45
|
+
backslash = "\\"
|
46
|
+
str.gsub(backslash, backslash*4)
|
47
|
+
end
|
48
|
+
|
49
|
+
def escape_newlines(str)
|
50
|
+
newline = "\n"
|
51
|
+
str.gsub(newline, "\\n")
|
52
|
+
end
|
53
|
+
|
44
54
|
def escape_quotes(str)
|
45
55
|
str.gsub("'", "\\\\'")
|
46
56
|
end
|
47
57
|
|
58
|
+
def escape_string(str)
|
59
|
+
escape_newlines(escape_quotes(escape_backslashes(str)))
|
60
|
+
end
|
61
|
+
|
48
62
|
# Sets the selection of the currently focused view.
|
49
63
|
#
|
50
64
|
# @param [Integer] selection_start The start of the selection, can be
|
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.9.1.
|
4
|
+
version: 0.9.1.pre2
|
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: 2017-
|
11
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|