gitlab-org--gitlab-foss/spec/models
Robert Speicher b4e84809e8 Merge branch 'finding-multiple-projects-by-paths' into 'master'
Add Project.where_paths_in

In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4410 I'm working on reducing the SQL queries needed to render Markdown. One reason for the large amount of queries is executing a large number of queries needed to find projects and related data. Basically `Project.find_with_namespace` is called in a loop and then any relations have to be retrieved separately.

By using `Project.where_paths_in` we can work around this by doing something like:

```ruby
project_paths = [...] # populated by some method
projects = Project.where_paths_in(project_paths).includes(:namespace, ...)
```

Ref: https://gitlab.com/gitlab-org/gitlab-ce/issues/18042

See merge request !4535
2016-06-10 17:17:19 +00:00
..
ci Rename all [ci_]commit to [ci_]pipeline in specs and features 2016-06-03 16:22:26 +02:00
concerns Fix pseudo n+1 queries with Note and Note Authors in issuables APIs 2016-06-08 10:26:05 -04:00
hooks Codestyle: make sure we have space around operators 2016-05-13 04:46:56 -03:00
members Fix broken specs 2016-05-21 23:11:26 +07:00
project_services Fixing specs stubbed objects cannot access database 2016-06-10 15:41:56 +02:00
ability_spec.rb Refactor Participable 2016-06-01 16:22:35 +02:00
abuse_report_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
appearance_spec.rb Branded login page also in CE 2016-02-26 15:50:51 +01:00
application_setting_spec.rb stub Devise.omniauth_providers to return GitHub even if the gitlab.yml has no omniauth provider enabled 2016-05-12 13:44:46 +03:00
award_emoji_spec.rb Incorportate feedback 2016-06-01 12:10:08 +02:00
blob_spec.rb Add a Blob model that wraps Gitlab::Git::Blob 2016-02-18 22:45:30 -05:00
broadcast_message_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
build_spec.rb Rename commit to pipeline in TriggerRequest 2016-06-09 17:57:07 +02:00
commit_range_spec.rb Fix note validation spec failures 2016-06-01 10:31:46 -07:00
commit_spec.rb Refactor Participable 2016-06-01 16:22:35 +02:00
commit_status_spec.rb Rename all [ci_]commit to [ci_]pipeline in specs and features 2016-06-03 16:22:26 +02:00
deploy_key_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
deploy_keys_project_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
email_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
event_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
external_issue_spec.rb Hide number sign for string prefixed external issues 2016-04-12 10:01:52 +02:00
forked_project_link_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
generic_commit_status_spec.rb Rename all [ci_]commit to [ci_]pipeline in specs and features 2016-06-03 16:22:26 +02:00
global_milestone_spec.rb Fix Error 500 when global milestones have slashes 2015-12-22 13:15:32 -08:00
group_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
identity_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
issue_spec.rb Update specs. Add CHANGELOG entry 2016-06-02 09:25:40 -04:00
jira_issue_spec.rb Backport JIRA service 2015-12-18 14:19:48 -06:00
key_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
label_link_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
label_spec.rb Merge branch 'remove-annotate-gem' into 'master' 2016-05-10 09:08:30 +00:00
legacy_diff_note_spec.rb Improve note factory 2016-05-29 15:03:00 -04:00
member_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
merge_request_spec.rb Rename ci_commit -> pipeline 2016-06-10 14:41:38 +02:00
milestone_spec.rb Return a relation with Postgres 2016-05-16 10:25:24 +01:00
namespace_spec.rb Improve test coverage 2016-05-16 18:03:55 -05:00
note_spec.rb Backend awardables on comments 2016-06-06 11:03:39 +02:00
notification_setting_spec.rb Add spec for user_id uniq in NotificationSetting model 2016-03-30 10:44:20 +02:00
project_group_link_spec.rb Bring ProjectGroupLink model and migrations from EE 2016-03-11 17:47:05 +01:00
project_security_spec.rb Fix some specs 2016-03-20 22:55:08 +01:00
project_snippet_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
project_spec.rb Merge branch 'finding-multiple-projects-by-paths' into 'master' 2016-06-10 17:17:19 +00:00
project_team_spec.rb Bring shared project feature tests from EE 2016-03-12 14:45:14 +01:00
project_wiki_spec.rb Fix hook data for Wiki Page event 2016-05-31 11:24:58 -03:00
protected_branch_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
release_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
repository_spec.rb Remove main_language and tests 2016-05-25 17:16:42 -04:00
service_spec.rb Cache the presence of an issue_tracker at project level 2016-06-10 15:41:56 +02:00
snippet_spec.rb Refactor Participable 2016-06-01 16:22:35 +02:00
spam_log_spec.rb Refactor Admin::SpamLogsController to block user before destroying 2016-02-02 11:25:44 -02:00
todo_spec.rb Remove the annotate gem and delete old annotations 2016-05-09 18:00:28 +02:00
tree_spec.rb Prioritize previewable over plain README files 2016-01-25 11:27:07 -02:00
user_spec.rb Add a blank line between before and it: 2016-06-07 22:34:09 +08:00
wiki_page_spec.rb Fix old version warning when viewing wiki latest version via version_id 2016-01-29 14:17:00 -02:00