run_loop 1.5.6 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -217,7 +217,9 @@ function isLocationPrompt(alert) {
217
217
 
218
218
  //iOS 9 - English
219
219
  ["OK", /Would Like to Access Your Motion & Fitness Activity/],
220
- ["OK", /Would Like Access to Twitter Accounts/]
220
+ ["OK", /Would Like Access to Twitter Accounts/],
221
+
222
+ ["OK", /data available to nearby bluetooth devices/]
221
223
  ],
222
224
  ans, exp,
223
225
  txt;
@@ -235,7 +235,9 @@ function isLocationPrompt(alert) {
235
235
 
236
236
  //iOS 9 - English
237
237
  ["OK", /Would Like to Access Your Motion & Fitness Activity/],
238
- ["OK", /Would Like Access to Twitter Accounts/]
238
+ ["OK", /Would Like Access to Twitter Accounts/],
239
+
240
+ ["OK", /data available to nearby bluetooth devices/]
239
241
  ],
240
242
  ans, exp,
241
243
  txt;
@@ -217,7 +217,9 @@ function isLocationPrompt(alert) {
217
217
 
218
218
  //iOS 9 - English
219
219
  ["OK", /Would Like to Access Your Motion & Fitness Activity/],
220
- ["OK", /Would Like Access to Twitter Accounts/]
220
+ ["OK", /Would Like Access to Twitter Accounts/],
221
+
222
+ ["OK", /data available to nearby bluetooth devices/]
221
223
  ],
222
224
  ans, exp,
223
225
  txt;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: run_loop
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.6
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-15 00:00:00.000000000 Z
11
+ date: 2015-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -24,26 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.8'
27
- - !ruby/object:Gem::Dependency
28
- name: retriable
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.3.3.1
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '2.1'
37
- type: :runtime
38
- prerelease: false
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: 1.3.3.1
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: '2.1'
47
27
  - !ruby/object:Gem::Dependency
48
28
  name: awesome_print
49
29
  requirement: !ruby/object:Gem::Requirement
@@ -106,6 +86,20 @@ dependencies:
106
86
  - - ">="
107
87
  - !ruby/object:Gem::Version
108
88
  version: 0.0.2
89
+ - !ruby/object:Gem::Dependency
90
+ name: rspec_junit_formatter
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '0.2'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '0.2'
109
103
  - !ruby/object:Gem::Dependency
110
104
  name: luffa
111
105
  requirement: !ruby/object:Gem::Requirement
@@ -305,7 +299,6 @@ files:
305
299
  - lib/run_loop/lldb.rb
306
300
  - lib/run_loop/logging.rb
307
301
  - lib/run_loop/patches/awesome_print.rb
308
- - lib/run_loop/patches/retriable.rb
309
302
  - lib/run_loop/plist_buddy.rb
310
303
  - lib/run_loop/process_terminator.rb
311
304
  - lib/run_loop/process_waiter.rb
@@ -315,7 +308,6 @@ files:
315
308
  - lib/run_loop/version.rb
316
309
  - lib/run_loop/xcode.rb
317
310
  - lib/run_loop/xcrun.rb
318
- - lib/run_loop/xctools.rb
319
311
  - plists/simctl/com.apple.UIAutomation.plist
320
312
  - plists/simctl/com.apple.UIAutomationPlugIn.plist
321
313
  - scripts/calabash_script_uia.js
@@ -341,7 +333,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
341
333
  requirements:
342
334
  - - ">="
343
335
  - !ruby/object:Gem::Version
344
- version: '1.9'
336
+ version: '2.0'
345
337
  required_rubygems_version: !ruby/object:Gem::Requirement
346
338
  requirements:
347
339
  - - ">="
@@ -1,45 +0,0 @@
1
- require 'retriable'
2
- require 'retriable/version'
3
-
4
- module RunLoop
5
- # A class to bridge the gap between retriable 1.x and 2.0.
6
- class RetryOpts
7
- def self.tries_and_interval(tries, interval, other_retry_options={})
8
- retriable_version = RunLoop::Version.new(Retriable::VERSION)
9
-
10
- if other_retry_options[:tries]
11
- raise RuntimeError, ':tries is not a valid key for other_retry_options'
12
- elsif other_retry_options[:interval]
13
- raise RuntimeError, ':interval is not a valid key for other_retry_options'
14
- elsif other_retry_options[:intervals]
15
- raise RuntimeError, ':intervals is not a valid key for other_retry_options'
16
- end
17
-
18
- if retriable_version >= RunLoop::Version.new('2.0.0')
19
- other_retry_options.merge({:intervals => Array.new(tries, interval)})
20
- else
21
- other_retry_options.merge({:tries => tries, :interval => interval})
22
- end
23
- end
24
- end
25
- end
26
-
27
- # Only in retriable 1.4.0
28
- unless Retriable.public_instance_methods.include?(:retriable)
29
- require 'retriable/retry'
30
- module Retriable
31
- extend self
32
-
33
- def retriable(opts = {}, &block)
34
- raise LocalJumpError unless block_given?
35
-
36
- Retry.new do |r|
37
- r.tries = opts[:tries] if opts[:tries]
38
- r.on = opts[:on] if opts[:on]
39
- r.interval = opts[:interval] if opts[:interval]
40
- r.timeout = opts[:timeout] if opts[:timeout]
41
- r.on_retry = opts[:on_retry] if opts[:on_retry]
42
- end.perform(&block)
43
- end
44
- end
45
- end
@@ -1,329 +0,0 @@
1
- require 'open3'
2
- require 'retriable'
3
-
4
- module RunLoop
5
-
6
- # @deprecated Since 1.5.0
7
- #
8
- # The behaviors of this class are in the process of being refactored to other
9
- # classes. Please do not implement any new behaviors in this class.
10
- #
11
- # Callers should be updated ASAP.
12
- #
13
- # A class for interacting with the Xcode tools.
14
- #
15
- # @note All command line tools are run in the context of `xcrun`.
16
- #
17
- # Throughout this class's documentation, there are references to the
18
- # _current version of Xcode_. The current Xcode version is the one returned
19
- # by `xcrun xcodebuild`. The current Xcode version can be set using
20
- # `xcode-select` or overridden using the `DEVELOPER_DIR`.
21
- #
22
- # @todo Refactor instruments related code to instruments class.
23
- class XCTools
24
-
25
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
26
- # Returns a version instance for `Xcode 7.1`; used to check for the
27
- # availability of features and paths to various items on the filesystem.
28
- #
29
- # @return [RunLoop::Version] 7.1
30
- def v71
31
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
32
- xcode.v71
33
- end
34
-
35
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
36
- # Returns a version instance for `Xcode 7.0`; used to check for the
37
- # availability of features and paths to various items on the filesystem.
38
- #
39
- # @return [RunLoop::Version] 7.0
40
- def v70
41
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
42
- xcode.v70
43
- end
44
-
45
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
46
- # Returns a version instance for `Xcode 6.4`; used to check for the
47
- # availability of features and paths to various items on the filesystem.
48
- #
49
- # @return [RunLoop::Version] 6.4
50
- def v64
51
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
52
- xcode.v64
53
- end
54
-
55
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
56
- # Returns a version instance for `Xcode 6.3`; used to check for the
57
- # availability of features and paths to various items on the filesystem.
58
- #
59
- # @return [RunLoop::Version] 6.3
60
- def v63
61
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
62
- xcode.v63
63
- end
64
-
65
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
66
- # Returns a version instance for `Xcode 6.2`; used to check for the
67
- # availability of features and paths to various items on the filesystem.
68
- #
69
- # @return [RunLoop::Version] 6.2
70
- def v62
71
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
72
- xcode.v62
73
- end
74
-
75
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
76
- # Returns a version instance for `Xcode 6.1`; used to check for the
77
- # availability of features and paths to various items on the filesystem.
78
- #
79
- # @return [RunLoop::Version] 6.1
80
- def v61
81
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
82
- xcode.v61
83
- end
84
-
85
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
86
- # Returns a version instance for `Xcode 6.0`; used to check for the
87
- # availability of features and paths to various items on the filesystem.
88
- #
89
- # @return [RunLoop::Version] 6.0
90
- def v60
91
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
92
- xcode.v60
93
- end
94
-
95
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
96
- # Returns a version instance for `Xcode 5.1`; used to check for the
97
- # availability of features and paths to various items on the filesystem.
98
- #
99
- # @return [RunLoop::Version] 5.1
100
- def v51
101
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
102
- xcode.v51
103
- end
104
-
105
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
106
- # Returns a version instance for `Xcode 5.0`; used to check for the
107
- # availability of features and paths to various items on the filesystem.
108
- #
109
- # @return [RunLoop::Version] 5.0
110
- def v50
111
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
112
- xcode.v50
113
- end
114
-
115
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
116
- # Are we running Xcode 6.4 or above?
117
- #
118
- # @return [Boolean] `true` if the current Xcode version is >= 6.4
119
- def xcode_version_gte_64?
120
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
121
- xcode.version_gte_64?
122
- end
123
-
124
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
125
- # Are we running Xcode 6.3 or above?
126
- #
127
- # @return [Boolean] `true` if the current Xcode version is >= 6.3
128
- def xcode_version_gte_63?
129
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
130
- xcode.version_gte_63?
131
- end
132
-
133
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
134
- # Are we running Xcode 6.2 or above?
135
- #
136
- # @return [Boolean] `true` if the current Xcode version is >= 6.2
137
- def xcode_version_gte_62?
138
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
139
- xcode.version_gte_62?
140
- end
141
-
142
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
143
- # Are we running Xcode 6.1 or above?
144
- #
145
- # @return [Boolean] `true` if the current Xcode version is >= 6.1
146
- def xcode_version_gte_61?
147
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
148
- xcode.version_gte_61?
149
- end
150
-
151
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
152
- # Are we running Xcode 6 or above?
153
- #
154
- # @return [Boolean] `true` if the current Xcode version is >= 6.0
155
- def xcode_version_gte_6?
156
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
157
- xcode.version_gte_6?
158
- end
159
-
160
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
161
- # Are we running Xcode 7.1 or above?
162
- #
163
- # @return [Boolean] `true` if the current Xcode version is >= 7.1
164
- def xcode_version_gte_71?
165
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
166
- xcode.version_gte_71?
167
- end
168
-
169
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
170
- # Are we running Xcode 7 or above?
171
- #
172
- # @return [Boolean] `true` if the current Xcode version is >= 7.0
173
- def xcode_version_gte_7?
174
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
175
- xcode.version_gte_7?
176
- end
177
-
178
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
179
- # Are we running Xcode 5.1 or above?
180
- #
181
- # @return [Boolean] `true` if the current Xcode version is >= 5.1
182
- def xcode_version_gte_51?
183
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
184
- xcode.version_gte_51?
185
- end
186
-
187
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
188
- # Returns the current version of Xcode.
189
- #
190
- # @return [RunLoop::Version] The current version of Xcode as reported by
191
- # `xcrun xcodebuild -version`.
192
- def xcode_version
193
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
194
- xcode.version
195
- end
196
-
197
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
198
- # Returns the path to the current developer directory.
199
- #
200
- # From the man pages:
201
- #
202
- # ```
203
- # $ man xcode-select
204
- # DEVELOPER_DIR
205
- # Overrides the active developer directory. When DEVELOPER_DIR is set,
206
- # its value will be used instead of the system-wide active developer
207
- # directory.
208
- #```
209
- #
210
- # @return [String] path to current developer directory
211
- def xcode_developer_dir
212
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
213
- xcode.developer_dir
214
- end
215
-
216
- # @deprecated Since 1.5.0 - replaced with RunLoop::Xcode
217
- # Is this a beta version of Xcode?
218
- #
219
- # @note Relies on Xcode beta versions having and app bundle named Xcode-Beta.app
220
- # @return [Boolean] True if the Xcode version is beta.
221
- def xcode_is_beta?
222
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Xcode') if RunLoop::Environment.debug?
223
- xcode.beta?
224
- end
225
-
226
- alias_method :version_gte_64?, :xcode_version_gte_64?
227
- alias_method :version_gte_63?, :xcode_version_gte_63?
228
- alias_method :version_gte_62?, :xcode_version_gte_62?
229
- alias_method :version_gte_61?, :xcode_version_gte_61?
230
- alias_method :version_gte_6?, :xcode_version_gte_6?
231
- alias_method :version_gte_7?, :xcode_version_gte_7?
232
- alias_method :version_gte_51?, :xcode_version_gte_51?
233
- alias_method :version, :xcode_version
234
- alias_method :developer_dir, :xcode_developer_dir
235
- alias_method :beta?, :xcode_is_beta?
236
-
237
- # @deprecated Since 1.5.0 - replaced with RunLoop::Instruments.
238
- #
239
- # @see {RunLoop::Instruments#version}
240
- # @see {RunLoop::Instruments#templates}
241
- # @see {RunLoop::Instruments#physical_devices}
242
- # @see {RunLoop::Instruments#simulators}
243
- #
244
- # Method for interacting with instruments.
245
- #
246
- # @example Getting a runnable command for instruments
247
- # instruments #=> 'xcrun instruments'
248
- #
249
- # @example Getting a the version of instruments.
250
- # instruments(:version) #=> 5.1.1 - a Version object
251
- #
252
- # @example Getting list of known simulators.
253
- # instruments(:sims) #=> < list of known simulators >
254
- #
255
- # @example Getting list of physical devices.
256
- # instruments(:devices) #> < list of physical devices >
257
- #
258
- # @param [Version] cmd controls the return value. currently accepts `nil`,
259
- # `:sims`, `:templates`, and `:version` as valid parameters
260
- # @return [String,Array,Version] based on the value of `cmd` version, a list known
261
- # simulators, the version of current instruments tool, or the path to the
262
- # instruments binary.
263
- # @raise [ArgumentError] if invalid `cmd` is passed
264
- def instruments(cmd=nil)
265
- RunLoop.deprecated('1.5.0', 'Replaced with RunLoop::Instruments') if RunLoop::Environment.debug?
266
- instruments = 'xcrun instruments'
267
- return instruments if cmd == nil
268
-
269
- case cmd
270
- when :version
271
- instruments_instance.version
272
- when :sims
273
- instruments_instance.simulators
274
- when :templates
275
- instruments_instance.templates
276
- when :devices
277
- instruments_instance.physical_devices
278
- else
279
- candidates = [:version, :sims, :devices]
280
- raise(ArgumentError, "expected '#{cmd}' to be one of '#{candidates}'")
281
- end
282
- end
283
-
284
- # @deprecated Since 1.5.0 - no replacement.
285
- #
286
- # All supported Xcode versions accept -s flag.
287
- #
288
- # Does the instruments `version` accept the -s flag?
289
- #
290
- # @example
291
- # instruments_supports_hyphen_s?('4.6.3') => false
292
- # instruments_supports_hyphen_s?('5.0.2') => true
293
- # instruments_supports_hyphen_s?('5.1') => true
294
- #
295
- # @param [String, Version] version (instruments(:version))
296
- # a major.minor[.patch] version string or a Version object
297
- #
298
- # @return [Boolean] true if the version is >= 5.*
299
- def instruments_supports_hyphen_s?(version=instruments(:version))
300
- RunLoop.deprecated('1.5.0', 'Not replaced.') if RunLoop::Environment.debug?
301
- @instruments_supports_hyphen_s ||= lambda {
302
- if version.is_a? String
303
- _version = RunLoop::Version.new(version)
304
- else
305
- _version = version
306
- end
307
- _version >= RunLoop::Version.new('5.1')
308
- }.call
309
- end
310
-
311
- private
312
-
313
- # @!visibility private
314
- attr_reader :xcode
315
-
316
- # @!visibility private
317
- def xcode
318
- @xcode ||= RunLoop::Xcode.new
319
- end
320
-
321
- # @!visibility private
322
- attr_reader :instruments_instance
323
-
324
- # @!visibility private
325
- def instruments_instance
326
- @instruments_instance ||= RunLoop::Instruments.new
327
- end
328
- end
329
- end