Class: Specwrk::Web::Endpoints::Report
- Defined in:
- lib/specwrk/web/endpoints/report.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Specwrk::Web::Endpoints::Base
Instance Method Details
#with_response ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/specwrk/web/endpoints/report.rb', line 9 def with_response completed_dump = completed.dump completed_dump[:meta][:unexecuted] = pending.length + processing.length completed_dump[:flakes] = failure_counts.to_h.reject { |id, _count| completed_dump.dig(:examples, id, :status) == "failed" } [200, {"content-type" => "application/json"}, [JSON.generate(completed_dump)]] end |