Class: Equilibrium::Commands::ExpectedCommand

Inherits:
Object
  • Object
show all
Includes:
Mixins::ErrorHandling, Mixins::InputOutput
Defined in:
lib/equilibrium/commands/expected_command.rb

Overview

Command for generating expected mutable tags based on semantic versions

Instance Method Summary collapse

Methods included from Mixins::InputOutput

#format_output, #read_input_data

Methods included from Mixins::ErrorHandling

#with_error_handling

Instance Method Details

#execute(registry, options = {}) ⇒ Object

Execute the expected command

Parameters:

  • registry (String)

    Repository URL

  • options (Hash) (defaults to: {})

    Command options (format, etc.)



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/equilibrium/commands/expected_command.rb', line 20

def execute(registry, options = {})
  with_error_handling do
    full_repository_url = RepositoryUrlValidator.validate(registry)

    # Generate complete expected output using high-level service
    output = TagsOperationService.generate_expected_output(full_repository_url)

    # Validate output against schema before writing
    SchemaValidator.validate!(output, Equilibrium::Schemas::EXPECTED_ACTUAL, error_prefix: "Schema validation failed")

    # Format and display output
    format_output(output, options[:format] || "summary", "expected")
  end
end