lib/snapshot/options.rb in snapshot-1.12.1 vs lib/snapshot/options.rb in snapshot-1.12.2
- old
+ new
@@ -12,35 +12,35 @@
env_name: "SNAPSHOT_WORKSPACE",
optional: true,
description: "Path the workspace file",
verify_block: proc do |value|
v = File.expand_path(value.to_s)
- raise "Workspace file not found at path '#{v}'".red unless File.exist?(v)
- raise "Workspace file invalid".red unless File.directory?(v)
- raise "Workspace file is not a workspace, must end with .xcworkspace".red unless v.include?(".xcworkspace")
+ UI.user_error!("Workspace file not found at path '#{v}'") unless File.exist?(v)
+ UI.user_error!("Workspace file invalid") unless File.directory?(v)
+ UI.user_error!("Workspace file is not a workspace, must end with .xcworkspace") unless v.include?(".xcworkspace")
end),
FastlaneCore::ConfigItem.new(key: :project,
short_option: "-p",
optional: true,
env_name: "SNAPSHOT_PROJECT",
description: "Path the project file",
verify_block: proc do |value|
v = File.expand_path(value.to_s)
- raise "Project file not found at path '#{v}'".red unless File.exist?(v)
- raise "Project file invalid".red unless File.directory?(v)
- raise "Project file is not a project file, must end with .xcodeproj".red unless v.include?(".xcodeproj")
+ UI.user_error!("Project file not found at path '#{v}'") unless File.exist?(v)
+ UI.user_error!("Project file invalid") unless File.directory?(v)
+ UI.user_error!("Project file is not a project file, must end with .xcodeproj") unless v.include?(".xcodeproj")
end),
FastlaneCore::ConfigItem.new(key: :devices,
description: "A list of devices you want to take the screenshots from",
short_option: "-d",
type: Array,
optional: true,
verify_block: proc do |value|
available = FastlaneCore::Simulator.all
value.each do |current|
unless available.any? { |d| d.name.strip == current.strip }
- raise "Device '#{current}' not in list of available simulators '#{available.join(', ')}'".red
+ UI.user_error!("Device '#{current}' not in list of available simulators '#{available.join(', ')}'")
end
end
end),
FastlaneCore::ConfigItem.new(key: :languages,
description: "A list of languages which should be used",
@@ -78,9 +78,14 @@
default_value: false,
is_string: false),
FastlaneCore::ConfigItem.new(key: :erase_simulator,
env_name: 'SNAPSHOT_ERASE_SIMULATOR',
description: "Enabling this option will automatically erase the simulator before running the application",
+ default_value: false,
+ is_string: false),
+ FastlaneCore::ConfigItem.new(key: :localize_simulator,
+ env_name: 'SNAPSHOT_LOCALIZE_SIMULATOR',
+ description: "Enabling this option will configure the Simulator's system language",
default_value: false,
is_string: false),
FastlaneCore::ConfigItem.new(key: :app_identifier,
env_name: 'SNAPSHOT_APP_IDENTIFIER',
short_option: "-a",