Class: Abt::Providers::Devops::Commands::WriteConfig

Inherits:
BaseCommand show all
Defined in:
lib/abt/providers/devops/commands/write_config.rb

Instance Attribute Summary

Attributes inherited from BaseCommand

#config, #path

Attributes inherited from BaseCommand

#ari, #cli, #flags

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseCommand

#initialize

Methods inherited from BaseCommand

#initialize

Constructor Details

This class inherits a constructor from Abt::Providers::Devops::BaseCommand

Class Method Details

.descriptionObject



12
13
14
# File 'lib/abt/providers/devops/commands/write_config.rb', line 12

def self.description
  "Write DevOps settings to .abt.yml"
end

.flagsObject



16
17
18
19
20
# File 'lib/abt/providers/devops/commands/write_config.rb', line 16

def self.flags
  [
    ["-c", "--clean", "Don't reuse configuration"]
  ]
end

.usageObject



8
9
10
# File 'lib/abt/providers/devops/commands/write_config.rb', line 8

def self.usage
  "abt write-config devops[:<organization-name>/<project-name>/<board-id>]"
end

Instance Method Details

#performObject



22
23
24
25
26
27
28
# File 'lib/abt/providers/devops/commands/write_config.rb', line 22

def perform
  prompt_board! if board_name.nil? || flags[:clean]

  update_directory_config!

  warn("DevOps configuration written to #{Abt::DirectoryConfig::FILE_NAME}")
end