fastlane-plugin-create_simulator_devices 0.0.16 → 0.0.17

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: '028a321da872a819f1f84bfa2d7d8a33e39c489be64136c40cbb32636034e779'
4
- data.tar.gz: a2b0bac0404220a52607287990e7b712c48919db6b0b06c6233ce07c2a134b78
3
+ metadata.gz: 8bf78a070d8cc87783033a6d6dfb1c778a2cacc388cf0e5f691308955e94f848
4
+ data.tar.gz: 1a4fae00d92ff2e0c1f2a15a3f0804cb519fc9e2cedafa98e183ab0da6d39b74
5
5
  SHA512:
6
- metadata.gz: 9a8e2b2c8c7c42b4c7dac0e21ea6494e5ccd3c349b6be1c3ad36ee59ebeb08e179a68bd16bfde0cb1e7cf0241ffe9e0fbe7cddadd237f5c75dc32850b0100f0c
7
- data.tar.gz: 81cfa75b45ad704d9a8ebdd221e7415ca0a48eb07ec9f4040369035ee434dc58325f88c615915356e498039f6e0c00afacf1235538951ee2abd4c8c737b1cf96
6
+ metadata.gz: b47dc812e54c36acd0a95131838b5f45b0ab2fc9422965c961b4002acfdaf275ac9e1a870336a778043908cb62da3e6656ae3feb29c657bee6b80200dc320a24
7
+ data.tar.gz: e21033bc755e645677f98e54ddb553cafbaf674ac01e6d34bd07dce967b17a2f1c5459c0928d0edf06de002abae337940e122bff507c63850a85101d749d2771
@@ -46,7 +46,8 @@ module Fastlane
46
46
  output_dir: params[:output_dir],
47
47
  timeout: params[:timeout],
48
48
  include_all_device_logs: params[:include_all_device_logs],
49
- include_booted_device_data_directory: params[:include_booted_device_data_directory]
49
+ include_booted_device_data_directory: params[:include_booted_device_data_directory],
50
+ include_nonbooted_device_data_directory: params[:include_nonbooted_device_data_directory]
50
51
  )
51
52
 
52
53
  runner.run(required_devices)
@@ -127,6 +128,12 @@ module Fastlane
127
128
  description: 'Include booted device data directory. Warning: May include private information, app data containers, and increases the size of the archive! Default is NOT to collect the data container',
128
129
  type: Boolean,
129
130
  optional: true,
131
+ default_value: false),
132
+ ::FastlaneCore::ConfigItem.new(key: :include_nonbooted_device_data_directory,
133
+ env_name: 'GATHER_SIMCTL_DIAGNOSE_INCLUDE_NONBOOTED_DEVICE_DATA_DIRECTORY',
134
+ description: 'Include non-booted device data directory. Warning: May include private information, app data containers, and increases the size of the archive! Default is NOT to collect the data container',
135
+ type: Boolean,
136
+ optional: true,
130
137
  default_value: false)
131
138
  ]
132
139
  end
@@ -5,15 +5,16 @@ module Fastlane
5
5
  module SimCTL
6
6
  # Represents a device.
7
7
  class Device
8
- attr_accessor :udid, :name, :device_type_identifier, :available, :data_path, :log_path
8
+ attr_accessor :udid, :name, :device_type_identifier, :available, :data_path, :log_path, :state
9
9
 
10
- def initialize(name:, udid:, device_type_identifier:, available:, data_path:, log_path:) # rubocop:disable Metrics/ParameterLists
10
+ def initialize(name:, udid:, device_type_identifier:, available:, data_path:, log_path:, state:) # rubocop:disable Metrics/ParameterLists
11
11
  self.name = name
12
12
  self.udid = udid
13
13
  self.device_type_identifier = device_type_identifier
14
14
  self.available = available
15
15
  self.data_path = data_path
16
16
  self.log_path = log_path
17
+ self.state = state
17
18
  end
18
19
 
19
20
  def available?
@@ -31,7 +32,8 @@ module Fastlane
31
32
  device_type_identifier: hash[:deviceTypeIdentifier],
32
33
  available: hash[:isAvailable],
33
34
  data_path: hash[:dataPath],
34
- log_path: hash[:logPath]
35
+ log_path: hash[:logPath],
36
+ state: hash[:state]
35
37
  )
36
38
  end
37
39
  end
@@ -12,7 +12,8 @@ module Fastlane
12
12
  class Runner
13
13
  UI = ::Fastlane::UI unless defined?(UI)
14
14
 
15
- attr_accessor :shell_helper, :verbose, :runtime_helper, :device_naming_style, :create_simulator_devices_runner, :output_dir, :timeout, :include_all_device_logs, :include_booted_device_data_directory, :print_command, :print_command_output
15
+ attr_accessor :shell_helper, :verbose, :runtime_helper, :device_naming_style, :create_simulator_devices_runner, :output_dir, :timeout, :include_all_device_logs, :include_booted_device_data_directory, :print_command, :print_command_output,
16
+ :include_nonbooted_device_data_directory
16
17
 
17
18
  def initialize( # rubocop:disable Metrics/ParameterLists
18
19
  runtime_helper:,
@@ -23,7 +24,8 @@ module Fastlane
23
24
  output_dir:,
24
25
  timeout:,
25
26
  include_all_device_logs:,
26
- include_booted_device_data_directory:
27
+ include_booted_device_data_directory:,
28
+ include_nonbooted_device_data_directory:
27
29
  )
28
30
  self.shell_helper = shell_helper
29
31
  self.verbose = verbose
@@ -34,6 +36,7 @@ module Fastlane
34
36
  self.timeout = timeout
35
37
  self.include_all_device_logs = include_all_device_logs
36
38
  self.include_booted_device_data_directory = include_booted_device_data_directory
39
+ self.include_nonbooted_device_data_directory = include_nonbooted_device_data_directory
37
40
  end
38
41
 
39
42
  def run(devices) # rubocop:disable Metrics/AbcSize
@@ -82,13 +85,15 @@ module Fastlane
82
85
  archive_name = "#{temp_output_dir}.tar.gz"
83
86
  Actions.lane_context[Actions::SharedValues::GATHER_SIMCTL_DIAGNOSE_OUTPUT_FILE] = archive_name
84
87
 
85
- copy_data_containers_and_logs(matched_simctl_devices, full_output_dir_path) if include_booted_device_data_directory || include_all_device_logs
88
+ copy_data_containers_and_logs(matched_simctl_devices, full_output_dir_path) if include_nonbooted_device_data_directory
86
89
 
87
90
  archive_name
88
91
  end
89
92
 
90
93
  def copy_data_containers_and_logs(matched_simctl_devices, output_dir)
91
- matched_simctl_devices.each do |simctl_device|
94
+ matched_simctl_devices
95
+ .reject { |simctl_device| simctl_device.state == 'Booted' }
96
+ .each do |simctl_device|
92
97
  copy_data_container_and_logs(simctl_device, output_dir)
93
98
  end
94
99
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Fastlane
4
4
  module CreateSimulatorDevices
5
- VERSION = '0.0.16'
5
+ VERSION = '0.0.17'
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.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitalii Budnik