[obs-commits] [openSUSE/open-build-service] fc5769: Rewrite BsRequest query methods as scopes
Branch: refs/heads/staging-workflow Home: https://github.com/openSUSE/open-build-service Commit: fc57699a4c32a607d51685f0481e94fb6a580f29 https://github.com/openSUSE/open-build-service/commit/fc57699a4c32a607d51685... Author: Björn Geuken <bgeuken@suse.de> Date: 2018-11-19 (Mon, 19 Nov 2018) Changed paths: M src/api/app/controllers/webui/obs_factory/staging_projects_controller.rb M src/api/app/models/bs_request.rb M src/api/app/models/obs_factory/distribution.rb M src/api/spec/models/bs_request_spec.rb Log Message: ----------- Rewrite BsRequest query methods as scopes These methods where used to query requests that contain reviews that match the query attributes. All of this can be done withActiveRecord::QueryMethods and a few scopes. This also required a change of how we ordered requests in the staging controller, since we couldn't use the Array#sort anymore. A nice side-effect of this is that we now do the request sorting as part of the SQL query. Co-authored-by: Dany Marcoux <dmarcoux@suse.com> Commit: 90189457a35cf917ca4b6149e303924289bd2f3e https://github.com/openSUSE/open-build-service/commit/90189457a35cf917ca4b61... Author: Björn Geuken <bgeuken@suse.de> Date: 2018-11-19 (Mon, 19 Nov 2018) Changed paths: M src/api/app/controllers/webui/obs_factory/staging_projects_controller.rb M src/api/app/models/bs_request.rb M src/api/app/models/obs_factory/distribution.rb M src/api/spec/models/bs_request_spec.rb Log Message: ----------- Merge pull request #6180 from bgeuken/refactor_review_scopes Move BsRequest#with_reviews to the review model Compare: https://github.com/openSUSE/open-build-service/compare/af1108784ffc...901894... **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
participants (1)
-
Björn Geuken