run_loop 1.5.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b7bf28b320d229c203aba840fd310fa5d218969
4
- data.tar.gz: df2729c85b406bac18cf9dbf82e44cdfa3fdcd48
3
+ metadata.gz: 1ea1e4ca2af5aa1d018ecd229a5c864ab3b34533
4
+ data.tar.gz: 06ef7af54d9d9d7bac1d2070c1398d3f4723feac
5
5
  SHA512:
6
- metadata.gz: 4ca074c5fa9370f9085758386a987fbeef3a534820cae5c7d41b1b0ab9c7a49c16df455684ebcbb323819dc987a46e5c63b6ba2abfa776ef280a48a57a31f180
7
- data.tar.gz: 9b2ac244bc05587ecc7393a80c9eeb3c016fc623cbdbb8deafe0d72d1a059217daecbf99c829bbbb5247a41284b20028b06b23edf118f5b43ff9bfb66ae3d7d4
6
+ metadata.gz: 1a71ada83c5a6558e1d423b4138e8235fc82220dfe3c1bcd7283b16978dd6219331754518387102b8c47e4572c0863aceb90f70f5039d2580cd603a5245a9b8d
7
+ data.tar.gz: 3c44d8bd2a89a1cda2fdae997ab9a70bcd6f975e2d4e9f97f56d12462f05dde000d54379a83a932b58547b9f5c91b42bd282721897f8b32d8f44373542558131
@@ -94,13 +94,24 @@ module RunLoop
94
94
  :type => :boolean
95
95
 
96
96
  def launch
97
- launch_options = {
98
- :args => parse_app_launch_args(options),
99
- :udid => detect_device_udid_from_options(options),
100
- :bundle_dir_or_bundle_id => detect_bundle_id_or_bundle_path(options)
101
- }
102
- run_loop = RunLoop.run(launch_options)
103
- puts JSON.generate(run_loop)
97
+
98
+ debug = options[:debug]
99
+ original_value = ENV['DEBUG']
100
+
101
+ ENV['DEBUG'] = '1' if debug
102
+
103
+
104
+ begin
105
+ launch_options = {
106
+ :args => parse_app_launch_args(options),
107
+ :udid => detect_device_udid_from_options(options),
108
+ :bundle_dir_or_bundle_id => detect_bundle_id_or_bundle_path(options)
109
+ }
110
+ run_loop = RunLoop.run(launch_options)
111
+ puts JSON.generate(run_loop)
112
+ ensure
113
+ ENV['DEBUG'] = original_value if debug
114
+ end
104
115
  end
105
116
 
106
117
  no_commands do
data/lib/run_loop/core.rb CHANGED
@@ -10,6 +10,8 @@ module RunLoop
10
10
 
11
11
  module Core
12
12
 
13
+ include RunLoop::Regex
14
+
13
15
  START_DELIMITER = "OUTPUT_JSON:\n"
14
16
  END_DELIMITER="\nEND_OUTPUT"
15
17
 
@@ -256,7 +258,7 @@ Please update your sources to pass an instance of RunLoop::Xcode))
256
258
  }
257
259
  merged_options = options.merge(discovered_options)
258
260
 
259
- if self.simulator_target?(merged_options, sim_control)
261
+ if self.simulator_target?(merged_options)
260
262
  self.expect_compatible_simulator_architecture(merged_options, sim_control)
261
263
  self.prepare_simulator(merged_options, sim_control)
262
264
  end
@@ -353,7 +355,9 @@ Please update your sources to pass an instance of RunLoop::Xcode))
353
355
  # `self.udid_and_bundle_for_launcher`
354
356
  #
355
357
  # @see {Core::RunLoop.udid_and_bundle_for_launcher}
356
- def self.simulator_target?(run_options, sim_control = RunLoop::SimControl.new)
358
+ #
359
+ # @todo sim_control argument is no longer necessary and can be removed.
360
+ def self.simulator_target?(run_options, sim_control=nil)
357
361
  value = run_options[:device_target]
358
362
 
359
363
  # match the behavior of udid_and_bundle_for_launcher
@@ -362,15 +366,7 @@ Please update your sources to pass an instance of RunLoop::Xcode))
362
366
  # support for 'simulator' and Xcode >= 5.1 device targets
363
367
  return true if value.downcase.include?('simulator')
364
368
 
365
- # if Xcode < 6.0, we are done
366
- return false if not sim_control.xcode_version_gte_6?
367
-
368
- # support for Xcode >= 6 simulator udids
369
- return true if sim_control.sim_udid? value
370
-
371
- # support for Xcode >= 6 'named simulators'
372
- sims = sim_control.simulators.each
373
- sims.find_index { |device| device.name == value } != nil
369
+ value[DEVICE_UDID_REGEX, 0] == nil
374
370
  end
375
371
 
376
372
  # Extracts the value of :inject_dylib from options Hash.
@@ -442,7 +438,7 @@ Please update your sources to pass an instance of RunLoop::Xcode))
442
438
  end
443
439
  udid = device_target
444
440
 
445
- unless self.simulator_target?(options, sim_control)
441
+ unless self.simulator_target?(options)
446
442
  bundle_dir_or_bundle_id = options[:bundle_id] if options[:bundle_id]
447
443
  end
448
444
  else
@@ -1,5 +1,5 @@
1
1
  module RunLoop
2
- VERSION = '1.5.0'
2
+ VERSION = '1.5.1'
3
3
 
4
4
  # A model of a software release version that can be used to compare two versions.
5
5
  #
@@ -202,6 +202,7 @@ function isLocationPrompt(alert) {
202
202
  ["OK", /Would Like to Use Your Current Location/],
203
203
  ["Ja", /Darf (?:.)+ Ihren aktuellen Ort verwenden/],
204
204
  ["OK", /Would Like to Send You Notifications/],
205
+ ["OK", /would like to send you Push Notifications/],
205
206
  ["Allow", /access your location/],
206
207
  ["OK", /Would Like to Access Your Photos/],
207
208
  ["OK", /Would Like to Access Your Contacts/],
@@ -219,6 +219,7 @@ function isLocationPrompt(alert) {
219
219
  ["OK", /vil bruge din aktuelle placering/],
220
220
  ["OK", /Would Like to Use Your Current Location/],
221
221
  ["OK", /Would Like to Send You Notifications/],
222
+ ["OK", /would like to send you Push Notifications/],
222
223
  ["Allow", /access your location/],
223
224
  ["Ja", /Darf (?:.)+ Ihren aktuellen Ort verwenden/],
224
225
  ["OK", /Would Like to Access Your Photos/],
@@ -202,6 +202,7 @@ function isLocationPrompt(alert) {
202
202
  ["OK", /Would Like to Use Your Current Location/],
203
203
  ["Ja", /Darf (?:.)+ Ihren aktuellen Ort verwenden/],
204
204
  ["OK", /Would Like to Send You Notifications/],
205
+ ["OK", /would like to send you Push Notifications/],
205
206
  ["Allow", /access your location/],
206
207
  ["OK", /Would Like to Access Your Photos/],
207
208
  ["OK", /Would Like to Access Your Contacts/],
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.0
4
+ version: 1.5.1
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-09-03 00:00:00.000000000 Z
11
+ date: 2015-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -96,22 +96,22 @@ dependencies:
96
96
  name: luffa
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - "~>"
100
- - !ruby/object:Gem::Version
101
- version: '1.0'
102
99
  - - ">="
103
100
  - !ruby/object:Gem::Version
104
- version: 1.0.4
101
+ version: 1.1.0
102
+ - - "<"
103
+ - !ruby/object:Gem::Version
104
+ version: '2.0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - "~>"
110
- - !ruby/object:Gem::Version
111
- version: '1.0'
112
109
  - - ">="
113
110
  - !ruby/object:Gem::Version
114
- version: 1.0.4
111
+ version: 1.1.0
112
+ - - "<"
113
+ - !ruby/object:Gem::Version
114
+ version: '2.0'
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: bundler
117
117
  requirement: !ruby/object:Gem::Requirement
@@ -132,14 +132,14 @@ dependencies:
132
132
  requirements:
133
133
  - - "~>"
134
134
  - !ruby/object:Gem::Version
135
- version: '1.7'
135
+ version: '1.8'
136
136
  type: :development
137
137
  prerelease: false
138
138
  version_requirements: !ruby/object:Gem::Requirement
139
139
  requirements:
140
140
  - - "~>"
141
141
  - !ruby/object:Gem::Version
142
- version: '1.7'
142
+ version: '1.8'
143
143
  - !ruby/object:Gem::Dependency
144
144
  name: rspec
145
145
  requirement: !ruby/object:Gem::Requirement
@@ -347,7 +347,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
347
347
  version: '0'
348
348
  requirements: []
349
349
  rubyforge_project:
350
- rubygems_version: 2.4.5.1
350
+ rubygems_version: 2.4.8
351
351
  signing_key:
352
352
  specification_version: 4
353
353
  summary: The bridge between Calabash iOS and Xcode command-line tools like instruments