lib/scan/commands_generator.rb in scan-0.5.2 vs lib/scan/commands_generator.rb in scan-0.6.0
- old
+ new
@@ -25,11 +25,11 @@
def run
program :version, Scan::VERSION
program :description, Scan::DESCRIPTION
program :help, "Author", "Felix Krause <scan@krausefx.com>"
program :help, "Website", "https://fastlane.tools"
- program :help, "GitHub", "https://github.com/fastlane/scan"
+ program :help, "GitHub", "https://github.com/fastlane/fastlane/tree/master/scan"
program :help_formatter, :compact
global_option("--verbose") { $verbose = true }
command :tests do |c|
@@ -46,13 +46,13 @@
c.syntax = "scan init"
c.description = "Creates a new Scanfile for you"
c.action do |_args, options|
containing = (Helper.fastlane_enabled? ? 'fastlane' : '.')
path = File.join(containing, Scan.scanfile_name)
- raise "Scanfile already exists".yellow if File.exist?(path)
+ UI.user_error!("Scanfile already exists").yellow if File.exist?(path)
template = File.read("#{Helper.gem_path('scan')}/lib/assets/ScanfileTemplate")
File.write(path, template)
- Helper.log.info "Successfully created '#{path}'. Open the file using a code editor.".green
+ UI.success("Successfully created '#{path}'. Open the file using a code editor.")
end
end
default_command :tests