Class: Lutaml::Xsd::Commands::PackageCommand::QuickCommand
- Inherits:
-
BaseCommand
- Object
- BaseCommand
- Lutaml::Xsd::Commands::PackageCommand::QuickCommand
- Defined in:
- lib/lutaml/xsd/commands/package_command.rb
Overview
Quick command implementation
Instance Attribute Summary
Attributes inherited from BaseCommand
Instance Method Summary collapse
-
#initialize(config_file, options) ⇒ QuickCommand
constructor
A new instance of QuickCommand.
- #run ⇒ Object
Constructor Details
#initialize(config_file, options) ⇒ QuickCommand
Returns a new instance of QuickCommand.
702 703 704 705 |
# File 'lib/lutaml/xsd/commands/package_command.rb', line 702 def initialize(config_file, ) super() @config_file = config_file end |
Instance Method Details
#run ⇒ Object
707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 |
# File 'lib/lutaml/xsd/commands/package_command.rb', line 707 def run # Step 1: Build package output "═" * 80 output "Step 1: Building package" output "═" * 80 build_cmd = BuildCommand.new(@config_file, ) build_cmd.run output "" # Determine package path package_path = determine_package_path # Step 2: Validate (unless skipped) unless [:no_validate] output "═" * 80 output "Step 2: Validating package" output "═" * 80 = .dup [:format] = "text" validate_cmd = ValidateCommand.new(package_path, ) validate_cmd.run output "" end # Step 3: Show stats (unless skipped) unless [:no_stats] output "═" * 80 output "Step 3: Package statistics" output "═" * 80 require_relative "stats_command" = .dup [:format] = "text" stats_cmd = StatsCommand::ShowCommand.new( package_path, , ) stats_cmd.run output "" end output "═" * 80 output "✓ Quick workflow completed successfully" output "═" * 80 rescue StandardError => e error "Quick workflow failed: #{e.}" verbose_output e.backtrace.join("\n") if verbose? exit 1 end |