lib/coverband/reporters/web.rb in coverband-4.2.4.rc.3 vs lib/coverband/reporters/web.rb in coverband-4.2.4
- old
+ new
@@ -53,10 +53,12 @@
[200, { 'Content-Type' => 'text/html' }, [settings]]
when %r{\/view_tracker_data}
[200, { 'Content-Type' => 'text/json' }, [view_tracker_data]]
when %r{\/view_tracker}
[200, { 'Content-Type' => 'text/html' }, [view_tracker]]
+ when %r{\/enriched_debug_data}
+ [200, { 'Content-Type' => 'text/json' }, [enriched_debug_data]]
when %r{\/debug_data}
[200, { 'Content-Type' => 'text/json' }, [debug_data]]
when %r{\/load_file_details}
[200, { 'Content-Type' => 'text/json' }, [load_file_details]]
when %r{\/$}
@@ -93,9 +95,17 @@
Coverband::Collectors::ViewTracker.new(store: Coverband.configuration.store).as_json
end
def debug_data
Coverband.configuration.store.get_coverage_report.to_json
+ end
+
+ def enriched_debug_data
+ Coverband::Reporters::HTMLReport.new(Coverband.configuration.store,
+ static: false,
+ base_path: base_path,
+ notice: '',
+ open_report: false).report_data
end
def load_file_details
filename = request.params['filename']
Coverband::Reporters::HTMLReport.new(Coverband.configuration.store,