Module: Choria::Colt::Debugger
- Defined in:
- lib/choria/colt/debugger.rb
Class Attribute Summary collapse
Class Method Summary collapse
- .root_directory ⇒ Object
-
.save_file(result_set:, filename:, content:) ⇒ Object
This method is helpful to grab raw content to be used as test fixture To do so, copy the generated result set (ie. directory) in relevant fixture directory (e.g. ‘spec/fixtures/orchestrator/task/result_sets`).
Class Attribute Details
.enabled ⇒ Object
7 8 9 |
# File 'lib/choria/colt/debugger.rb', line 7 def enabled @enabled ||= false end |
Class Method Details
.root_directory ⇒ Object
11 12 13 |
# File 'lib/choria/colt/debugger.rb', line 11 def root_directory 'colt-debug' end |
.save_file(result_set:, filename:, content:) ⇒ Object
This method is helpful to grab raw content to be used as test fixture To do so, copy the generated result set (ie. directory) in relevant fixture directory (e.g. ‘spec/fixtures/orchestrator/task/result_sets`)
17 18 19 20 21 22 23 24 |
# File 'lib/choria/colt/debugger.rb', line 17 def save_file(result_set:, filename:, content:) directory = File.join Colt::Debugger.root_directory, result_set FileUtils.mkdir_p directory path = File.join directory, filename File.write(path, content) path end |