fastlane-plugin-create_simulator_devices 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: 796689ee2ebad5e5e67b35eb55164a1b5239b24d932f0fea95a35b36b1d19af1
4
- data.tar.gz: 8a2a316d577089472b7caa5beada6298fa06212322640330b126072ff03de757
3
+ metadata.gz: 064deb16024b762c3de5f9e3d2ca6076b17a63aecc54c2b70bd7b774f97df4e1
4
+ data.tar.gz: 12d51b6fd42f35557394c4f200a88dd9eab1ad482630d3bfd31c2a28253d0e8d
5
5
  SHA512:
6
- metadata.gz: f9520fb0870ebe2a9325cd8b266ff61047152f5c26c017ea9191d57266b0a26f493400b3d31a7197c4899a8fa663e001bcddbcf5618efe23d3890888b72317f0
7
- data.tar.gz: 3f44d5be8744ab991e7a3eae9821293b0da4597b6c2ed85509647c78c945530e79a8c0dedc78a89e39fc5e1e62a20eec6eb42eafbc9914d14c45c538cc84c315
6
+ metadata.gz: f41c9b2e598d0e7a0c6a8e34c2f911dd1f4338e6ad878ab07e9cd4dedd3380e75c3f4f9c04fa0396d5fdc173681922f6eb981756fb9340fc09ff99698f5ea52f
7
+ data.tar.gz: 7fc86e17255fdd33f378ab5a80b788ae44279114b1bb215ab7ebb75b691ce3e91357c2e34eac0e18013d7734390a7ac290a47bc99fa24a68938b3a90d97b07d8
@@ -7,10 +7,6 @@ require_relative '../helpers/create_simulator_devices/models'
7
7
 
8
8
  module Fastlane
9
9
  module Actions
10
- module SharedValues
11
- AVAILABLE_SIMULATOR_DEVICES = :AVAILABLE_SIMULATOR_DEVICES
12
- end
13
-
14
10
  CreateSimulatorDevices = ::Fastlane::CreateSimulatorDevices
15
11
 
16
12
  # Create simulator devices.
@@ -34,11 +30,7 @@ module Fastlane
34
30
  verbose: verbose
35
31
  )
36
32
 
37
- available_simulator_devices = runner.run(required_devices)
38
-
39
- Actions.lane_context[SharedValues::AVAILABLE_SIMULATOR_DEVICES] = available_simulator_devices
40
-
41
- available_simulator_devices
33
+ runner.run(required_devices)
42
34
  end
43
35
 
44
36
  #####################################################
@@ -8,6 +8,7 @@ require_relative 'models/xcodebuild/sdk'
8
8
  require_relative 'models/required_device'
9
9
  require_relative 'models/required_runtime'
10
10
  require_relative 'models/apple_build_version'
11
+ require 'fastlane'
11
12
 
12
13
  module Fastlane
13
14
  # Create simulator devices.
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'runtime_helper'
4
+ require 'fastlane'
5
+ require_relative 'shared_values'
4
6
 
5
7
  module Fastlane
6
8
  # Create simulator devices.
@@ -46,16 +48,17 @@ module Fastlane
46
48
  matched_devices = required_devices
47
49
  .reject { |required_device| required_device.available_device.nil? }
48
50
 
49
- log_matched_devices
51
+ log_matched_devices(matched_devices: matched_devices)
50
52
 
51
- matched_devices.map!(&:description)
53
+ available_simulator_devices = matched_devices.map(&:available_device)
54
+ Actions.lane_context[Actions::SharedValues::AVAILABLE_SIMULATOR_DEVICES] = available_simulator_devices
52
55
 
53
- UI.user_error!('No available devices found') if matched_devices.empty?
54
-
55
- matched_devices
56
+ available_simulator_devices.map(&:name)
56
57
  end
57
58
 
58
- def log_matched_devices
59
+ def log_matched_devices(matched_devices:)
60
+ UI.user_error!('No available devices found') if matched_devices.empty?
61
+
59
62
  UI.message('Matched devices:')
60
63
  matched_devices.each do |matched_device|
61
64
  device_info = ''
@@ -65,6 +68,11 @@ module Fastlane
65
68
  end
66
69
  UI.message(" #{matched_device.description}: #{matched_device.available_device.description}#{device_info}")
67
70
  end
71
+
72
+ matched_devices_names = matched_devices
73
+ .map { |matched_device| matched_device.available_device.name }
74
+ .join(', ')
75
+ UI.message("Available simulator devices: #{matched_devices_names}")
68
76
  end
69
77
 
70
78
  def delete_unavailable_devices
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'fileutils'
4
+ require 'fastlane'
4
5
  require_relative 'shell_helper'
5
6
 
6
7
  module Fastlane
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'fastlane'
4
+
5
+ module Fastlane
6
+ module Actions
7
+ module SharedValues
8
+ AVAILABLE_SIMULATOR_DEVICES = :AVAILABLE_SIMULATOR_DEVICES
9
+ end
10
+ end
11
+ end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'models'
4
+ require 'fastlane'
4
5
 
5
6
  module Fastlane
6
7
  # Create simulator devices.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Fastlane
4
4
  module CreateSimulatorDevices
5
- VERSION = '0.0.7'
5
+ VERSION = '0.0.9'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-create_simulator_devices
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
  - Vitalii Budnik
@@ -31,6 +31,7 @@ files:
31
31
  - lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/models/xcodebuild/sdk.rb
32
32
  - lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/runner.rb
33
33
  - lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/runtime_helper.rb
34
+ - lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/shared_values.rb
34
35
  - lib/fastlane/plugin/create_simulator_devices/helpers/create_simulator_devices/shell_helper.rb
35
36
  - lib/fastlane/plugin/create_simulator_devices/version.rb
36
37
  homepage: