run_loop 4.2.2 → 4.2.3

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
  SHA256:
3
- metadata.gz: 38e87d9a70e6d71a78eed760a2e680681cb2d8a56c858cad6c518cbde9b5fae8
4
- data.tar.gz: f9bf92673f4d9aa00afbb9c6eb1d68ceca5a39130054c21666ac729dd6116562
3
+ metadata.gz: 564044c859d9a4a24af6606bd3195f7df7b6ea071c0bfcf465ef7920fa87ce0f
4
+ data.tar.gz: 3e566218bbf954b52459839bd9b0c6021d8647acb867e7250a3ac3bd17dbfc07
5
5
  SHA512:
6
- metadata.gz: bd29926251ba1b986759cf35b62fa371f354c5da4f506cc747eeafa75c93206720c0c991db02b4ca0eb3b92e14bf237626dc36da96ccf88f810da7f5df7cc2b2
7
- data.tar.gz: 86eb35fe358872f78c5d3584e184e245e5343e55c65ecc7bfb118c4b9f617592194b271ed4de7e2ab42802daa121af9dcb0260d14e27a1f40258e250fd68c4af
6
+ metadata.gz: 49c7a1cc650745fa7972fc63121f27bffd51e8f362927db85763d3643f8a13869604b3bdf04cf3c8ff1ec4444a933061a65270bc309d0fb302ef5b33e620441c
7
+ data.tar.gz: f5bdc48afacf4277804faa1b52688b2855d74cbb87fa87a85933df561c07c9cffabf3d9778731a97a0ca2a593ecac5ee7c0b17d11547f9b3181b9eed46587c38
@@ -0,0 +1,71 @@
1
+
2
+ module RunLoop
3
+ module CLI
4
+
5
+ require 'thor'
6
+ class IDM < Thor
7
+
8
+ require "run_loop"
9
+ require "run_loop/cli/errors"
10
+ require "run_loop/shell"
11
+ include RunLoop::Shell
12
+
13
+ require "run_loop/regex"
14
+
15
+ desc "install app [OPTIONS]", "Installs an app on a device."
16
+
17
+ method_option "device",
18
+ :desc => 'The simulator UDID or name.',
19
+ :aliases => "-d",
20
+ :required => false,
21
+ :type => :string
22
+
23
+ method_option "debug",
24
+ :desc => "Enable debug logging.",
25
+ :aliases => "-v",
26
+ :required => false,
27
+ :default => false,
28
+ :type => :boolean
29
+
30
+ method_option "force",
31
+ :desc => "Force a re-install the existing app",
32
+ :aliases => "-f",
33
+ :required => false,
34
+ :default => false,
35
+ :type => :boolean
36
+
37
+ def install(app)
38
+ extension = File.extname(app)
39
+ if extension == ".app"
40
+ app_instance = RunLoop::App.new(app)
41
+ else
42
+ app_instance = RunLoop::Ipa.new(app)
43
+ end
44
+
45
+ xcode = RunLoop::Xcode.new
46
+ simctl = RunLoop::Simctl.new
47
+ instruments = RunLoop::Instruments.new
48
+
49
+ detect_options = {}
50
+
51
+ device = options[:device]
52
+ if !device
53
+ detect_options[:device] = "device"
54
+ else
55
+ detect_options[:device] = device
56
+ end
57
+
58
+ device = RunLoop::Device.detect_device(detect_options, xcode,
59
+ simctl, instruments)
60
+
61
+ idm = RunLoop::PhysicalDevice::IOSDeviceManager.new(device)
62
+
63
+ if options[:force]
64
+ idm.install_app(app_instance)
65
+ else
66
+ idm.ensure_newest_installed(app_instance)
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
@@ -605,7 +605,7 @@ while trying to list devices.
605
605
 
606
606
  # @!visibility private
607
607
  def device_available?(record)
608
- record["isAvailable"] == "YES" || record["availability"] == "(available)"
608
+ record["isAvailable"] == true || record["isAvailable"] == "YES" || record["availability"] == "(available)"
609
609
  end
610
610
 
611
611
  # @!visibility private
@@ -1,5 +1,5 @@
1
1
  module RunLoop
2
- VERSION = "4.2.2"
2
+ VERSION = "4.2.3"
3
3
 
4
4
  # A model of a software release version that can be used to compare two versions.
5
5
  #
@@ -120,7 +120,7 @@ module RunLoop
120
120
  def version_gte_102?
121
121
  version >= v102
122
122
  end
123
-
123
+
124
124
  # Is the active Xcode version 10.0 or above?
125
125
  #
126
126
  # @return [Boolean] `true` if the current Xcode version is >= 10.0
@@ -255,6 +255,9 @@ Could not find Xcode version:
255
255
  path = xcode_select_path
256
256
  end
257
257
 
258
+ require 'pathname'
259
+ path = Pathname.new(path).realpath.to_s
260
+
258
261
  if !File.directory?(path)
259
262
  raise RuntimeError,
260
263
  %Q{Cannot determine the active Xcode. Expected an Xcode here:
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: 4.2.2
4
+ version: 4.2.3
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: 2019-04-16 00:00:00.000000000 Z
12
+ date: 2019-06-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -332,6 +332,7 @@ files:
332
332
  - lib/run_loop/cli/cli.rb
333
333
  - lib/run_loop/cli/codesign.rb
334
334
  - lib/run_loop/cli/errors.rb
335
+ - lib/run_loop/cli/idm.rb
335
336
  - lib/run_loop/cli/instruments.rb
336
337
  - lib/run_loop/cli/locale.rb
337
338
  - lib/run_loop/cli/simctl.rb