lib/fontist/font_installer.rb in fontist-1.8.9 vs lib/fontist/font_installer.rb in fontist-1.8.10

- old
+ new

@@ -1,12 +1,13 @@ require "fontist/utils" require "excavate" module Fontist class FontInstaller - def initialize(formula) + def initialize(formula, no_progress: false) @formula = formula + @no_progress = no_progress end def install(confirmation:) if @formula.license_required && !"yes".casecmp?(confirmation) raise(Fontist::Errors::LicensingError) @@ -58,10 +59,10 @@ Fontist::Utils::Downloader.download( url, sha: source.sha256, file_size: source.file_size, - progress_bar: true + progress_bar: !@no_progress ) end def font_file?(path) source_file?(path) && font_directory?(path)