summaryrefslogtreecommitdiff
path: root/lib/gitlab
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-01-16 13:09:29 +0100
committerRémy Coutable <remy@rymai.me>2019-01-24 13:05:45 +0100
commit3a2abc1d50b419a353edb7f7cf68f3894dfdeeef (patch)
tree98fc575139997113d9074dde16a9689cb2ab8e31 /lib/gitlab
parent16ab0050f6f1544eb717da34975f12861df37c9c (diff)
downloadgitlab-ce-3a2abc1d50b419a353edb7f7cf68f3894dfdeeef.tar.gz
Enable the Layout/ExtraSpacing cop56392-enable-the-layout-extraspacing-cop
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/background_migration/migrate_stage_status.rb8
-rw-r--r--lib/gitlab/lfs_token.rb4
-rw-r--r--lib/gitlab/middleware/go.rb2
-rw-r--r--lib/gitlab/pages_client.rb2
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/gitlab/background_migration/migrate_stage_status.rb b/lib/gitlab/background_migration/migrate_stage_status.rb
index 0e5c7f092f2..6a29a632577 100644
--- a/lib/gitlab/background_migration/migrate_stage_status.rb
+++ b/lib/gitlab/background_migration/migrate_stage_status.rb
@@ -16,10 +16,10 @@ module Gitlab
scope :running, -> { where(status: 'running') }
scope :pending, -> { where(status: 'pending') }
scope :success, -> { where(status: 'success') }
- scope :failed, -> { where(status: 'failed') }
- scope :canceled, -> { where(status: 'canceled') }
- scope :skipped, -> { where(status: 'skipped') }
- scope :manual, -> { where(status: 'manual') }
+ scope :failed, -> { where(status: 'failed') }
+ scope :canceled, -> { where(status: 'canceled') }
+ scope :skipped, -> { where(status: 'skipped') }
+ scope :manual, -> { where(status: 'manual') }
scope :failed_but_allowed, -> do
where(allow_failure: true, status: [:failed, :canceled])
diff --git a/lib/gitlab/lfs_token.rb b/lib/gitlab/lfs_token.rb
index c09d3ebc7be..26b81847d37 100644
--- a/lib/gitlab/lfs_token.rb
+++ b/lib/gitlab/lfs_token.rb
@@ -47,7 +47,7 @@ module Gitlab
user? ? :lfs_token : :lfs_deploy_token
end
- private # rubocop:disable Lint/UselessAccessModifier
+ private # rubocop:disable Lint/UselessAccessModifier
class HMACToken
include LfsTokenHelper
@@ -100,7 +100,7 @@ module Gitlab
#
class LegacyRedisDeviseToken
TOKEN_LENGTH = 50
- DEFAULT_EXPIRY_TIME = 1800 * 1000 # 30 mins
+ DEFAULT_EXPIRY_TIME = 1800 * 1000 # 30 mins
def initialize(actor)
@actor = actor
diff --git a/lib/gitlab/middleware/go.rb b/lib/gitlab/middleware/go.rb
index 72a788022ef..f9efef38825 100644
--- a/lib/gitlab/middleware/go.rb
+++ b/lib/gitlab/middleware/go.rb
@@ -111,7 +111,7 @@ module Gitlab
def project_for_paths(paths, request)
project = Project.where_full_path_in(paths).first
- return unless Ability.allowed?(current_user(request, project), :read_project, project)
+ return unless Ability.allowed?(current_user(request, project), :read_project, project)
project
end
diff --git a/lib/gitlab/pages_client.rb b/lib/gitlab/pages_client.rb
index 3626e53f84c..d74fdba2241 100644
--- a/lib/gitlab/pages_client.rb
+++ b/lib/gitlab/pages_client.rb
@@ -103,7 +103,7 @@ module Gitlab
end
def write_token(new_token)
- Tempfile.open(File.basename(token_path), File.dirname(token_path), encoding: 'ascii-8bit') do |f|
+ Tempfile.open(File.basename(token_path), File.dirname(token_path), encoding: 'ascii-8bit') do |f|
f.write(new_token)
f.close
File.link(f.path, token_path)