Class: Terrestrial::Cli::Photoshoot

Inherits:
Command
  • Object
show all
Defined in:
lib/terrestrial/cli/photoshoot.rb

Instance Method Summary collapse

Methods inherited from Command

#initialize, run

Constructor Details

This class inherits a constructor from Terrestrial::Cli::Command

Instance Method Details

#runObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/terrestrial/cli/photoshoot.rb', line 5

def run
  Config.load!
  MixpanelClient.track("cli-photoshoot-command")
  @scheme = opts[:scheme]

  validate_inputs!
  print_progress_message

  TerminalUI.show_spinner do
    launcher = SimulatorLauncher.new(scheme: scheme, args: {
      'TerrestrialScreenShotMode' => true,
      'TerrestrialAPIToken' => Config[:api_key],
      'TerrestrialAppId' => Config[:app_id],
      'TerrestrialProjectId' => Config[:project_id],
      'TerrestrialURL' => Config[:api_url]
    })

    launcher.run
  end
end