diff options
| author | Rémy Coutable <remy@rymai.me> | 2018-02-01 09:11:09 +0000 |
|---|---|---|
| committer | Rémy Coutable <remy@rymai.me> | 2018-02-01 09:11:09 +0000 |
| commit | 76b9f1a4c5ab9121a2a3f4a0a4e5cabe46580b54 (patch) | |
| tree | ec9f0c5d2b9d1cb8a01a0e4613a2ea60596eb5bc /app/controllers | |
| parent | ab0d41e2da736a431681475f3dab43519186e05e (diff) | |
| parent | 2b6307f6ad9d09156c42befe4babbfea40dad052 (diff) | |
| download | gitlab-ce-76b9f1a4c5ab9121a2a3f4a0a4e5cabe46580b54.tar.gz | |
Merge branch '42497-rubocop-style-regexpliteral' into 'master'
Enable Style/RegexpLiteral cop
Closes #42497
See merge request gitlab-org/gitlab-ce!16752
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/help_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/projects_controller.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb index 38f379dbf4f..a394521698c 100644 --- a/app/controllers/help_controller.rb +++ b/app/controllers/help_controller.rb @@ -5,7 +5,7 @@ class HelpController < ApplicationController # Taken from Jekyll # https://github.com/jekyll/jekyll/blob/3.5-stable/lib/jekyll/document.rb#L13 - YAML_FRONT_MATTER_REGEXP = %r!\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)!m + YAML_FRONT_MATTER_REGEXP = /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m def index # Remove YAML frontmatter so that it doesn't look weird diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index e6e2b219e6a..8158934322d 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -403,6 +403,6 @@ class ProjectsController < Projects::ApplicationController # to # localhost/group/project # - redirect_to request.original_url.sub(/\.git\/?\Z/, '') if params[:format] == 'git' + redirect_to request.original_url.sub(%r{\.git/?\Z}, '') if params[:format] == 'git' end end |
