Sha256: a27c0cb1c5c37844a99439ead5f379d94c6244532fe12c50776470c27ccec544

Contents?: true

Size: 606 Bytes

Versions: 20

Compression:

Stored size: 606 Bytes

Contents

require_relative "google/new_fonts_fetcher"

module Fontist
  module Import
    class GoogleCheck
      def call
        fetch_formulas
        fonts = new_fonts
        indicate(fonts)
      end

      private

      def fetch_formulas
        Formula.update_formulas_repo
      end

      def new_fonts
        Fontist::Import::Google::NewFontsFetcher.new(logging: true).call
      end

      def indicate(new_paths)
        return if new_paths.empty?

        puts "New fonts are available in:"
        new_paths.each do |path|
          puts path
        end

        abort
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fontist-1.9.3 lib/fontist/import/google_check.rb
fontist-1.9.2 lib/fontist/import/google_check.rb
fontist-1.11.1 lib/fontist/import/google_check.rb
fontist-1.10.1 lib/fontist/import/google_check.rb
fontist-1.10.0 lib/fontist/import/google_check.rb
fontist-1.9.1 lib/fontist/import/google_check.rb
fontist-1.9.0 lib/fontist/import/google_check.rb
fontist-1.8.13 lib/fontist/import/google_check.rb
fontist-1.8.12 lib/fontist/import/google_check.rb
fontist-1.8.11 lib/fontist/import/google_check.rb
fontist-1.8.10 lib/fontist/import/google_check.rb
fontist-1.8.9 lib/fontist/import/google_check.rb
fontist-1.8.8 lib/fontist/import/google_check.rb
fontist-1.8.7 lib/fontist/import/google_check.rb
fontist-1.8.6 lib/fontist/import/google_check.rb
fontist-1.8.5 lib/fontist/import/google_check.rb
fontist-1.8.4 lib/fontist/import/google_check.rb
fontist-1.8.3 lib/fontist/import/google_check.rb
fontist-1.8.2 lib/fontist/import/google_check.rb
fontist-1.8.1 lib/fontist/import/google_check.rb