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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 16fa5c6401f8d6fc80e1765035838c6da0a845f4
4
- data.tar.gz: 70c4b3a549a006e732e0c3203021493af1f80d7d
3
+ metadata.gz: bb527ede0676e2c566700c53984572883dde21ae
4
+ data.tar.gz: 9b13e1012370185f9c2369e0e65631354bb13fe7
5
5
  SHA512:
6
- metadata.gz: dc67ff6ce4574f02a9faba297575c4f221fa79fec2cdbbec2a46f5381a2612537cd9dbe28ba7bf27d193cef32fc00470035e85ae4aab8aa9edea3e2da45db89c
7
- data.tar.gz: 97c7ff888702fbf06809b5cac32fc621171fa3c968057ba927568451347ad84a9985aaa35926f50495fda5165d077e6a9683e5bebff817aaa20ad9c33a4020ae
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 'awesome_print'
7
- rescue LoadError => e
8
- msg = ["Caught a LoadError: could not load 'awesome_print'",
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
- AwesomePrint.irb!
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
- ARGV.concat [ "--readline",
27
- "--prompt-mode",
28
- "simple" ]
25
+ AwesomePrint.irb!
29
26
 
30
- # 50 entries in the list
31
- IRB.conf[:SAVE_HISTORY] = 50
27
+ ARGV.concat [ "--readline",
28
+ "--prompt-mode",
29
+ "simple" ]
32
30
 
33
- # Store results in home directory with specified file name
34
- IRB.conf[:HISTORY_FILE] = ".irb-history"
31
+ # 50 entries in the list
32
+ IRB.conf[:SAVE_HISTORY] = 50
35
33
 
36
- require 'calabash-android/defaults'
37
- require 'calabash-android/operations'
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
@@ -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 -rg \"#{app_path}\""
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 => 100, :interval => 0.1 do
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
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.9.1.pre1"
3
+ VERSION = "0.9.1.pre2"
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.9.1.pre1
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-02-08 00:00:00.000000000 Z
11
+ date: 2017-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber