fastlane-plugin-create_simulator_devices 0.0.9 → 0.0.10

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: 064deb16024b762c3de5f9e3d2ca6076b17a63aecc54c2b70bd7b774f97df4e1
4
- data.tar.gz: 12d51b6fd42f35557394c4f200a88dd9eab1ad482630d3bfd31c2a28253d0e8d
3
+ metadata.gz: b9a6a73e52cb63c48fac77618a91aea9c4818d2899fca14d50cff5f960d6f677
4
+ data.tar.gz: 81a019571d0c07bcb7238b5930dfffc08ea00cf34f7a1c3db93e90aa024fd072
5
5
  SHA512:
6
- metadata.gz: f41c9b2e598d0e7a0c6a8e34c2f911dd1f4338e6ad878ab07e9cd4dedd3380e75c3f4f9c04fa0396d5fdc173681922f6eb981756fb9340fc09ff99698f5ea52f
7
- data.tar.gz: 7fc86e17255fdd33f378ab5a80b788ae44279114b1bb215ab7ebb75b691ce3e91357c2e34eac0e18013d7734390a7ac290a47bc99fa24a68938b3a90d97b07d8
6
+ metadata.gz: 451d3c4046b5c364bd6d9c9428bbf5072109741daea14a621a21164950d3e6339accd13d7e4b53c4d48000517a9b51ea65eab59c90ba28aa13bb2c4cc849efee
7
+ data.tar.gz: '06849f35aa5f2fa377e341a90dfeb3afe8030f79775334f1740c9d18309396d6ff37835cbbc87fdaaf6f39453c5faa3f5db4e8d579a1360a5577b2528bcfdf55'
@@ -50,16 +50,15 @@ module Fastlane
50
50
  def almost_equal?(other)
51
51
  return false if other.nil?
52
52
 
53
- lhs_build_version = @build_version
54
- rhs_build_version = other.to_s
53
+ rhs_build_version = AppleBuildVersion.new(other.to_s)
55
54
 
56
55
  lhs_is_beta = beta?
57
- rhs_is_beta = AppleBuildVersion.new(rhs_build_version).beta?
56
+ rhs_is_beta = rhs_build_version.beta?
58
57
 
59
- return self == other unless lhs_is_beta && rhs_is_beta && lhs_build_version.length == rhs_build_version.length
58
+ return self == other unless lhs_is_beta && rhs_is_beta && @build_version.length == rhs_build_version.to_s.length
60
59
 
61
60
  # Take only leading chars up to the first letter included e.g. 22C146 -> 22C
62
- lhs_build_version.minor_version == rhs_build_version.minor_version
61
+ minor_version == rhs_build_version.minor_version
63
62
  end
64
63
 
65
64
  def minor_version
@@ -144,14 +144,14 @@ module Fastlane
144
144
  available_device_types = shell_helper.available_device_types
145
145
 
146
146
  device_os_version = device[/ \(([\d.]*?)\)$/, 1]
147
- device_name = device.delete_suffix(" (#{device_os_version})").strip unless device_os_version.nil?
147
+ device_name = device_os_version.nil? ? device : device.delete_suffix(" (#{device_os_version})").strip
148
148
 
149
149
  device_type = available_device_types.detect do |available_device_type|
150
150
  device_name == available_device_type.name
151
151
  end
152
152
 
153
153
  unless device_type
154
- UI.important("Device type not found for device #{device}")
154
+ UI.important("Device type not found for device #{device}. Available device types: #{available_device_types.map(&:name).join(', ')}.")
155
155
  return nil
156
156
  end
157
157
 
@@ -199,7 +199,7 @@ module Fastlane
199
199
  sdk_platform: sdk.platform,
200
200
  os_name: required_device.os_name,
201
201
  product_version: runtime_version || sdk.product_version,
202
- product_build_version:,
202
+ product_build_version: product_build_version,
203
203
  is_latest: sdk.product_build_version.almost_equal?(product_build_version)
204
204
  )
205
205
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Fastlane
4
4
  module CreateSimulatorDevices
5
- VERSION = '0.0.9'
5
+ VERSION = '0.0.10'
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.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitalii Budnik