Class: Makit::Makit::Cli::TraceCommands
- Inherits:
-
Base
- Object
- Base
- Makit::Makit::Cli::TraceCommands
- Defined in:
- lib/makit/cli/strategy_commands.rb
Overview
Commands for managing trace functionality
Instance Method Summary collapse
Instance Method Details
#disable ⇒ Object
138 139 140 141 |
# File 'lib/makit/cli/strategy_commands.rb', line 138 def disable ENV.delete('MAKIT_TRACE') puts "Enhanced tracing disabled" end |
#enable ⇒ Object
131 132 133 134 135 |
# File 'lib/makit/cli/strategy_commands.rb', line 131 def enable ENV['MAKIT_TRACE'] = 'true' puts "Enhanced tracing enabled" puts "Run 'rake --trace' to see enhanced output" end |
#test ⇒ Object
144 145 146 147 148 |
# File 'lib/makit/cli/strategy_commands.rb', line 144 def test puts "Testing trace functionality..." puts "Run: rake --trace" puts "You should see [MAKIT] prefixed trace output for makit-related tasks" end |
#trace ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/makit/cli/strategy_commands.rb', line 110 def trace puts "Makit Trace Status:" puts "=" * 30 status = Makit::Rake.status puts "Enhanced Tracing: #{Makit::Rake.tracing_enabled? ? 'Enabled' : 'Disabled'}" puts "Rake Trace: #{status[:trace_controller][:rake_trace] || 'Not set'}" puts "Trace Flag: #{status[:trace_controller][:trace_flag] ? 'Present' : 'Not present'}" puts "Makit Trace: #{status[:trace_controller][:makit_trace] || 'Not set'}" puts "Verbose Mode: #{status[:verbose] ? 'Enabled' : 'Disabled'}" if [:verbose] puts "\nDetailed Information:" puts " Strategy: #{status[:strategy][:type] || 'Unknown'}" puts " Class: #{status[:strategy][:class] || 'Unknown'}" puts " Factory Info: #{status[:strategy][:factory_info] || 'Not available'}" end end |