Open
Description
We need to create a Rake task in the lib/tasks/ directory that reads the information in the database and generates a summary or roll-up of the data.
The file should be call lib/tasks/report.rake
.
The task should be run like this:
$ rake report
{
"updated_at": "2021-04-14",
"namespaces": {
"count": 20
},
"buildpacks": {
"count": 150
}
}
Future work
When the task runs with the --db
flag, it will update a new summary
table in the database instead of outputting JSON. The summary
table will be created with a Rail migration and accessed with a new model class. We will also implement a controller and route to expose the data (i.e. rails generate scaffold
).
Metadata
Metadata
Assignees
Labels
No labels