Class: Space::Architect::CLI::BaseCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/space_architect/cli/architect.rb

Overview

Optional loop-phase DSL on the shared command base, read by Space::Core::CLI::Help to group the help listing. A command may declare phase <order>, "<Label>"; groups, and members within a group, sort by . Only architect commands declare one — space commands leave it nil and render as the single ungrouped default listing (unchanged).

Class Method Summary collapse

Class Method Details

.commit_message_optionsObject

Declares -m/--message and --message-from on a committing command. Every loop command that commits takes both: the space's git log is the loop's durable memory, so detailed messages are encouraged everywhere.



22
23
24
25
26
27
# File 'lib/space_architect/cli/architect.rb', line 22

def self.commit_message_options
  option :message, aliases: ["-m"], default: nil,
    desc: "Commit message: first line completes the subject after the canonical prefix, the rest becomes the body"
  option :message_from, default: nil,
    desc: "Read the commit message from this file (subject line + detailed body)"
end

.phase(order = nil, label = nil) ⇒ Object



13
14
15
16
17
# File 'lib/space_architect/cli/architect.rb', line 13

def self.phase(order = nil, label = nil)
  return @phase if order.nil?

  @phase = [order, label]
end