Sha256: 9949964f23d99b63b610efea050ed61381bac1e4279c2cfdf0efa83fbe139812

Contents?: true

Size: 1.36 KB

Versions: 48

Compression:

Stored size: 1.36 KB

Contents

require 'commander'

require 'fastlane_core/configuration/configuration'
require 'fastlane_core/ui/help_formatter'

require_relative 'options'
require_relative 'test_parser'

require_relative 'module'

HighLine.track_eof = false

module Trainer
  class CommandsGenerator
    include Commander::Methods

    def self.start
      self.new.run
    end

    def run
      program :version, Fastlane::VERSION
      program :description, Trainer::DESCRIPTION
      program :help, 'Author', 'Felix Krause <trainer@krausefx.com>'
      program :help, 'Website', 'https://fastlane.tools'
      program :help, 'GitHub', 'https://github.com/KrauseFx/trainer'
      program :help_formatter, :compact

      global_option('--verbose', 'Shows a more verbose output') { $verbose = true }

      always_trace!

      FastlaneCore::CommanderGenerator.new.generate(Trainer::Options.available_options)

      command :run do |c|
        c.syntax = 'trainer'
        c.description = Trainer::DESCRIPTION

        c.action do |args, options|
          options = FastlaneCore::Configuration.create(Trainer::Options.available_options, options.__hash__)
          FastlaneCore::PrintTable.print_values(config: options, title: "Summary for trainer #{Fastlane::VERSION}") if $verbose
          Trainer::TestParser.auto_convert(options)
        end
      end

      default_command(:run)

      run!
    end
  end
end

Version data entries

48 entries across 48 versions & 4 rubygems

Version Path
fastlane-2.226.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.225.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.224.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.223.1 trainer/lib/trainer/commands_generator.rb
fastlane-2.223.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.222.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.221.1 trainer/lib/trainer/commands_generator.rb
fastlane-2.221.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.220.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.219.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.218.0 trainer/lib/trainer/commands_generator.rb
fastlane-security-patched-2.216.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.217.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.216.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.215.1 trainer/lib/trainer/commands_generator.rb
fastlane-2.215.0 trainer/lib/trainer/commands_generator.rb
fastlane-mercafacil-2.214.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.214.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.213.0 trainer/lib/trainer/commands_generator.rb
fastlane-2.212.2 trainer/lib/trainer/commands_generator.rb