gitlab-org--gitlab-foss/spec/factories
Zeger-Jan van de Weg 79a5d76801
Add repository languages for projects
Our friends at GitHub show the programming languages for a long time,
and inspired by that this commit means to create about the same
functionality.

Language detection is done through Linguist, as before, where the
difference is that we cache the result in the database. Also, Gitaly can
incrementaly scan a repository. This is done through a shell out, which
creates overhead of about 3s each run. For now this won't be improved.

Scans are triggered by pushed to the default branch, usually `master`.
However, one exception to this rule the charts page. If we're requesting
this expensive data anyway, we just cache it in the database.

Edge cases where there is no repository, or its empty are caught in the
Repository model. This makes use of Redis caching, which is probably
already loaded.

The added model is called RepositoryLanguage, which will make it harder
if/when GitLab supports multiple repositories per project. However, for
now I think this shouldn't be a concern. Also, Language could be
confused with the i18n languages and felt like the current name was
suiteable too.

Design of the Project#Show page is done with help from @dimitrieh. This
change is not visible to the end user unless detections are done.
2018-08-01 18:58:29 +02:00
..
ci Squashed commit of the following: 2018-07-27 14:05:34 +09:00
clusters Revert "Merge branch '48098-mutual-auth-cluster-applications' into 'master'" 2018-07-31 13:15:18 +00:00
gitaly Add handling for commit/tags with big messages 2018-05-18 20:51:10 +02:00
abuse_reports.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
appearances.rb remove some lint 2018-03-26 09:07:46 -04:00
application_settings.rb Ensure ApplicationSetting#performance_bar_allowed_group_id is properly set when retrieved from cache 2018-05-29 10:38:59 +02:00
award_emoji.rb Prevent awarding emoji when a project is archived 2018-04-11 10:51:43 +02:00
badge.rb Projects and groups badges API 2018-03-05 17:51:40 +00:00
boards.rb Bring one group board to CE 2018-03-03 12:56:17 -03:00
broadcast_messages.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
chat_names.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
chat_teams.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
commit_statuses.rb Fix specs creating a pipeline stage with implicit index 2018-04-24 11:07:37 +02:00
commits.rb Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
container_repositories.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
conversational_development_index_metrics.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
deploy_keys_projects.rb Merge branch 'sh-migrate-can-push-to-deploy-keys-projects-10-3' into 'security-10-3' 2018-01-16 17:04:51 -08:00
deploy_tokens.rb Rename special deploy token to make it more descriptive 2018-04-20 12:18:41 -05:00
deployments.rb Make user/author use project.creator in most factories 2018-01-31 18:31:21 +01:00
emails.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
environments.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
events.rb Make user/author use project.creator in most factories 2018-01-31 18:31:21 +01:00
file_uploaders.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
fork_network_members.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
fork_networks.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
forked_project_links.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
gpg_key_subkeys.rb Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
gpg_keys.rb Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
gpg_signature.rb Move spec helpers/matchers/shared examples/contexts to their relevant folder 2018-04-23 12:20:30 +02:00
group_custom_attributes.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
group_members.rb Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
groups.rb Resolve "Namespace factory is problematic" 2018-04-23 15:48:26 +00:00
identities.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
import_export_uploads.rb Update Import/Export to use object storage (based on aa feature flag) 2018-07-06 15:46:18 +02:00
import_state.rb Backports every CE related change from ee-44542 to CE 2018-05-04 17:33:26 +02:00
instance_configuration.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
internal_ids.rb More flexible way of internal id generation. 2018-03-16 13:35:25 +01:00
issues.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
keys.rb Validate SSH keys through the sshkey gem 2018-02-16 11:32:08 -05:00
label_links.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
label_priorities.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
labels.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
lfs_file_locks.rb Backport of LFS File Locking API 2018-02-07 09:04:00 -05:00
lfs_objects.rb Make all uses of `fixture_file_upload` use relative paths 2018-06-07 09:54:41 -05:00
lfs_objects_projects.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
lists.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
merge_requests.rb Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
merge_requests_closing_issues.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
milestones.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
namespaces.rb Resolve "Namespace factory is problematic" 2018-04-23 15:48:26 +00:00
notes.rb Fix serialization of LegacyDiffNote 2018-07-18 14:49:52 +00:00
notification_settings.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
oauth_access_grants.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
oauth_access_tokens.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
oauth_applications.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
pages_domains.rb Add HTTPS-only pages 2018-03-22 19:58:36 +01:00
personal_access_tokens.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
programming_languages.rb Add repository languages for projects 2018-08-01 18:58:29 +02:00
project_auto_devops.rb Merge remote-tracking branch 'origin/master' into 38542-application-control-panel-in-settings-page 2018-06-07 20:27:30 +02:00
project_custom_attributes.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
project_deploy_tokens.rb Include ProjectDeployTokens 2018-04-06 21:20:16 -05:00
project_group_links.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
project_hooks.rb Merge branch 'jej/mattermost-notification-confidentiality-10-6' into 'security-10-6' 2018-04-05 08:41:56 +02:00
project_members.rb Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
project_statistics.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
project_wikis.rb Bump Gitaly to 0.98.0 2018-05-07 14:10:04 +02:00
projects.rb Added SiteStatistics as counter cache for Projects and Wikis 2018-07-24 18:44:07 +02:00
protected_branches.rb Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
protected_tags.rb Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
redirect_routes.rb Remove permanent redirects 2018-03-28 14:12:08 +02:00
releases.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
remote_mirrors.rb Backports every CE related change from ee-5484 to CE 2018-05-07 11:59:51 +02:00
repository_languages.rb Add repository languages for projects 2018-08-01 18:58:29 +02:00
resource_label_events.rb Resource event model 2018-08-01 08:58:49 +00:00
sent_notifications.rb Make user/author use project.creator in most factories 2018-01-31 18:31:21 +01:00
sequences.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
service_hooks.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
services.rb Fix order of checks in editable? method. 2018-02-07 01:54:09 +01:00
site_statistics.rb Added SiteStatistics as counter cache for Projects and Wikis 2018-07-24 18:44:07 +02:00
snippets.rb Make user/author use project.creator in most factories 2018-01-31 18:31:21 +01:00
spam_logs.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
subscriptions.rb Make user/author use project.creator in most factories 2018-01-31 18:31:21 +01:00
system_hooks.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
system_note_metadata.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
term_agreements.rb Messaging on terms page when user already accepted 2018-06-04 22:22:11 +02:00
terms.rb Store application wide terms 2018-05-04 13:52:55 +02:00
timelogs.rb Make user/author use project.creator in most factories 2018-01-31 18:31:21 +01:00
todos.rb Revert "Merge branch 'ee-5481-epic-todos' into 'master'" 2018-07-11 18:33:24 +02:00
trending_project.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
u2f_registrations.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
uploads.rb update uploads saver 2018-07-10 16:33:40 +02:00
user_agent_details.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
user_callouts.rb Change UserCallout feautre_name to enum 2018-02-03 00:18:25 +01:00
user_custom_attributes.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
user_statuses.rb Allow users to set a status 2018-07-30 15:01:26 +02:00
users.rb Export assigned issues in iCalendar feed 2018-05-31 14:01:04 +00:00
users_star_projects.rb Extend API for importing a project export with overwrite support 2018-04-06 15:23:49 +00:00
web_hook_log.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
wiki_directories.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00
wiki_pages.rb Replace factory_girl_rails with factory_bot_rails 2017-12-14 15:01:55 +01:00