Class: Papa::CLI::Integration

Inherits:
Thor
  • Object
show all
Defined in:
lib/papa/cli/integration.rb

Instance Method Summary collapse

Methods inherited from Thor

exit_on_failure?

Instance Method Details

#addObject



18
19
20
21
22
23
24
# File 'lib/papa/cli/integration.rb', line 18

def add
  version = options[:version]
  branches = options[:branches] || []

  require 'papa/task/integration/add'
  Task::Integration::Add.new(version, branches).run
end

#deployObject



29
30
31
32
33
34
35
36
37
# File 'lib/papa/cli/integration.rb', line 29

def deploy
  version = options[:version]
  # Renamed to subdomain because `-h` is already assigned to `papa integration help`.
  # Will still be referred to as `hostname` from here onwards.
  hostname = options[:subdomain]

  require 'papa/task/integration/deploy'
  Task::Integration::Deploy.new(version, hostname).run
end

#startObject



7
8
9
10
11
12
13
# File 'lib/papa/cli/integration.rb', line 7

def start
  base_branch = options[:base_branch]
  task_options = { override_branch_name: options[:override_branch_name] }

  require 'papa/task/integration/start'
  Task::Integration::Start.new(base_branch, task_options).run
end