run_loop 2.2.0 → 2.2.1

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: 6f2095590e37aa5d0f64ff1228e3208b9b5d7268
4
- data.tar.gz: 81f05bf8660ede87ed5e765a2ed507e6918b7f16
3
+ metadata.gz: 7f70f23c16823815e9b01ca4e967dcd8f065d4ff
4
+ data.tar.gz: 2d2b303201f7d2961dbb4a9f8947a2ab0638de3b
5
5
  SHA512:
6
- metadata.gz: 3c5529bb0db4415f540a42bcb90377f36abe1191a2a5089ab3ecd1e4b8ab22a96e614ec1269e318638997264a04ccb4da4d64b1e28e95b44d96ca01b3451f8e4
7
- data.tar.gz: 8c49531bea4964f77d36eb52eac7ed7ed31d3b2d9eb7256a75b82ae517b515abb25f3903a30b91057c92dd0c225e9eab9a66731409f79f598706ced3e10bd23d
6
+ metadata.gz: 2343195435e906556bfe720b75f66637a42b29e4f8aea669584793ad4a668002151210c75ac96d2856afd1b1aee3800afa255d1ec2a5cd0e79ce3e5709683adc
7
+ data.tar.gz: eea4a57f853d15eedfad0c710f889e5896dfa046ac45e7d4114df1c889f98a6d78cfc32948ebda371e48a26a726f756fbae4275812a13f48aa6b93a1815e2b16
data/lib/run_loop/core.rb CHANGED
@@ -316,14 +316,14 @@ Logfile: #{log_file}
316
316
  # Returns the a default simulator to target. This default needs to be one
317
317
  # that installed by default in the current Xcode version.
318
318
  #
319
- # For historical reasons, the most recent non-64b SDK should be used.
320
- #
321
319
  # @param [RunLoop::Xcode] xcode Used to detect the current xcode
322
320
  # version.
323
321
  def self.default_simulator(xcode=RunLoop::Xcode.new)
324
322
 
325
- if xcode.version_gte_8?
326
- "iPhone 6s (10.0)"
323
+ if xcode.version_gte_81?
324
+ "iPhone 7 (10.1)"
325
+ elsif xcode.version_gte_8?
326
+ "iPhone 7 (10.0)"
327
327
  elsif xcode.version_gte_73?
328
328
  "iPhone 6s (9.3)"
329
329
  elsif xcode.version_gte_72?
@@ -596,8 +596,12 @@ Command had no output
596
596
  timeout = DEFAULT_OPTIONS[:install_app_timeout]
597
597
  simctl.install(device, app, timeout)
598
598
 
599
- # Experimental: don't wait after the install
600
- # device.simulator_wait_for_stable_state
599
+ # On Xcode 7, we must wait. The app might not be installed otherwise. This
600
+ # is particularly true for iPads where the app bundle is installed, but
601
+ # SpringBoard does not detect the app has been installed.
602
+ #
603
+ # On Xcode 8, more testing is needed.
604
+ device.simulator_wait_for_stable_state
601
605
  installed_app_bundle_dir
602
606
  end
603
607
 
@@ -341,6 +341,8 @@ version: #{version}
341
341
  # the app and data container exists, but Springboard does not detect them.
342
342
  #
343
343
  # 6. 1 and 2 must hold for 1.5 seconds.
344
+ #
345
+ # TODO needs update for Xcode 8 + iOS 10 simulators.
344
346
  def simulator_wait_for_stable_state
345
347
 
346
348
  # How long to wait between stability checks.
@@ -374,7 +376,9 @@ version: #{version}
374
376
  # iOS 9 simulators have an additional boot screen.
375
377
  is_gte_ios9 = version >= RunLoop::Version.new('9.0')
376
378
 
377
- # iOS 9 iPad simulators need additional time to stabilize.
379
+ # iOS 9 iPad simulators need additional time to stabilize, especially
380
+ # to ensure that `simctl install` notifies SpringBoard that a new app
381
+ # has been installed.
378
382
  is_ipad = simulator_is_ipad?
379
383
 
380
384
  timeout = SIM_STABLE_STATE_OPTIONS[:timeout]
@@ -1359,6 +1359,33 @@ Valid values are: :down, :up, :right, :left, :bottom, :top
1359
1359
  end
1360
1360
  end
1361
1361
 
1362
+ # @!visibility private
1363
+ # Private method. Do not call.
1364
+ # Flattens the result of `tree`.
1365
+ def _flatten_tree
1366
+ result = []
1367
+ _flatten_tree_helper(tree, result)
1368
+ result
1369
+ end
1370
+
1371
+ # @!visibility private
1372
+ # Private method. Do not call.
1373
+ def _flatten_tree_helper(tree, accumulator_array)
1374
+ element_in_tree = {}
1375
+ tree.each_pair do |key, value|
1376
+ if key != "children"
1377
+ element_in_tree[key] = value
1378
+ end
1379
+ end
1380
+ accumulator_array.push(element_in_tree)
1381
+
1382
+ if tree.key?("children")
1383
+ tree["children"].each do |subtree|
1384
+ _flatten_tree_helper(subtree, accumulator_array)
1385
+ end
1386
+ end
1387
+ end
1388
+
1362
1389
  # @!visibility private
1363
1390
  # Private method. Do not call.
1364
1391
  def _dismiss_springboard_alerts
@@ -1,5 +1,5 @@
1
1
  module RunLoop
2
- VERSION = "2.2.0"
2
+ VERSION = "2.2.1"
3
3
 
4
4
  # A model of a software release version that can be used to compare two versions.
5
5
  #
@@ -24,6 +24,14 @@ module RunLoop
24
24
  to_s
25
25
  end
26
26
 
27
+ # Returns a version instance for `Xcode 8.1`; used to check for the
28
+ # availability of features and paths to various items on the filesystem.
29
+ #
30
+ # @return [RunLoop::Version] 8.1
31
+ def v81
32
+ fetch_version(:v81)
33
+ end
34
+
27
35
  # Returns a version instance for `Xcode 8.0`; used to check for the
28
36
  # availability of features and paths to various items on the filesystem.
29
37
  #
@@ -120,6 +128,13 @@ module RunLoop
120
128
  fetch_version(:v50)
121
129
  end
122
130
 
131
+ # Is the active Xcode version 8.1 or above?
132
+ #
133
+ # @return [Boolean] `true` if the current Xcode version is >= 8.0
134
+ def version_gte_81?
135
+ version >= v81
136
+ end
137
+
123
138
  # Is the active Xcode version 8.0 or above?
124
139
  #
125
140
  # @return [Boolean] `true` if the current Xcode version is >= 8.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.2.0
4
+ version: 2.2.1
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: 2016-09-12 00:00:00.000000000 Z
12
+ date: 2016-09-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -91,16 +91,22 @@ dependencies:
91
91
  name: httpclient
92
92
  requirement: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '2.6'
96
+ version: 2.7.1
97
+ - - "<"
98
+ - !ruby/object:Gem::Version
99
+ version: '3.0'
97
100
  type: :runtime
98
101
  prerelease: false
99
102
  version_requirements: !ruby/object:Gem::Requirement
100
103
  requirements:
101
- - - "~>"
104
+ - - ">="
102
105
  - !ruby/object:Gem::Version
103
- version: '2.6'
106
+ version: 2.7.1
107
+ - - "<"
108
+ - !ruby/object:Gem::Version
109
+ version: '3.0'
104
110
  - !ruby/object:Gem::Dependency
105
111
  name: i18n
106
112
  requirement: !ruby/object:Gem::Requirement
@@ -406,7 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
406
412
  version: '0'
407
413
  requirements: []
408
414
  rubyforge_project:
409
- rubygems_version: 2.5.1
415
+ rubygems_version: 2.6.6
410
416
  signing_key:
411
417
  specification_version: 4
412
418
  summary: The bridge between Calabash iOS and Xcode command-line tools like instruments