Exception: Fastlane::Helper::SyncDevicesHelper::InvalidDevicesFile
- Inherits:
-
StandardError
- Object
- StandardError
- Fastlane::Helper::SyncDevicesHelper::InvalidDevicesFile
- Defined in:
- lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb
Overview
Generic error that is raised if device file is not in the valid format.
Constant Summary collapse
- SAMPLE_FILE_URL =
URL of example devices files.
'https://developer.apple.com/account/resources/downloads/Multiple-Upload-Samples.zip'
Instance Attribute Summary collapse
- #entry ⇒ String? readonly
- #line_number ⇒ Integer readonly
- #path ⇒ String readonly
Class Method Summary collapse
- .columns_too_long(path, line_number) ⇒ InvalidDevicesFile
- .columns_too_short(path, line_number) ⇒ InvalidDevicesFile
- .device_name_too_long(name, path) ⇒ InvalidDevicesFile
- .invalid_headers(path, line_number) ⇒ InvalidDevicesFile
- .invalid_udid(udid, path) ⇒ InvalidDevicesFile
- .missing_key(entry, path) ⇒ InvalidDevicesFile
- .udid_not_unique(udid, path) ⇒ InvalidDevicesFile
- .unknown_platform(platform, path) ⇒ InvalidDevicesFile
Instance Method Summary collapse
-
#initialize(message, path, line_number: nil, entry: nil) ⇒ InvalidDevicesFile
constructor
A new instance of InvalidDevicesFile.
Constructor Details
#initialize(message, path, line_number: nil, entry: nil) ⇒ InvalidDevicesFile
Returns a new instance of InvalidDevicesFile.
249 250 251 252 253 254 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 249 def initialize(, path, line_number: nil, entry: nil) super(format(, { location: [path, line_number].join(':'), url: SAMPLE_FILE_URL })) @path = path @line_number = line_number @entry = entry end |
Instance Attribute Details
#entry ⇒ String? (readonly)
243 244 245 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 243 def entry @entry end |
#line_number ⇒ Integer (readonly)
241 242 243 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 241 def line_number @line_number end |
#path ⇒ String (readonly)
239 240 241 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 239 def path @path end |
Class Method Details
.columns_too_long(path, line_number) ⇒ InvalidDevicesFile
277 278 279 280 281 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 277 def self.columns_too_long(path, line_number) = 'Invalid device line at %<location>s, please provide a file according to ' \ 'the Apple Sample UDID file (%<url>s)' new(, path, line_number: line_number) end |
.columns_too_short(path, line_number) ⇒ InvalidDevicesFile
268 269 270 271 272 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 268 def self.columns_too_short(path, line_number) = 'Invalid device line at %<location>s, ensure you are using tabs (NOT spaces). ' \ "See Apple's sample/spec here: %<url>s" new(, path, line_number: line_number) end |
.device_name_too_long(name, path) ⇒ InvalidDevicesFile
310 311 312 313 314 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 310 def self.device_name_too_long(name, path) = "Invalid device name '#{name}' at %<location>s, a device name " \ "must be less than or equal to #{DevicesFile::MAX_DEVICE_NAME_LENGTH} characters long" new(, path) end |
.invalid_headers(path, line_number) ⇒ InvalidDevicesFile
259 260 261 262 263 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 259 def self.invalid_headers(path, line_number) = 'Invalid header line at %<location>s, please provide a file according to ' \ 'the Apple Sample UDID file (%<url>s)' new(, path, line_number: line_number) end |
.invalid_udid(udid, path) ⇒ InvalidDevicesFile
295 296 297 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 295 def self.invalid_udid(udid, path) new("Invalid UDID '#{udid}' at %<location>s, the UDID is not in the correct format", path) end |
.missing_key(entry, path) ⇒ InvalidDevicesFile
286 287 288 289 290 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 286 def self.missing_key(entry, path) = "Invalid device file at %<location>s, each item must have a required key '#{entry}', " \ "See Apple's sample/spec here: %<url>s" new(, path, entry: entry) end |
.udid_not_unique(udid, path) ⇒ InvalidDevicesFile
302 303 304 305 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 302 def self.udid_not_unique(udid, path) = "Invalid UDID '#{udid}' at %<location>s, there's another device with the same UDID is defined" new(, path) end |
.unknown_platform(platform, path) ⇒ InvalidDevicesFile
319 320 321 |
# File 'lib/fastlane/plugin/sync_devices/helper/sync_devices_helper/devices_file.rb', line 319 def self.unknown_platform(platform, path) new("Unknown platform '#{platform}' at %<location>s", path) end |