Sha256: aca1763f4442070915f22b172305b61abad008042390f2e9ffbece8d0915b78a

Contents?: true

Size: 1.36 KB

Versions: 13

Compression:

Stored size: 1.36 KB

Contents

HighLine.track_eof = false

require 'fastlane/version'
require 'spaceship/playground'
require 'spaceship/spaceauth_runner'

module Spaceship
  class CommandsGenerator
    include Commander::Methods

    def self.start
      self.new.run
    end

    def run
      program :name, 'spaceship'
      program :version, Fastlane::VERSION
      program :description, Spaceship::DESCRIPTION
      program :help, 'Author', 'Felix Krause <spaceship@krausefx.com>'
      program :help, 'Website', 'https://fastlane.tools'
      program :help, 'GitHub', 'https://github.com/fastlane/fastlane/tree/master/spaceship'
      program :help_formatter, :compact

      global_option('-u', '--user USERNAME', 'Specify the Apple ID you want to log in with')

      command :playground do |c|
        c.syntax = 'spaceship playground'
        c.description = 'Run an interactive shell that connects you to Apple web services'

        c.action do |args, options|
          Spaceship::Playground.new(username: options.user).run
        end
      end

      command :spaceauth do |c|
        c.syntax = 'spaceship spaceauth'
        c.description = 'Authentication helper for spaceship/fastlane to work with Apple 2-Step/2FA'

        c.action do |args, options|
          Spaceship::SpaceauthRunner.new(username: options.user).run
        end
      end

      default_command :playground

      run!
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fastlane-2.6.0 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.5.0 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.4.0 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.3.1 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.3.0 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.2.0 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.1.3 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.1.2 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.1.1 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.1.0 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.0.5 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.0.4 spaceship/lib/spaceship/commands_generator.rb
fastlane-2.0.3 spaceship/lib/spaceship/commands_generator.rb