run_loop 1.3.2 → 1.3.3.pre1

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: 66f671a88ff045375fc68e725a7718dd22a99769
4
- data.tar.gz: 1c9ea08167d06e4a168af8b14a731a5448ea16ca
3
+ metadata.gz: 11d730e605298343e4b6e23da5a3f1f3505a08f2
4
+ data.tar.gz: 5df9f32a430a762a5c5472ec83decead5b66c405
5
5
  SHA512:
6
- metadata.gz: f4e9da22b7d00d2228663a0009decf562004e5def1e68245179fef574c9e9e0ea94375e92473cd37007fb13d6c477cce06e1346caa56dd7350871fed6e3b3ebb
7
- data.tar.gz: 39095dd3bbe9f8b6b67bf3e51c081568513ad7dcdcde681332faec200bbd9bb527fa19c17959172744285a4e7bf539cd7bab028696ea0644bf64db466ea68e68
6
+ metadata.gz: af1bf0bbe4690f98f258f8247ceee48c7e2a741edf7d747eca77a59e8d528afbc1fc96d77a7ad00d21bf0a6e799ae041d87b95d8494d6e0f0c9c11215ad93c14
7
+ data.tar.gz: 0c35aa044dd0716fc91a7679678a487af75a680e4193b935a79c393a3b143010eeda3f24bbf99490c9b6b09165f073d3be2a03b84e242fcae7fd36fa83c6ad57
@@ -33,8 +33,53 @@ module RunLoop
33
33
  end
34
34
  end
35
35
 
36
+ # Returns a device given a udid or name. In the case of a physical device,
37
+ # the udid is the device identifier. In the case of a simulator the name
38
+ # is the _instruments identifier_ as reported by
39
+ # `$ xcrun instruments -s devices` - this is the identifier that can be
40
+ # passed to instruments.
41
+ #
42
+ # @example
43
+ # RunLoop::Device.device_with_identifier('iPhone 4s (8.3 Simulator')
44
+ # RunLoop::Device.device_with_identifier('6E43E3CF-25F5-41CC-A833-588F043AE749')
45
+ # RunLoop::Device.device_with_identifier('denis') # Simulator or device named 'denis'
46
+ # RunLoop::Device.device_with_identifier('893688959205dc7eb48d603c558ede919ad8dd0c')
47
+ #
48
+ # Note that if you have a device and simulator with the same name, the
49
+ # simulator will always be selected.
50
+ #
51
+ # @param [String] udid_or_name A name or udid that identifies the device you
52
+ # are looking for.
53
+ # @param [RunLoop::SimControl] sim_control An instance of SimControl that
54
+ # can be used for looking of simulators and providing an XCTools instance.
55
+ # Users should never need to provide this.
56
+ # @return [RunLoop::Device] A device that matches `udid_or_name`.
57
+ # @raise [ArgumentError] If no matching device can be found.
58
+ def self.device_with_identifier(udid_or_name, sim_control=RunLoop::SimControl.new)
59
+ simulator = sim_control.simulators.detect do |sim|
60
+ sim.instruments_identifier == udid_or_name ||
61
+ sim.udid == udid_or_name
62
+ end
63
+
64
+ return simulator if !simulator.nil?
65
+
66
+ physical_device = sim_control.xctools.instruments(:devices).detect do |device|
67
+ puts device
68
+ device.name == udid_or_name ||
69
+ device.udid == udid_or_name
70
+ end
71
+
72
+ return physical_device if !physical_device.nil?
73
+
74
+ raise ArgumentError, "Could not find a device with a UDID or name matching '#{udid_or_name}'"
75
+ end
76
+
36
77
  def to_s
37
- "#{instruments_identifier} #{udid} #{instruction_set}"
78
+ if simulator?
79
+ "Simulator: #{instruments_identifier} #{udid} #{instruction_set}"
80
+ else
81
+ "Device: #{name} #{udid}"
82
+ end
38
83
  end
39
84
 
40
85
  # Returns and instruments-ready device identifier that is a suitable value
@@ -181,6 +181,11 @@ module RunLoop::Simctl
181
181
  #'com.apple.CoreSimulator.CoreSimulatorService',
182
182
  #'com.apple.CoreSimulator.SimVerificationService',
183
183
 
184
+ # Started by Xamarin Studio, this is the parent process of the
185
+ # processes launched by Xamarin's interaction with
186
+ # CoreSimulatorBridge
187
+ 'csproxy',
188
+
184
189
  # Yes.
185
190
  'SimulatorBridge',
186
191
  'configd_sim',
@@ -1,5 +1,5 @@
1
1
  module RunLoop
2
- VERSION = '1.3.2'
2
+ VERSION = '1.3.3.pre1'
3
3
 
4
4
  # A model of a software release version that can be used to compare two versions.
5
5
  #
@@ -168,6 +168,9 @@ module RunLoop
168
168
  # @example Getting list of known simulators.
169
169
  # instruments(:sims) #=> < list of known simulators >
170
170
  #
171
+ # @example Getting list of physical devices.
172
+ # instruments(:devices) #> < list of physical devices >
173
+ #
171
174
  # @param [Version] cmd controls the return value. currently accepts `nil`,
172
175
  # `:sims`, `:templates`, and `:version` as valid parameters
173
176
  # @return [String,Array,Version] based on the value of `cmd` version, a list known
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.3.2
4
+ version: 1.3.3.pre1
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-04-29 00:00:00.000000000 Z
11
+ date: 2015-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -337,9 +337,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
337
337
  version: '1.9'
338
338
  required_rubygems_version: !ruby/object:Gem::Requirement
339
339
  requirements:
340
- - - ">="
340
+ - - ">"
341
341
  - !ruby/object:Gem::Version
342
- version: '0'
342
+ version: 1.3.1
343
343
  requirements: []
344
344
  rubyforge_project:
345
345
  rubygems_version: 2.4.5