Commit Graph

26 Commits

Author SHA1 Message Date
gfyoung 7e6f6e1603 Enable even more frozen string in lib/gitlab
Enables frozens string for the following:

* lib/gitlab/conflict/**/*.rb
* lib/gitlab/cross_project_access/**/*.rb
* lib/gitlab/cycle_analytics/**/*.rb
* lib/gitlab/data_builder/**/*.rb
* lib/gitlab/database/**/*.rb
* lib/gitlab/dependency_linker/**/*.rb
* lib/gitlab/diff/**/*.rb
* lib/gitlab/downtime_check/**/*.rb
* lib/gitlab/email/**/*.rb
* lib/gitlab/etag_caching/**/*.rb

Partially addresses gitlab-org/gitlab-ce#47424.
2018-11-06 22:47:32 -08:00
Gabriel Mazetto abb878326c Rename many path_with_namespace -> full_path 2017-08-01 07:26:58 +02:00
Douwe Maan c81928cfa7 Include new URL helpers retroactively into includers of Gitlab::Routing 2017-07-07 10:43:37 -05:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Douwe Maan aed0387f97 Consistent diff and blob size limit names 2017-05-29 17:02:02 -05:00
Z.J. van de Weg 128b1eae09 Update Rubocop to ruby 2.3 2017-02-07 15:16:46 +01:00
Douwe Maan c008a1a967 Make Compare#diffs diff_options a regular argument 2016-08-03 09:32:01 -07:00
Paco Guzman c86c1905b5 switch from diff_file_collection to diffs
So we have raw_diffs too
2016-08-03 07:00:20 +02:00
Paco Guzman 1d0c7b7492 Introduce Compare model in the codebase.
This object will manage Gitlab::Git::Compare instances
2016-08-03 07:00:20 +02:00
Paco Guzman 8f359ea917 Move to Gitlab::Diff::FileCollection
Instead calling diff_collection.count use diff_collection.size which is cache on the diff_collection
2016-08-03 07:00:20 +02:00
Paco Guzman cd7c2cb6dd Cache highlighted diff lines for merge requests
Introducing the concept of SafeDiffs which relates 
diffs with UI highlighting.
2016-08-03 07:00:19 +02:00
Douwe Maan a9fa45f09e Represent DiffRefs as proper class instead of tuple array 2016-07-06 18:50:58 -04:00
Sean McGivern 1022a1678b Limit push email diff size
Limit push email diff size to 30 files or 150 KB, whichever comes first.
2016-06-17 08:55:05 +01:00
Sean McGivern a9977f2b7a Syntax-highlight diffs in push emails
Based on:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/151
2016-05-17 13:23:17 +01:00
Sean McGivern 5f27e26bb4 Only generate repository push email once
The repository push email can be very expensive to generate, especially
with syntax-highlighted diffs. Instead of generating the email for each
recipient, generate one email object and reset the Message-Id and To
headers for each recipient. (Cloning would also be expensive in the case
of large emails, although probably not as bad as generating from
scratch.)
2016-05-11 09:16:01 +01:00
Yorick Peterse 84b0ab7766 Added & use Gitlab::Routing for URL helpers
Rails' "url_helpers" method creates an anonymous Module (which a bunch
of methods) on every call. By caching the output of this method in a
dedicated method we can shave off about 10 seconds of loading time for
an issue with around 200 comments.
2016-04-01 11:13:48 +02:00
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Anton Baklanov 84124380e8 Added X-GitLab-... headers to emails from CI and Email On Push services
Fixes #2098
2016-01-19 20:18:39 +02:00
Grzegorz Bizon cbeb06eb42 Mix url helpers in into `RepositoryPush` 2015-12-11 13:00:24 +00:00
Grzegorz Bizon 66f658a9b5 Check if commits are available in `RepositoryPush` 2015-12-08 08:43:09 +01:00
Grzegorz Bizon 591035968d Duplicate options in `RepositoryPush` 2015-12-08 08:43:09 +01:00
Grzegorz Bizon 75c6b29f6b Add `RepositoryPush` specs 2015-12-08 08:43:09 +01:00
Grzegorz Bizon d835fbc79f Fix url helpers in RepositoryPush 2015-12-08 08:43:09 +01:00
Grzegorz Bizon 9f2752e5dc Remove obsolete variables in `repository_push_email` 2015-12-08 08:43:08 +01:00
Grzegorz Bizon 4beba7494b Improve Messagee::RepositoryPush 2015-12-08 08:43:08 +01:00
Grzegorz Bizon e2f937ce22 Refactor RepositoryPush, move to Message namespace 2015-12-08 08:43:08 +01:00