Class: Makit::Rake::TraceController
- Inherits:
-
Object
- Object
- Makit::Rake::TraceController
- Defined in:
- lib/makit/rake/trace_controller.rb
Overview
Enhanced trace controller for Rake with Makit-specific debugging information
This class provides enhanced tracing capabilities when –trace is passed to rake, adding makit-specific debugging information to help with troubleshooting and understanding command execution flow.
Class Method Summary collapse
-
.setup ⇒ void
Set up enhanced tracing for Rake tasks.
-
.should_enhance_trace? ⇒ Boolean
Check if trace enhancement should be enabled.
-
.trace_status ⇒ Hash
Get current trace status.
Class Method Details
.setup ⇒ void
This method returns an undefined value.
Set up enhanced tracing for Rake tasks
This method should be called early in the Rakefile to enable enhanced tracing when –trace is passed to rake.
25 26 27 28 29 30 31 |
# File 'lib/makit/rake/trace_controller.rb', line 25 def self.setup return unless should_enhance_trace? # Set up enhanced tracing setup_enhanced_tracing Makit::Logging.debug("Enhanced trace controller activated") if defined?(Makit::Logging) end |
.should_enhance_trace? ⇒ Boolean
Check if trace enhancement should be enabled
36 37 38 39 40 |
# File 'lib/makit/rake/trace_controller.rb', line 36 def self.should_enhance_trace? ENV['RAKE_TRACE'] || ARGV.include?('--trace') || ENV['MAKIT_TRACE'] == 'true' end |
.trace_status ⇒ Hash
Get current trace status
45 46 47 48 49 50 51 52 |
# File 'lib/makit/rake/trace_controller.rb', line 45 def self.trace_status { rake_trace: ENV['RAKE_TRACE'], trace_flag: ARGV.include?('--trace'), makit_trace: ENV['MAKIT_TRACE'], enhanced: should_enhance_trace? } end |