fastlane-plugin-maestro 0.0.7 → 0.0.9

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
  SHA256:
3
- metadata.gz: bf093755088655c4a9ebf321c2dbf1605889758bccdb7b8f80f78f6f1d133b9e
4
- data.tar.gz: c4ecbfe53b52d050b378e3413add1190e6909a19db1d4512bdb1e05d3f252728
3
+ metadata.gz: 879f6017ea772da52bf9e047674cb50f63c344e106db0f2115f8f15b0bfa099c
4
+ data.tar.gz: 33c6c7a9992458f04a55702d6fb13d36decdfed839fa5ba371bc5fbc408808a1
5
5
  SHA512:
6
- metadata.gz: 52090e5fab83d0c1348f17a346c81ccb9e9fc53cd3bf86b0fd9deaae2a8b7e12165cb0307658b2c7c72b413e64f4f642453f8e44338bede1f0501c2487a7ce57
7
- data.tar.gz: 387c1a03a3cd937c3a3e1e86f3654b10caf219031cdc69f82815f67b753f1564066b6833897fc3e73fbe9a307260c532b79101c4bb7d04671a05002e401f477b
6
+ metadata.gz: 679dfa79d51817872dc09bc270c29fee1dd127d012de8efa8e2728305e9959c7be7bcfdb65d3b01d8b5973e8f62041f0ee00c0de4d7c28cabe8c64219cad5d6e
7
+ data.tar.gz: c6568182717e929857ec9d6a3b95d5cd65c8b405cb81ccb985fb4d47a39d29c99a9906af44378c338cc86e737981a21e9f94061d3d16bf1ce7ed10fa8a9bc780
@@ -23,13 +23,7 @@ module Fastlane
23
23
  # Manually filter devices
24
24
  existing_device = available_devices.find { |d| d.name == device_name && d.os == runtime.identifier }
25
25
  if existing_device
26
- if existing_device.state == :booted
27
- UI.message("Device #{device_name} is already running. Patching settings…")
28
- patch_device_settings(existing_device, params)
29
- UI.message("Installing app #{params[:app_path]} on the simulator")
30
- device.install(params[:app_path])
31
- return existing_device
32
- elsif existing_device.state == :shutdown
26
+ if existing_device.state == :shutdown
33
27
  UI.message("Device #{device_name} is shutdown. Booting device…")
34
28
  existing_device.boot
35
29
  existing_device.wait { |d| d.state == :booted }
@@ -37,6 +31,12 @@ module Fastlane
37
31
  UI.message("Installing app #{params[:app_path]} on the simulator")
38
32
  existing_device.install(params[:app_path])
39
33
  return existing_device
34
+ elsif existing_device.state == :booted
35
+ UI.message("Device #{device_name} is already running. Patching settings…")
36
+ patch_device_settings(existing_device, params)
37
+ UI.message("Installing app #{params[:app_path]} on the simulator")
38
+ existing_device.install(params[:app_path])
39
+ return existing_device
40
40
  end
41
41
  end
42
42
 
@@ -6,12 +6,19 @@ module Fastlane
6
6
  class Runner
7
7
 
8
8
  def self.run(options)
9
- maestro_path = ENV["HOME"] + "/.maestro/bin/maestro"
9
+ # Check if maestro is installed
10
+ if command?("maestro")
11
+ # Get path to maestro binary
12
+ maestro_path = `which maestro | xargs`.strip
13
+ else
14
+ UI.error("Maestro is not installed. Please run `bundle exec fastlane run maestro command:'install'`")
15
+ return
16
+ end
10
17
  command = [maestro_path]
11
18
 
12
19
  unless options[:device].empty? || options[:device].nil?
13
20
  command.push("--device", options[:device])
14
- end
21
+ end
15
22
 
16
23
  command.push("test")
17
24
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Maestro
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-maestro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Bormeth