diff options
author | Clement Ho <ClemMakesApps@gmail.com> | 2017-05-23 12:36:41 -0500 |
---|---|---|
committer | Clement Ho <ClemMakesApps@gmail.com> | 2017-06-06 10:39:23 -0500 |
commit | 7b533ef7f140450783485b01cdf0434b77a9f90e (patch) | |
tree | 16c4bb003c74c02e858ef835602e87e5709b327d /lib/gitlab/etag_caching/router.rb | |
parent | d07e85e1033f8026f155c6171cb3ebcd6b93d9ed (diff) | |
download | gitlab-ce-ch-test-2.tar.gz |
Change from double click to single click to open dropdownch-test-2
Diffstat (limited to 'lib/gitlab/etag_caching/router.rb')
-rw-r--r-- | lib/gitlab/etag_caching/router.rb | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/lib/gitlab/etag_caching/router.rb b/lib/gitlab/etag_caching/router.rb index ba31041d0c1..15ae24f62c8 100644 --- a/lib/gitlab/etag_caching/router.rb +++ b/lib/gitlab/etag_caching/router.rb @@ -7,11 +7,32 @@ module Gitlab # - Don't contain a reserved word (expect for the words used in the # regex itself) # - Ending in `noteable/issue/<id>/notes` for the `issue_notes` route +<<<<<<< HEAD + # - Ending in `issues/id`/rendered_title` for the `issue_title` route +<<<<<<< HEAD +======= # - Ending in `issues/id`/realtime_changes` for the `issue_title` route +>>>>>>> 2f62af6... Restore original comment [ci skip] USED_IN_ROUTES = %w[noteable issue notes issues realtime_changes +<<<<<<< HEAD +<<<<<<< HEAD commit pipelines merge_requests new].freeze +======= + commit pipelines merge_requests builds + new].freeze + +>>>>>>> 47a0276... Initial implementation for real time job view + RESERVED_WORDS = Gitlab::PathRegex::ILLEGAL_PROJECT_PATH_WORDS - USED_IN_ROUTES + RESERVED_WORDS_REGEX = Regexp.union(*RESERVED_WORDS.map(&Regexp.method(:escape))) +======= +======= + USED_IN_ROUTES = %w[noteable issue notes issues rendered_title +>>>>>>> 4535d52... Use etag caching for environments JSON + commit pipelines merge_requests new + environments].freeze RESERVED_WORDS = DynamicPathValidator::WILDCARD_ROUTES - USED_IN_ROUTES RESERVED_WORDS_REGEX = Regexp.union(*RESERVED_WORDS) +>>>>>>> ebede2b... Use etag caching for environments JSON ROUTES = [ Gitlab::EtagCaching::Router::Route.new( %r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/noteable/issue/\d+/notes\z), @@ -38,8 +59,21 @@ module Gitlab 'project_pipelines' ), Gitlab::EtagCaching::Router::Route.new( - %r(^(?!.*(#{RESERVED_WORDS})).*/pipelines/\d+\.json\z), + %r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/pipelines/\d+\.json\z), 'project_pipeline' + ), + Gitlab::EtagCaching::Router::Route.new( +<<<<<<< HEAD +<<<<<<< HEAD + %r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/environments\.json\z), +======= + %r(^(?!.*(#{RESERVED_WORDS})).*/environments\.json\z), +>>>>>>> 4535d52... Use etag caching for environments JSON + 'environments' +======= + %r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/builds/\d+\.json\z), + 'project_build' +>>>>>>> 47a0276... Initial implementation for real time job view ) ].freeze |