Module: Ace::Git::CLI
- Extended by:
- Support::Cli::RegistryDsl
- Defined in:
- lib/ace/git/cli.rb,
lib/ace/git/cli/commands/pr.rb,
lib/ace/git/cli/commands/diff.rb,
lib/ace/git/cli/commands/branch.rb,
lib/ace/git/cli/commands/status.rb
Overview
ace-support-cli command registry for ace-git.
Defined Under Namespace
Modules: Commands
Constant Summary collapse
- PROGRAM_NAME =
"ace-git"- REGISTERED_COMMANDS =
[ ["diff", "Show filtered git diff output"], ["status", "Show repository status and PR context"], ["branch", "Show current branch information"], ["pr", "Show pull request information"] ].freeze
- HELP_EXAMPLES =
[ "ace-git diff --since 7d # Changes from last week", "ace-git diff -p 'lib/**' -f summary # Filtered summary", "ace-git status --no-pr # Quick status, skip network" ].freeze
Class Method Summary collapse
-
.normalized_args(argv) ⇒ Object
Normalize arguments to handle empty args and git range patterns.
-
.start(args) ⇒ Object
Entry point for CLI invocation (used by tests via cli_helpers).
Class Method Details
.normalized_args(argv) ⇒ Object
Normalize arguments to handle empty args and git range patterns. Extracted from exe/ace-git for in-process testability.
29 30 31 32 33 34 |
# File 'lib/ace/git/cli.rb', line 29 def self.normalized_args(argv) return ["--help"] if argv.empty? return ["diff"] + argv if git_range_pattern?(argv.first) argv end |
.start(args) ⇒ Object
Entry point for CLI invocation (used by tests via cli_helpers)
Mirrors the exe’s normalized_args logic so in-process tests can exercise range-pattern routing.
23 24 25 |
# File 'lib/ace/git/cli.rb', line 23 def self.start(args) Ace::Support::Cli::Runner.new(self).call(args: normalized_args(args)) end |