run_loop 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/run_loop/core.rb +3 -1
- data/lib/run_loop/core_simulator.rb +1 -0
- data/lib/run_loop/device.rb +0 -1
- data/lib/run_loop/device_agent/client.rb +0 -1
- data/lib/run_loop/directory.rb +38 -28
- data/lib/run_loop/version.rb +1 -1
- data/lib/run_loop/xcode.rb +43 -13
- data/scripts/lib/on_alert.js +9 -9
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 947320c824c62ac07552ca83078f17bec6f20425
|
4
|
+
data.tar.gz: edd982c791f9bd5e5ef5a926ff08cced5b8ec5df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfeefe0786de38e51d696edbc3cb819105eac8d014327e24289e58c8fed7eae02525566c0efb2ee414e856aabffc39cd52e2e998581563bfe7e8a06c24d7a730
|
7
|
+
data.tar.gz: 7ce7be2b5a314dd9e067388f17c0ad54a3933b7809cd6f2f96b3d6dc57a681f511baa2463295fdd19040f0f171c4979a2e4941c11366103e554dafd95f302411
|
data/lib/run_loop/core.rb
CHANGED
@@ -320,7 +320,9 @@ Logfile: #{log_file}
|
|
320
320
|
# version.
|
321
321
|
def self.default_simulator(xcode=RunLoop::Xcode.new)
|
322
322
|
|
323
|
-
if xcode.
|
323
|
+
if xcode.version_gte_83?
|
324
|
+
"iPhone 7 (10.3)"
|
325
|
+
elsif xcode.version_gte_82?
|
324
326
|
"iPhone 7 (10.2)"
|
325
327
|
elsif xcode.version_gte_81?
|
326
328
|
"iPhone 7 (10.1)"
|
@@ -460,6 +460,7 @@ Could not launch #{app.bundle_identifier} on #{device} after trying #{tries} tim
|
|
460
460
|
def reset_app_sandbox
|
461
461
|
return true if !app_is_installed?
|
462
462
|
|
463
|
+
RunLoop::CoreSimulator.quit_simulator
|
463
464
|
RunLoop::CoreSimulator.wait_for_simulator_state(device, "Shutdown")
|
464
465
|
|
465
466
|
reset_app_sandbox_internal
|
data/lib/run_loop/device.rb
CHANGED
data/lib/run_loop/directory.rb
CHANGED
@@ -73,11 +73,11 @@ found '#{handle_errors_by}'
|
|
73
73
|
|
74
74
|
#{e}
|
75
75
|
|
76
|
-
|
76
|
+
while trying to find the SHA of this file:
|
77
77
|
|
78
78
|
#{file}
|
79
79
|
|
80
|
-
|
80
|
+
This is not a fatal error; it can be ignored.
|
81
81
|
}
|
82
82
|
RunLoop.log_debug(message)
|
83
83
|
when :raising
|
@@ -135,32 +135,37 @@ found '#{handle_errors_by}'
|
|
135
135
|
|
136
136
|
def self.skip_file?(file, task, debug)
|
137
137
|
skip = false
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
138
|
+
begin
|
139
|
+
if File.directory?(file)
|
140
|
+
# Skip directories
|
141
|
+
skip = true
|
142
|
+
elsif !Pathname.new(file).exist?
|
143
|
+
# Skip broken symlinks
|
144
|
+
skip = true
|
145
|
+
elsif !File.exist?(file)
|
146
|
+
# Skip files that don't exist
|
147
|
+
skip = true
|
148
|
+
else
|
149
|
+
case File.ftype(file)
|
150
|
+
when 'fifo'
|
151
|
+
RunLoop.log_warn("#{task} IS SKIPPING FIFO #{file}") if debug
|
152
|
+
skip = true
|
153
|
+
when 'socket'
|
154
|
+
RunLoop.log_warn("#{task} IS SKIPPING SOCKET #{file}") if debug
|
155
|
+
skip = true
|
156
|
+
when 'characterSpecial'
|
157
|
+
RunLoop.log_warn("#{task} IS SKIPPING CHAR SPECIAL #{file}") if debug
|
158
|
+
skip = true
|
159
|
+
when 'blockSpecial'
|
160
|
+
skip = true
|
161
|
+
RunLoop.log_warn("#{task} SKIPPING BLOCK SPECIAL #{file}") if debug
|
162
|
+
else
|
163
|
+
end
|
163
164
|
end
|
165
|
+
rescue => e
|
166
|
+
skip = true
|
167
|
+
RunLoop.log_debug("Directory.skip_file? rescued an ignorable error.")
|
168
|
+
RunLoop.log_debug("#{e.class}: #{e.message}")
|
164
169
|
end
|
165
170
|
skip
|
166
171
|
end
|
@@ -170,7 +175,12 @@ found '#{handle_errors_by}'
|
|
170
175
|
size = 0
|
171
176
|
entries.each do |file|
|
172
177
|
unless self.skip_file?(file, "SIZE", debug)
|
173
|
-
|
178
|
+
begin
|
179
|
+
size = size + File.size(file)
|
180
|
+
rescue => e
|
181
|
+
RunLoop.log_debug("Directory.iterate_for_size? rescued an ignorable error.")
|
182
|
+
RunLoop.log_debug("#{e.class}: #{e.message}")
|
183
|
+
end
|
174
184
|
end
|
175
185
|
end
|
176
186
|
size
|
data/lib/run_loop/version.rb
CHANGED
data/lib/run_loop/xcode.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'open3'
|
2
|
-
|
3
1
|
module RunLoop
|
4
2
|
|
5
3
|
# A model of the active Xcode version.
|
@@ -12,7 +10,11 @@ module RunLoop
|
|
12
10
|
# `xcode-select` or overridden using the `DEVELOPER_DIR`.
|
13
11
|
class Xcode
|
14
12
|
|
13
|
+
require "run_loop/regex"
|
14
|
+
require "run_loop/shell"
|
15
|
+
|
15
16
|
include RunLoop::Regex
|
17
|
+
include RunLoop::Shell
|
16
18
|
|
17
19
|
# Returns a String representation.
|
18
20
|
def to_s
|
@@ -24,6 +26,14 @@ module RunLoop
|
|
24
26
|
to_s
|
25
27
|
end
|
26
28
|
|
29
|
+
# Returns a version instance for Xcode 8.3 ; used to check for the
|
30
|
+
# availability of features and paths to various items on the filesystem
|
31
|
+
#
|
32
|
+
# @return [RunLoop::Version] 8.3
|
33
|
+
def v83
|
34
|
+
fetch_version(:v83)
|
35
|
+
end
|
36
|
+
|
27
37
|
# Returns a version instance for Xcode 8.2 ; used to check for the
|
28
38
|
# availability of features and paths to various items on the filesystem
|
29
39
|
#
|
@@ -136,6 +146,13 @@ module RunLoop
|
|
136
146
|
fetch_version(:v50)
|
137
147
|
end
|
138
148
|
|
149
|
+
# Is the active Xcode version 8.3 or above?
|
150
|
+
#
|
151
|
+
# @return [Boolean] `true` if the current Xcode version is >= 8.3
|
152
|
+
def version_gte_83?
|
153
|
+
version >= v83
|
154
|
+
end
|
155
|
+
|
139
156
|
# Is the active Xcode version 8.2 or above?
|
140
157
|
#
|
141
158
|
# @return [Boolean] `true` if the current Xcode version is >= 8.2
|
@@ -234,12 +251,31 @@ module RunLoop
|
|
234
251
|
# @return [RunLoop::Version] The current version of Xcode as reported by
|
235
252
|
# `xcrun xcodebuild -version`.
|
236
253
|
def version
|
237
|
-
@xcode_version ||=
|
238
|
-
|
239
|
-
|
240
|
-
|
254
|
+
@xcode_version ||= begin
|
255
|
+
if RunLoop::Environment.xtc?
|
256
|
+
RunLoop::Version.new("0.0.0")
|
257
|
+
else
|
258
|
+
version = RunLoop::Version.new("0.0.0")
|
259
|
+
begin
|
260
|
+
args = ["xcrun", "xcodebuild", "-version"]
|
261
|
+
hash = run_shell_command(args)
|
262
|
+
if hash[:exit_status] != 0
|
263
|
+
RunLoop.log_error("xcrun xcodebuild -version exited non-zero")
|
264
|
+
else
|
265
|
+
out = hash[:out]
|
266
|
+
version_string = out.chomp[VERSION_REGEX, 0]
|
267
|
+
version = RunLoop::Version.new(version_string)
|
268
|
+
end
|
269
|
+
rescue RuntimeError => e
|
270
|
+
RunLoop.log_error(%Q[
|
271
|
+
Could not find Xcode version:
|
272
|
+
|
273
|
+
#{e.class}: #{e.message}
|
274
|
+
])
|
275
|
+
end
|
276
|
+
version
|
241
277
|
end
|
242
|
-
end
|
278
|
+
end
|
243
279
|
end
|
244
280
|
|
245
281
|
# Is this a beta version of Xcode?
|
@@ -333,12 +369,6 @@ $ man xcode-select
|
|
333
369
|
end
|
334
370
|
end
|
335
371
|
|
336
|
-
def execute_command(args)
|
337
|
-
Open3.popen3('xcrun', 'xcodebuild', *args) do |_, stdout, stderr, wait_thr|
|
338
|
-
yield stdout, stderr, wait_thr
|
339
|
-
end
|
340
|
-
end
|
341
|
-
|
342
372
|
def xcode_select_path
|
343
373
|
Open3.popen3('xcode-select', '--print-path') do |_, stdout, _, _|
|
344
374
|
stdout.read.chomp
|
data/scripts/lib/on_alert.js
CHANGED
@@ -132,15 +132,15 @@ function dutchLocalizations() {
|
|
132
132
|
}
|
133
133
|
|
134
134
|
function dutch_BE_Localizations() {
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
135
|
+
return [
|
136
|
+
["Sta toe", /toegang tot je locatie toestaan terwijl je de app gebruikt/],
|
137
|
+
["Sta toe", /toegang tot je locatie toestaan, zelfs als je de app niet gebruikt/],
|
138
|
+
["OK", /wil toegang tot je contacten/],
|
139
|
+
["OK", /wil toegang tot je agenda/],
|
140
|
+
["OK", /wil toegang tot je herinneringen/],
|
141
|
+
["OK", /wil toegang tot je foto's/],
|
142
|
+
["OK", /wil toegang tot je bewegings- en fitnessactiviteit/]
|
143
|
+
];
|
144
144
|
}
|
145
145
|
|
146
146
|
function swedishLocalizations() {
|
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.3.
|
4
|
+
version: 2.3.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: 2017-
|
12
|
+
date: 2017-03-07 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.
|
418
|
+
rubygems_version: 2.5.1
|
419
419
|
signing_key:
|
420
420
|
specification_version: 4
|
421
421
|
summary: The bridge between Calabash iOS and Xcode command-line tools like instruments
|