-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moving simplecov progress to its own service
- Loading branch information
Showing
4 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module Projects | ||
class SimplecovProgress | ||
attr_reader :project | ||
|
||
def initialize(project) | ||
@project = project | ||
end | ||
|
||
def call | ||
# TODO: could be improved to only get the last report of each date. | ||
# TODO: could be improved to remove blank coverage reports at the SQL level. | ||
project.reports.where(branch: "main").order(:created_at).map do |report| | ||
next if report.general_coverage.blank? | ||
|
||
[ report.created_at, report.general_coverage ] | ||
end.compact | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters