run_loop 2.6.1 → 2.6.2

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: 7f00cee8c90cd8c3049f5a5693e6d5e9abf3cb8f
4
- data.tar.gz: 17614a33b8dc5aeaf39c2ed3275b0f098fbe78a9
3
+ metadata.gz: d157fb1a0866b6105c1dfef4bd804f772b5f53dc
4
+ data.tar.gz: 073d5eebb4852b48cd5dc0f9b0d4cc9fa52b61ee
5
5
  SHA512:
6
- metadata.gz: b1af2d36da8009c56bdc68d7971ccc190bd560857483129dbb6b3ee7f3501ef61c2be04ecf301dddf78cea622f15540efb90ab72f6c2ae4e818a8196a060e24d
7
- data.tar.gz: c4bbc74972a5f6e87e0fb19b32113a9baa7006db74e903597bffa56eebc8c893ceac3496ff35ce750a4b1d91dfa686c333b07e574ced2f8e6af6b1713202b534
6
+ metadata.gz: 95e5a217258365b50639ca76cbc1c4632b497477319df3b006019c40b80438fed4e8d168bdb75e75e7f8776eb275ae2437b8aa582b5c726de5ece39c6964cb54
7
+ data.tar.gz: b21e59f88359d74e7873d74bc872432d0e95ca6045dbf02868e6771d22effa9856c2fb2ee0da371d48546c79b0dfa412cb01af10fd26868fe6e424e6d10c8ede
data/lib/run_loop/core.rb CHANGED
@@ -320,7 +320,11 @@ Logfile: #{log_file}
320
320
  # version.
321
321
  def self.default_simulator(xcode=RunLoop::Xcode.new)
322
322
 
323
- if xcode.version_gte_90?
323
+ if xcode.version_gte_92?
324
+ "iPhone 7 (11.2)"
325
+ elsif xcode.version_gte_91?
326
+ "iPhone 7 (11.1)"
327
+ elsif xcode.version_gte_90?
324
328
  "iPhone 7 (11.0)"
325
329
  elsif xcode.version_gte_83?
326
330
  "iPhone 7 (10.3)"
@@ -506,7 +506,7 @@ INSTANCE METHODS
506
506
  # ]
507
507
  # ```
508
508
  #
509
- # @see http://masilotti.com/xctest-documentation/Constants/XCUIElementType.html
509
+ # @see https://developer.apple.com/documentation/xctest/xcuielementtype
510
510
  # @param [Hash] uiquery A hash describing the query.
511
511
  # @return [Array<Hash>] An array of elements matching the `uiquery`.
512
512
  def query(uiquery)
@@ -26,6 +26,25 @@ module RunLoop
26
26
  :timeout => RunLoop::Environment.ci? ? 40 : 20
27
27
  }
28
28
 
29
+ # Options for controlling dylib injection
30
+ #
31
+ # You can override these values if they do not work in your environment.
32
+ #
33
+ # For cucumber users, the best place to override would be in your
34
+ # features/support/env.rb.
35
+ #
36
+ # For example:
37
+ #
38
+ # RunLoop::DylibInjector::OPTIONS[:injection_delay] = 10.0
39
+ OPTIONS = {
40
+ # Starting in Xcode 9, some apps need additional time to launch
41
+ # completely.
42
+ #
43
+ # If lldb interupts the app before it can accept a 'dlopen' command,
44
+ # the app will never finish launching - even on a retry.
45
+ injection_delay: RunLoop::Environment.ci? ? 1.0 : 5.0
46
+ }
47
+
29
48
  # Extracts the value of :inject_dylib from options Hash.
30
49
  # @param options [Hash] arguments passed to {RunLoop.run}
31
50
  # @return [String, nil] If the options contains :inject_dylibs and it is a
@@ -125,6 +144,10 @@ Expected :inject_dylib to be a path to a dylib, but found '#{inject_dylib}'
125
144
  end
126
145
 
127
146
  def retriable_inject_dylib(options={})
147
+ delay = OPTIONS[:injection_delay]
148
+ RunLoop.log_debug("Delaying dylib injection by #{delay} seconds to allow app to finish launching")
149
+ sleep(delay)
150
+
128
151
  merged_options = RETRY_OPTIONS.merge(options)
129
152
 
130
153
  tries = merged_options[:tries]
@@ -26,6 +26,8 @@ module RunLoop
26
26
  Errno::ECONNABORTED,
27
27
  # The foreign function call call timed out
28
28
  #Errno::ETIMEDOUT
29
+
30
+ Errno::EHOSTUNREACH
29
31
  ]
30
32
 
31
33
  # @!visibility private
@@ -1,5 +1,5 @@
1
1
  module RunLoop
2
- VERSION = "2.6.1"
2
+ VERSION = "2.6.2"
3
3
 
4
4
  # A model of a software release version that can be used to compare two versions.
5
5
  #
@@ -155,6 +155,18 @@ module RunLoop
155
155
  Version.compare(self, other) >= 0
156
156
  end
157
157
 
158
+ # Compare version `a` to version `b`.
159
+ #
160
+ # @example
161
+ # compare Version.new(0.10.0), Version.new(0.9.0) => 1
162
+ # compare Version.new(0.9.0), Version.new(0.10.0) => -1
163
+ # compare Version.new(0.9.0), Version.new(0.9.0) => 0
164
+ #
165
+ # @return [Integer] an integer `(-1, 1)`
166
+ def <=> (other)
167
+ Version.compare(self, other)
168
+ end
169
+
158
170
  # Compare version `a` to version `b`.
159
171
  #
160
172
  # @example
@@ -26,6 +26,22 @@ module RunLoop
26
26
  to_s
27
27
  end
28
28
 
29
+ # Returns a version instance for Xcode 9.2; used to check for the
30
+ # availability of features and paths to various items on the filesystem
31
+ #
32
+ # @return [RunLoop::Version] 9.2
33
+ def v92
34
+ fetch_version(:v92)
35
+ end
36
+
37
+ # Returns a version instance for Xcode 9.1; used to check for the
38
+ # availability of features and paths to various items on the filesystem
39
+ #
40
+ # @return [RunLoop::Version] 9.1
41
+ def v91
42
+ fetch_version(:v91)
43
+ end
44
+
29
45
  # Returns a version instance for Xcode 9.0; used to check for the
30
46
  # availability of features and paths to various items on the filesystem
31
47
  #
@@ -154,6 +170,20 @@ module RunLoop
154
170
  fetch_version(:v50)
155
171
  end
156
172
 
173
+ # Is the active Xcode version 9.1 or above?
174
+ #
175
+ # @return [Boolean] `true` if the current Xcode version is >= 9.2
176
+ def version_gte_92?
177
+ version >= v92
178
+ end
179
+
180
+ # Is the active Xcode version 9.1 or above?
181
+ #
182
+ # @return [Boolean] `true` if the current Xcode version is >= 9.1
183
+ def version_gte_91?
184
+ version >= v91
185
+ end
186
+
157
187
  # Is the active Xcode version 9.0 or above?
158
188
  #
159
189
  # @return [Boolean] `true` if the current Xcode version is >= 9.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: run_loop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-09-22 00:00:00.000000000 Z
12
+ date: 2017-11-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -415,7 +415,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
415
415
  version: '0'
416
416
  requirements: []
417
417
  rubyforge_project:
418
- rubygems_version: 2.6.11
418
+ rubygems_version: 2.6.14
419
419
  signing_key:
420
420
  specification_version: 4
421
421
  summary: The bridge between Calabash iOS and Xcode command-line tools like instruments