diff options
author | Rémy Coutable <remy@rymai.me> | 2017-05-15 16:27:23 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-05-15 16:27:23 +0000 |
commit | 84199f19197583da44471a6b7f91694b7f4645df (patch) | |
tree | d145a2353e7488ef486ad41f64a7e0813cc5b348 | |
parent | afcc81da653b35b8061b69db87315f0a1f77f263 (diff) | |
parent | 3efb60642a1803adbe8dccfc684ce1771765b750 (diff) | |
download | gitlab-ce-84199f19197583da44471a6b7f91694b7f4645df.tar.gz |
Merge branch 'rename-rendered_title' into 'master'
Rename all references to rendered_title to realtime_changes
See merge request !11359
-rw-r--r-- | app/controllers/projects/issues_controller.rb | 6 | ||||
-rw-r--r-- | app/models/issue.rb | 2 | ||||
-rw-r--r-- | app/views/projects/issues/show.html.haml | 2 | ||||
-rw-r--r-- | config/routes/project.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/etag_caching/router.rb | 6 | ||||
-rw-r--r-- | spec/javascripts/issue_show/components/app_spec.js | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/etag_caching/router_spec.rb | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb index 760ba246e3e..46438e68d54 100644 --- a/app/controllers/projects/issues_controller.rb +++ b/app/controllers/projects/issues_controller.rb @@ -11,10 +11,10 @@ class Projects::IssuesController < Projects::ApplicationController before_action :redirect_to_external_issue_tracker, only: [:index, :new] before_action :module_enabled before_action :issue, only: [:edit, :update, :show, :referenced_merge_requests, - :related_branches, :can_create_branch, :rendered_title, :create_merge_request] + :related_branches, :can_create_branch, :realtime_changes, :create_merge_request] # Allow read any issue - before_action :authorize_read_issue!, only: [:show, :rendered_title] + before_action :authorize_read_issue!, only: [:show, :realtime_changes] # Allow write(create) issue before_action :authorize_create_issue!, only: [:new, :create] @@ -199,7 +199,7 @@ class Projects::IssuesController < Projects::ApplicationController end end - def rendered_title + def realtime_changes Gitlab::PollingInterval.set_header(response, interval: 3_000) render json: { diff --git a/app/models/issue.rb b/app/models/issue.rb index ecfc33ec1a1..a88dbb3e065 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -292,7 +292,7 @@ class Issue < ActiveRecord::Base end def expire_etag_cache - key = Gitlab::Routing.url_helpers.rendered_title_namespace_project_issue_path( + key = Gitlab::Routing.url_helpers.realtime_changes_namespace_project_issue_path( project.namespace, project, self diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml index f66724900de..b2401442620 100644 --- a/app/views/projects/issues/show.html.haml +++ b/app/views/projects/issues/show.html.haml @@ -51,7 +51,7 @@ .issue-details.issuable-details .detail-page-description.content-block - #js-issuable-app{ "data" => { "endpoint" => rendered_title_namespace_project_issue_path(@project.namespace, @project, @issue), + #js-issuable-app{ "data" => { "endpoint" => realtime_changes_namespace_project_issue_path(@project.namespace, @project, @issue), "can-update" => can?(current_user, :update_issue, @issue).to_s, "issuable-ref" => @issue.to_reference, } } diff --git a/config/routes/project.rb b/config/routes/project.rb index a6c104c2d3f..c786cbdee1e 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -244,7 +244,7 @@ constraints(ProjectUrlConstrainer.new) do get :referenced_merge_requests get :related_branches get :can_create_branch - get :rendered_title + get :realtime_changes post :create_merge_request end collection do diff --git a/lib/gitlab/etag_caching/router.rb b/lib/gitlab/etag_caching/router.rb index 31a5b9d108b..ba31041d0c1 100644 --- a/lib/gitlab/etag_caching/router.rb +++ b/lib/gitlab/etag_caching/router.rb @@ -7,8 +7,8 @@ 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 - # - Ending in `issues/id`/rendered_title` for the `issue_title` route - USED_IN_ROUTES = %w[noteable issue notes issues rendered_title + # - Ending in `issues/id`/realtime_changes` for the `issue_title` route + USED_IN_ROUTES = %w[noteable issue notes issues realtime_changes commit pipelines merge_requests new].freeze RESERVED_WORDS = DynamicPathValidator::WILDCARD_ROUTES - USED_IN_ROUTES RESERVED_WORDS_REGEX = Regexp.union(*RESERVED_WORDS) @@ -18,7 +18,7 @@ module Gitlab 'issue_notes' ), Gitlab::EtagCaching::Router::Route.new( - %r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/issues/\d+/rendered_title\z), + %r(^(?!.*(#{RESERVED_WORDS_REGEX})).*/issues/\d+/realtime_changes\z), 'issue_title' ), Gitlab::EtagCaching::Router::Route.new( diff --git a/spec/javascripts/issue_show/components/app_spec.js b/spec/javascripts/issue_show/components/app_spec.js index 09bca2c3680..ee456869c53 100644 --- a/spec/javascripts/issue_show/components/app_spec.js +++ b/spec/javascripts/issue_show/components/app_spec.js @@ -25,7 +25,7 @@ describe('Issuable output', () => { vm = new IssuableDescriptionComponent({ propsData: { canUpdate: true, - endpoint: '/gitlab-org/gitlab-shell/issues/9/rendered_title', + endpoint: '/gitlab-org/gitlab-shell/issues/9/realtime_changes', issuableRef: '#1', initialTitle: '', initialDescriptionHtml: '', diff --git a/spec/lib/gitlab/etag_caching/router_spec.rb b/spec/lib/gitlab/etag_caching/router_spec.rb index f3dacb4ef04..5ae4a19263c 100644 --- a/spec/lib/gitlab/etag_caching/router_spec.rb +++ b/spec/lib/gitlab/etag_caching/router_spec.rb @@ -14,7 +14,7 @@ describe Gitlab::EtagCaching::Router do it 'matches issue title endpoint' do env = build_env( - '/my-group/my-project/issues/123/rendered_title' + '/my-group/my-project/issues/123/realtime_changes' ) result = described_class.match(env) |