Class: Fontist::Import::GoogleImport Deprecated

Inherits:
Object
  • Object
show all
Defined in:
lib/fontist/import/google_import.rb

Overview

Deprecated.

This class is deprecated and maintained only for backward compatibility. Use GoogleImporter instead which provides:

  • Better error handling and retry logic

  • Parallel processing support

  • Configuration-driven customization

  • Progress reporting

  • Comprehensive logging

Legacy Google Fonts import class

Examples:

Migration to new system

# Old way (deprecated)
GoogleImport.new(max_count: 10).call

# New way (recommended)
GoogleImporter.new(max_count: 10).import

Constant Summary collapse

REPO_PATH =
Fontist.fontist_path.join("google", "fonts")
REPO_URL =
"https://github.com/google/fonts.git".freeze

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ GoogleImport

Deprecated.

Use GoogleImporter#new instead

Returns a new instance of GoogleImport.



31
32
33
34
35
# File 'lib/fontist/import/google_import.rb', line 31

def initialize(options)
  warn_deprecation
  @max_count = options[:max_count] || Google::DEFAULT_MAX_COUNT
  @options = options
end

Instance Method Details

#callObject

Deprecated.

Use GoogleImporter#import instead



38
39
40
41
42
43
44
45
46
47
# File 'lib/fontist/import/google_import.rb', line 38

def call
  warn_deprecation

  # For backward compatibility, delegate to new GoogleImporter
  if use_new_importer?
    delegate_to_new_importer
  else
    legacy_import
  end
end