Class: Abt::Providers::Harvest::Commands::WriteConfig
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
Class Method Details
.description ⇒ Object
12
13
14
|
# File 'lib/abt/providers/harvest/commands/write_config.rb', line 12
def self.description
"Write Harvest settings to .abt.yml"
end
|
.flags ⇒ Object
16
17
18
19
20
|
# File 'lib/abt/providers/harvest/commands/write_config.rb', line 16
def self.flags
[
["-c", "--clean", "Don't reuse configuration"]
]
end
|
.usage ⇒ Object
8
9
10
|
# File 'lib/abt/providers/harvest/commands/write_config.rb', line 8
def self.usage
"abt write-config harvest[:<project-id>[/<task-id>]]"
end
|
Instance Method Details
22
23
24
25
26
27
28
29
|
# File 'lib/abt/providers/harvest/commands/write_config.rb', line 22
def perform
prompt_project! if project_id.nil? || flags[:clean]
prompt_task! if task_id.nil? || flags[:clean]
update_directory_config!
warn("Harvest configuration written to #{Abt::DirectoryConfig::FILE_NAME}")
end
|