class Fastlane::Actions::FigletAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/figlet/actions/figlet_action.rb, line 15
def self.authors
  ["Jeff Stein"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/figlet/actions/figlet_action.rb, line 19
def self.available_options
  [
      FastlaneCore::ConfigItem.new(key: :text,
                                   env_name: "FL_FIGLET_TEXT",
                                   description: "Text to ASCII-ify",
                                   optional: false,
                                   verify_block: proc do |value|
                                     raise "No text given, pass using `text: 'STRING'`".red unless value and !value.empty?
                                   end),
      FastlaneCore::ConfigItem.new(key: :font,
                                   env_name: "FL_FIGLET_FONT",
                                   description: "custom figlet font",
                                   type: String,
                                   default_value: "standard",
                                   optional: true)
    # FastlaneCore::ConfigItem.new(key: :your_option,
    #                         env_name: "FIGLET_YOUR_OPTION",
    #                      description: "A description of your option",
    #                         optional: false,
    #                             type: String)
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/figlet/actions/figlet_action.rb, line 11
def self.description
  "Wrapper around figlet which will print large ascii-art text words.  Useful for reading through log files"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/figlet/actions/figlet_action.rb, line 42
def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
  #
  # [:ios, :mac, :android].include?(platform)
  true
end
run(params) click to toggle source
# File lib/fastlane/plugin/figlet/actions/figlet_action.rb, line 4
def self.run(params)
  text = params[:text]
  font = params[:font]
  output = `figlet  -f #{font}  #{text.upcase}`
  puts output
end