class Fastlane::Actions::EmojiFetcherAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/emoji_fetcher/actions/emoji_fetcher_action.rb, line 18
def self.authors
  ["Felix Krause"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/emoji_fetcher/actions/emoji_fetcher_action.rb, line 22
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :path,
                            env_name: "EMOJI_FETCHER_PATH",
                         description: "Path to which the emoji file should be copied to",
                            optional: false,
                                type: String)
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/emoji_fetcher/actions/emoji_fetcher_action.rb, line 14
def self.description
  "Fetch the emoji font file and copy it into a local directory"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/emoji_fetcher/actions/emoji_fetcher_action.rb, line 32
def self.is_supported?(platform)
  true
end
run(params) click to toggle source
# File lib/fastlane/plugin/emoji_fetcher/actions/emoji_fetcher_action.rb, line 4
def self.run(params)
  require 'fileutils'

  paths = ["/System/Library/Fonts/Apple Color Emoji.ttc", "/System/Library/Fonts/Apple Color Emoji.ttf"]
  paths = paths.delete_if? { |a| !File.exist?(a) }
  UI.user_error!("Could not find Emoji font.") if paths.count == 0
  FileUtils.cp(paths.first, params[:path])
  UI.success("Successfully fetched Emoji font")
end