calabash-android 0.4.20.1 → 0.4.21

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: b7b0d84d684430e76dfc27b330c8e567f47cec6c
4
- data.tar.gz: 753e03eb7a7f227884b28cd9c6622cd6e23f6d88
3
+ metadata.gz: 43b8dcda7072c6944d82365d151d11052463b5c4
4
+ data.tar.gz: da40aff0c461c6bce7011e3d4a7fae1281beeba2
5
5
  SHA512:
6
- metadata.gz: c97afb2845b6f2215d3c557942cf88128e43e482cf20473e39d519af59795691b2810d4899acf8c0f2ca294eb94926139919281390b9154decc8b882be090a87
7
- data.tar.gz: aa63479c8d7800b836966df6930e086c020925122d5050253e3a520e0c36785704458dc44ab7c0d1a1dfd5791339c2d7995b1545c497bf973d573091369fe4ed
6
+ metadata.gz: 14d7430659fd654c027ae8ff297a3e35ee86dba012c5881cb00ca29f6e6ab2853b3ac3c49d22cb1ebe1ced065efd216b3e337080758f1d6686a0181eff90bf9f
7
+ data.tar.gz: 40b84d01df98f2f9061e1138258aff22be91f785e4f91ba3b327dc96324e51f4de5b3cb2dd3c43ff5a3d12565c2bd41bc524cdd71e18ad6e01114be915fef94d
@@ -1,7 +1,9 @@
1
1
  def calabash_console(app_path = nil)
2
2
  test_server_path = test_server_path(app_path)
3
3
 
4
- ENV["IRBRC"] = File.join(File.dirname(__FILE__), '..', 'irbrc')
4
+ unless ENV['IRBRC']
5
+ ENV['IRBRC'] = File.join(File.dirname(__FILE__), '..', 'irbrc')
6
+ end
5
7
 
6
8
  unless ENV["MAIN_ACTIVITY"]
7
9
  ENV["MAIN_ACTIVITY"] = main_activity(app_path)
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency( "slowhandcuke" )
22
22
  s.add_dependency( "rubyzip", "~> 0.9.9" )
23
23
  s.add_dependency( "awesome_print" )
24
- s.add_dependency( 'httpclient', '~> 2.3')
24
+ s.add_dependency( 'httpclient', '~> 2.3.2')
25
25
  s.add_dependency( 'xamarin-test-cloud', '>= 0.9.23')
26
26
  s.add_dependency( 'escape', '~> 0.0.4')
27
27
  end
@@ -22,7 +22,7 @@ def main_activity(app)
22
22
  end
23
23
 
24
24
  def aapt_dump(app, key)
25
- lines = `#{Env.tools_dir}/aapt dump badging "#{app}"`.lines.collect(&:strip)
25
+ lines = `"#{Env.tools_dir}/aapt" dump badging "#{app}"`.lines.collect(&:strip)
26
26
  lines.select { |l| l.start_with?("#{key}:") }
27
27
  end
28
28
 
@@ -60,11 +60,11 @@ def resign_apk(app_path)
60
60
  end
61
61
 
62
62
  def unsign_apk(path)
63
- files_to_remove = `#{Env.tools_dir}/aapt list "#{path}"`.lines.collect(&:strip).grep(/^META-INF\//)
63
+ files_to_remove = `"#{Env.tools_dir}/aapt" list "#{path}"`.lines.collect(&:strip).grep(/^META-INF\//)
64
64
  if files_to_remove.empty?
65
65
  log "App wasn't signed. Will not try to unsign it."
66
66
  else
67
- system("#{Env.tools_dir}/aapt remove \"#{path}\" #{files_to_remove.join(" ")}")
67
+ system("\"#{Env.tools_dir}/aapt\" remove \"#{path}\" #{files_to_remove.join(" ")}")
68
68
  end
69
69
  end
70
70
 
@@ -3,7 +3,7 @@ class JavaKeystore
3
3
  def initialize(location, keystore_alias, password)
4
4
  raise "No such file #{location}" unless File.exists?(File.expand_path(location))
5
5
 
6
- keystore_data = system_with_stdout_on_success(Env.keytool_path, '-list', '-v', '-alias', keystore_alias, '-keystore', location, '-storepass', password, '-J-Dfile.encoding=utf-8')
6
+ keystore_data = system_with_stdout_on_success(Env.keytool_path, '-list', '-v', '-alias', keystore_alias, '-keystore', location, '-storepass', password, '-J"-Dfile.encoding=utf-8"')
7
7
  if keystore_data.nil?
8
8
  error = "Could not list certificates in keystore. Probably because the password was incorrect."
9
9
  @errors = [{:message => error}]
@@ -65,7 +65,7 @@ class JavaKeystore
65
65
  [
66
66
  read_keystore_with_default_password_and_alias(File.join(ENV["HOME"], "/.android/debug.keystore")),
67
67
  read_keystore_with_default_password_and_alias("debug.keystore"),
68
- read_keystore_with_default_password_and_alias(File.join(ENV["HOME"], ".local/share/Xamarin/Mono\ for\ Android/debug.keystore")),
68
+ read_keystore_with_default_password_and_alias(File.join(ENV["HOME"], ".local/share/Xamarin/Mono\\ for\\ Android/debug.keystore")),
69
69
  read_keystore_with_default_password_and_alias(File.join(ENV["HOME"], "AppData/Local/Xamarin/Mono for Android/debug.keystore")),
70
70
  ].compact
71
71
  end
@@ -86,4 +86,4 @@ class JavaKeystore
86
86
  raise "Found .calabash_settings but no #{key} defined." unless map[key]
87
87
  end
88
88
 
89
- end
89
+ end
@@ -22,7 +22,7 @@ module Operations
22
22
  include Calabash::Android::TouchHelpers
23
23
 
24
24
  def current_activity
25
- `#{default_device.adb_command} shell dumpsys window windows`.each_line.grep(/mFocusedApp.+[\.\/]([^.\/\}]+)\}/){$1}.first
25
+ `#{default_device.adb_command} shell dumpsys window windows`.each_line.grep(/mFocusedApp.+[\.\/]([^.\s\/\}]+)/){$1}.first
26
26
  end
27
27
 
28
28
  def log(message)
@@ -321,7 +321,6 @@ module Operations
321
321
 
322
322
 
323
323
  def make_http_request(options)
324
- body = nil
325
324
  begin
326
325
  unless @http
327
326
  @http = init_request(options)
@@ -330,11 +329,14 @@ module Operations
330
329
  header["Content-Type"] = "application/json;charset=utf-8"
331
330
  options[:header] = header
332
331
 
333
- if options[:method] == :post
334
- body = @http.post(options[:uri], options).body
332
+
333
+ response = if options[:method] == :post
334
+ @http.post(options[:uri], options)
335
335
  else
336
- body = @http.get(options[:uri], options).body
336
+ @http.get(options[:uri], options)
337
337
  end
338
+ raise Errno::ECONNREFUSED if response.status_code == 502
339
+ response.body
338
340
  rescue Exception => e
339
341
  if @http
340
342
  @http.reset_all
@@ -342,7 +344,6 @@ module Operations
342
344
  end
343
345
  raise e
344
346
  end
345
- body
346
347
  end
347
348
 
348
349
  def init_request(options)
@@ -553,7 +554,12 @@ module Operations
553
554
 
554
555
  def shutdown_test_server
555
556
  begin
556
- http("/kill")
557
+ begin
558
+ http("/kill")
559
+ rescue HTTPClient::KeepAliveDisconnected
560
+ # Do not react if the server is not responding
561
+ end
562
+
557
563
  Timeout::timeout(3) do
558
564
  sleep 0.3 while app_running?
559
565
  end
@@ -1,5 +1,5 @@
1
1
  module Calabash
2
2
  module Android
3
- VERSION = "0.4.20.1"
3
+ VERSION = "0.4.21"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,139 +1,139 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calabash-android
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.20.1
4
+ version: 0.4.21
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: 2015-01-11 00:00:00.000000000 Z
11
+ date: 2014-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: retriable
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.3.3.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.3.3.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: slowhandcuke
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubyzip
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.9.9
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.9.9
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: awesome_print
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: httpclient
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
- version: '2.3'
103
+ version: 2.3.2
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
- version: '2.3'
110
+ version: 2.3.2
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: xamarin-test-cloud
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: 0.9.23
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: 0.9.23
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: escape
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ~>
130
130
  - !ruby/object:Gem::Version
131
131
  version: 0.0.4
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ~>
137
137
  - !ruby/object:Gem::Version
138
138
  version: 0.0.4
139
139
  description: 'calabash-android drives tests for native and hybrid Android apps. '
@@ -144,7 +144,7 @@ executables:
144
144
  extensions: []
145
145
  extra_rdoc_files: []
146
146
  files:
147
- - ".calabash_settings"
147
+ - .calabash_settings
148
148
  - CHANGES.txt
149
149
  - Gemfile
150
150
  - Gemfile.lock
@@ -177,7 +177,6 @@ files:
177
177
  - lib/calabash-android/helpers.rb
178
178
  - lib/calabash-android/java_keystore.rb
179
179
  - lib/calabash-android/lib/AXMLPrinter2.jar
180
- - lib/calabash-android/lib/TestServer.apk
181
180
  - lib/calabash-android/lib/manifest_extractor.jar
182
181
  - lib/calabash-android/lib/screenshotTaker.jar
183
182
  - lib/calabash-android/management/adb.rb
@@ -207,8 +206,6 @@ files:
207
206
  - lib/calabash-android/wait_helpers.rb
208
207
  - test-server/AndroidManifest.xml
209
208
  - test-server/build.xml
210
- - test-server/calabash-js/src/calabash.js
211
- - test-server/calabash-js/src/set_text.js
212
209
  - test-server/instrumentation-backend/.classpath
213
210
  - test-server/instrumentation-backend/.gitignore
214
211
  - test-server/instrumentation-backend/.project
@@ -877,6 +874,9 @@ files:
877
874
  - test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/TokenBuffer.java
878
875
  - test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/VersionUtil.java
879
876
  - test-server/instrumentation-backend/src/sh/calaba/org/codehaus/jackson/util/package-info.java
877
+ - test-server/calabash-js/src/calabash.js
878
+ - test-server/calabash-js/src/set_text.js
879
+ - lib/calabash-android/lib/TestServer.apk
880
880
  homepage: http://github.com/calabash
881
881
  licenses: []
882
882
  metadata: {}
@@ -886,19 +886,18 @@ require_paths:
886
886
  - lib
887
887
  required_ruby_version: !ruby/object:Gem::Requirement
888
888
  requirements:
889
- - - ">="
889
+ - - '>='
890
890
  - !ruby/object:Gem::Version
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
896
  version: '0'
897
897
  requirements: []
898
898
  rubyforge_project:
899
- rubygems_version: 2.2.2
899
+ rubygems_version: 2.1.10
900
900
  signing_key:
901
901
  specification_version: 4
902
902
  summary: Client for calabash-android for automated functional testing on Android
903
903
  test_files: []
904
- has_rdoc: