Method: Spaceship::Playground#run

Defined in:
spaceship/lib/spaceship/playground.rb

#runObject

[View source]

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'spaceship/lib/spaceship/playground.rb', line 34

def run
  begin
    puts("Logging into to App Store Connect (#{@username})...")
    Spaceship::Tunes.(@username)
    puts("Successfully logged in to App Store Connect".green)
    puts("")
  rescue
    puts("Could not login to App Store Connect...".red)
  end
  begin
    puts("Logging into the Developer Portal (#{@username})...")
    Spaceship::Portal.(@username)
    puts("Successfully logged in to the Developer Portal".green)
    puts("")
  rescue
    puts("Could not login to the Developer Portal...".red)
  end

  puts("---------------------------------------".green)
  puts("| Welcome to the spaceship playground |".green)
  puts("---------------------------------------".green)
  puts("")
  puts("Enter #{'docs'.yellow} to open up the documentation")
  puts("Enter #{'exit'.yellow} to exit the spaceship playground")
  puts("Enter #{'_'.yellow} to access the return value of the last executed command")
  puts("")
  puts("Just enter the commands and confirm with Enter".green)

  # rubocop:disable Lint/Debugger
  binding.pry(quiet: true)
  # rubocop:enable Lint/Debugger

  puts("") # Fixes https://github.com/fastlane/fastlane/issues/3493
end