Sha256: b930bea90aa557cb678e601182fae2787baa2c7eabf31e5edf1f5eb4120dc48e

Contents?: true

Size: 737 Bytes

Versions: 8

Compression:

Stored size: 737 Bytes

Contents

module Fontist
  class GoogleCLI < Thor
    class_option :formulas_path, type: :string, desc: "Path to formulas"

    desc "check", "Check Google fonts for updates"
    def check
      handle_class_options(options)
      require "fontist/import/google_check"
      Fontist::Import::GoogleCheck.new.call
      CLI::STATUS_SUCCESS
    end

    desc "import", "Import Google fonts"
    def import
      handle_class_options(options)
      require "fontist/import/google_import"
      Fontist::Import::GoogleImport.new.call
      CLI::STATUS_SUCCESS
    end

    private

    def handle_class_options(options)
      if options[:formulas_path]
        Fontist.formulas_path = Pathname.new(options[:formulas_path])
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fontist-1.13.1 lib/fontist/google_cli.rb
fontist-1.13.0 lib/fontist/google_cli.rb
fontist-1.12.0 lib/fontist/google_cli.rb
fontist-1.11.7 lib/fontist/google_cli.rb
fontist-1.11.6 lib/fontist/google_cli.rb
fontist-1.11.5 lib/fontist/google_cli.rb
fontist-1.11.3 lib/fontist/google_cli.rb
fontist-1.11.2 lib/fontist/google_cli.rb