Class: SpecForge::CLI::Run

Inherits:
Command
  • Object
show all
Defined in:
lib/spec_forge/cli/run.rb

Overview

Command for running SpecForge blueprints with filtering and output options

Executes workflow blueprints with support for file filtering, tag-based selection, and configurable verbosity levels for output detail.

Examples:

Running all blueprints

spec_forge run

Running specific blueprint

spec_forge run users_workflow

Running with tags

spec_forge run --tags smoke

Instance Attribute Summary

Attributes inherited from Command

#arguments, #options

Instance Method Summary collapse

Methods inherited from Command

aliases, example, #initialize, option, register

Methods included from Actions

included

Constructor Details

This class inherits a constructor from SpecForge::CLI::Command

Instance Method Details

#callvoid

This method returns an undefined value.

Executes the workflow blueprints with specified filters and options



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/spec_forge/cli/run.rb', line 72

def call
  base_path = determine_path
  tags = parse_tags(options.tags)
  skip_tags = parse_tags(options.skip_tags)
  verbosity_level = determine_verbosity_level

  blueprints, forge_hooks = Loader.load_blueprints(base_path:, tags:, skip_tags:)

  if blueprints.empty?
    puts "No blueprints found matching the criteria."
    exit(0)
  end

  Forge.ignite.run(blueprints, verbosity_level:, hooks: forge_hooks)
end