-
- Downloads
There was an error fetching the commit references. Please try again later.
Refactor ProjectsFinder to not pluck IDs
This class now uses a UNION (when needed) instead of plucking tens of thousands of project IDs into memory. The tests have also been re-written to ensure all different use cases are tested properly (assuming I didn't forget any cases). The finder has also been broken up into 3 different finder classes: * ContributedProjectsFinder: class for getting the projects a user contributed to. * PersonalProjectsFinder: class for getting the personal projects of a user. * ProjectsFinder: class for getting generic projects visible to a given user. Previously a lot of the logic of these finders was handled directly in the users controller.
Showing
- app/finders/contributed_projects_finder.rb 37 additions, 0 deletionsapp/finders/contributed_projects_finder.rb
- app/finders/personal_projects_finder.rb 37 additions, 0 deletionsapp/finders/personal_projects_finder.rb
- app/finders/projects_finder.rb 54 additions, 67 deletionsapp/finders/projects_finder.rb
- spec/finders/contributed_projects_finder_spec.rb 35 additions, 0 deletionsspec/finders/contributed_projects_finder_spec.rb
- spec/finders/personal_projects_finder_spec.rb 34 additions, 0 deletionsspec/finders/personal_projects_finder_spec.rb
- spec/finders/projects_finder_spec.rb 40 additions, 35 deletionsspec/finders/projects_finder_spec.rb
app/finders/contributed_projects_finder.rb
0 → 100644
app/finders/personal_projects_finder.rb
0 → 100644
Please register or sign in to comment