class Fastlane::Actions::AdLicenselintAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/ad_licenselint/actions/ad_licenselint_action.rb, line 29
def self.authors
  ["Pierre Felgines"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/ad_licenselint/actions/ad_licenselint_action.rb, line 43
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :format,
                            env_name: "AD_LICENSE_LINT_FORMAT",
                         description: "The format of the output (#{ADLicenseLint::Constant::AVAILABLE_OPTIONS})",
                            optional: true,
                       default_value: ADLicenseLint::Constant::MARKDOWN_FORMAT_OPTION,
                                type: String),
    FastlaneCore::ConfigItem.new(key: :path,
                            env_name: "AD_LICENSE_LINT_PATH",
                         description: "The path of the directory that contains the Podfile",
                            optional: true,
                       default_value: ".",
                                type: String),
    FastlaneCore::ConfigItem.new(key: :all,
                            env_name: "AD_LICENSE_LINT_FORMAT",
                         description: "Display all the licenses",
                            optional: true,
                       default_value: false,
                           is_string: false),
    FastlaneCore::ConfigItem.new(key: :only,
                            env_name: "AD_LICENSE_LINT_FORMAT",
                         description: "Subset of pods",
                            optional: true,
                                type: Array),
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/ad_licenselint/actions/ad_licenselint_action.rb, line 25
def self.description
  "Lint the licenses for iOS projects"
end
details() click to toggle source
# File lib/fastlane/plugin/ad_licenselint/actions/ad_licenselint_action.rb, line 39
def self.details
  "Lint the licenses for iOS projects"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/ad_licenselint/actions/ad_licenselint_action.rb, line 78
def self.is_supported?(platform)
  platform == :ios
end
output() click to toggle source
# File lib/fastlane/plugin/ad_licenselint/actions/ad_licenselint_action.rb, line 71
def self.output
  [
    ['AD_LICENSE_LINT_REPORT', 'Hash representation of the report'],
    ['AD_LICENSE_LINT_SUMMARY', 'Formatted string of the result']
  ]
end
return_value() click to toggle source
# File lib/fastlane/plugin/ad_licenselint/actions/ad_licenselint_action.rb, line 33
def self.return_value
  [
    "A string that displays licenses with warnings"
  ].join("\n")
end
run(params) click to toggle source
# File lib/fastlane/plugin/ad_licenselint/actions/ad_licenselint_action.rb, line 13
def self.run(params)
  runner = ADLicenseLint::Runner.new({
    format: params[:format],
    path: params[:path],
    all: params[:all],
    only: params[:only]
  })
  report = runner.create_report
  Actions.lane_context[SharedValues::AD_LICENSE_LINT_REPORT] = report.to_hash
  Actions.lane_context[SharedValues::AD_LICENSE_LINT_SUMMARY] = runner.format(report)
end