snapshot/lib/snapshot/runner.rb in fastlane-2.74.1 vs snapshot/lib/snapshot/runner.rb in fastlane-2.75.0.beta.20180109010003
- old
+ new
@@ -15,15 +15,15 @@
module Snapshot
class Runner
def work
if File.exist?("./fastlane/snapshot.js") or File.exist?("./snapshot.js")
- UI.error "Found old snapshot configuration file 'snapshot.js'"
- UI.error "You updated to snapshot 1.0 which now uses UI Automation"
- UI.error "Please follow the migration guide: https://github.com/fastlane/fastlane/blob/master/snapshot/MigrationGuide.md"
- UI.error "And read the updated documentation: https://docs.fastlane.tools/actions/snapshot/"
- sleep 3 # to be sure the user sees this, as compiling clears the screen
+ UI.error("Found old snapshot configuration file 'snapshot.js'")
+ UI.error("You updated to snapshot 1.0 which now uses UI Automation")
+ UI.error("Please follow the migration guide: https://github.com/fastlane/fastlane/blob/master/snapshot/MigrationGuide.md")
+ UI.error("And read the updated documentation: https://docs.fastlane.tools/actions/snapshot/")
+ sleep(3) # to be sure the user sees this, as compiling clears the screen
end
Snapshot.config[:output_directory] = File.expand_path(Snapshot.config[:output_directory])
verify_helper_is_current
@@ -34,11 +34,11 @@
values[:xcode_path] = File.expand_path("../..", FastlaneCore::Helper.xcode_path)
FastlaneCore::PrintTable.print_values(config: values, hide_keys: [], title: "Summary for snapshot #{Fastlane::VERSION}")
clear_previous_screenshots if Snapshot.config[:clear_previous_screenshots]
- UI.success "Building and running project - this might take some time..."
+ UI.success("Building and running project - this might take some time...")
launcher_config = SimulatorLauncherConfiguration.new(snapshot_config: Snapshot.config)
if Helper.xcode_at_least?(9)
launcher = SimulatorLauncher.new(launcher_configuration: launcher_config)
@@ -77,20 +77,20 @@
params = {
rows: FastlaneCore::PrintTable.transform_output(rows),
headings: ["Device"] + results.values.first.keys,
title: "snapshot results"
}
- puts ""
- puts Terminal::Table.new(params)
- puts ""
+ puts("")
+ puts(Terminal::Table.new(params))
+ puts("")
end
def clear_previous_screenshots
- UI.important "Clearing previously generated screenshots"
+ UI.important("Clearing previously generated screenshots")
path = File.join(Snapshot.config[:output_directory], "*", "*.png")
Dir[path].each do |current|
- UI.verbose "Deleting #{current}"
+ UI.verbose("Deleting #{current}")
File.delete(current)
end
end
# Depending on the Xcode version, the return value is different
@@ -117,18 +117,18 @@
# rubocop:disable Style/Next
def verify_helper_is_current
return if Snapshot.config[:skip_helper_version_check]
current_version = version_of_bundled_helper
- UI.verbose "Checking that helper files contain #{current_version}"
+ UI.verbose("Checking that helper files contain #{current_version}")
helper_files = Update.find_helper
helper_files.each do |path|
content = File.read(path)
unless content.include?(current_version)
- UI.error "Your '#{path}' is outdated, please run `fastlane snapshot update`"
- UI.error "to update your Helper file"
+ UI.error("Your '#{path}' is outdated, please run `fastlane snapshot update`")
+ UI.error("to update your Helper file")
UI.user_error!("Please update your Snapshot Helper file using `fastlane snapshot update`")
end
end
end
# rubocop:enable Style/Next