Class: Spaceship::Launcher
- Inherits:
-
Object
- Object
- Spaceship::Launcher
- Defined in:
- lib/spaceship/launcher.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
Login Helper collapse
-
#login(user, password) ⇒ Spaceship::Client
Authenticates with Apple’s web services.
-
#select_team ⇒ String
Open up the team selection for the user (if necessary).
Helper methods for managing multiple instances of spaceship collapse
-
#app ⇒ Class
Access the apps for this spaceship.
-
#app_group ⇒ Class
Access the app groups for this spaceship.
-
#certificate ⇒ Class
Access the certificates for this spaceship.
-
#device ⇒ Class
Access the devices for this spaceship.
-
#provisioning_profile ⇒ Class
Access the provisioning profiles for this spaceship.
Instance Method Summary collapse
-
#initialize(user = nil, password = nil) ⇒ Launcher
constructor
Launch a new spaceship, which can be used to maintain multiple instances of spaceship.
Constructor Details
#initialize(user = nil, password = nil) ⇒ Launcher
Launch a new spaceship, which can be used to maintain multiple instances of spaceship. You can call ‘.new` without any parameters, but you’ll have to call ‘.login` at a later point. If you prefer, you can pass the login credentials here already.
Authenticates with Apple’s web services. This method has to be called once to generate a valid session. The session will automatically be used from then on.
This method will automatically use the username from the Appfile (if available) and fetch the password from the Keychain (if available)
21 22 23 24 25 26 27 |
# File 'lib/spaceship/launcher.rb', line 21 def initialize(user = nil, password = nil) @client = PortalClient.new if user or password @client.login(user, password) end end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
3 4 5 |
# File 'lib/spaceship/launcher.rb', line 3 def client @client end |
Instance Method Details
#app ⇒ Class
Returns Access the apps for this spaceship.
70 71 72 |
# File 'lib/spaceship/launcher.rb', line 70 def app Spaceship::App.set_client(@client) end |
#app_group ⇒ Class
Returns Access the app groups for this spaceship.
75 76 77 |
# File 'lib/spaceship/launcher.rb', line 75 def app_group Spaceship::AppGroup.set_client(@client) end |
#certificate ⇒ Class
Returns Access the certificates for this spaceship.
85 86 87 |
# File 'lib/spaceship/launcher.rb', line 85 def certificate Spaceship::Certificate.set_client(@client) end |
#device ⇒ Class
Returns Access the devices for this spaceship.
80 81 82 |
# File 'lib/spaceship/launcher.rb', line 80 def device Spaceship::Device.set_client(@client) end |
#login(user, password) ⇒ Spaceship::Client
Authenticates with Apple’s web services. This method has to be called once to generate a valid session. The session will automatically be used from then on.
This method will automatically use the username from the Appfile (if available) and fetch the password from the Keychain (if available)
46 47 48 |
# File 'lib/spaceship/launcher.rb', line 46 def login(user, password) @client.login(user, password) end |
#provisioning_profile ⇒ Class
Returns Access the provisioning profiles for this spaceship.
90 91 92 |
# File 'lib/spaceship/launcher.rb', line 90 def provisioning_profile Spaceship::ProvisioningProfile.set_client(@client) end |
#select_team ⇒ String
Open up the team selection for the user (if necessary).
If the user is in multiple teams, a team selection is shown. The user can then select a team by entering the number
Additionally, the team ID is shown next to each team name so that the user can use the environment variable ‘FASTLANE_TEAM_ID` for future user.
61 62 63 |
# File 'lib/spaceship/launcher.rb', line 61 def select_team @client.select_team end |