Commit 9d5f80e0 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Enable Style/MethodDefParentheses rubocop cop

Use def with parentheses when there are parameters.

See #17478
parent 43c35b0f
......@@ -330,7 +330,7 @@ Style/MethodCallParentheses:
# Checks if the method definitions have or don't have parentheses.
Style/MethodDefParentheses:
Enabled: false
Enabled: true
# Use the configured style when naming methods.
Style/MethodName:
......
......@@ -97,7 +97,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
handle_signup_error
end
def handle_service_ticket provider, ticket
def handle_service_ticket(provider, ticket)
Gitlab::OAuth::Session.create provider, ticket
session[:service_tickets] ||= {}
session[:service_tickets][provider] = ticket
......
......@@ -286,7 +286,7 @@ module Ci
project.runners_token
end
def valid_token? token
def valid_token?(token)
project.valid_runners_token? token
end
......
......@@ -946,13 +946,13 @@ class Project < ActiveRecord::Base
shared_runners_enabled? && Ci::Runner.shared.active.any?(&block)
end
def valid_runners_token? token
def valid_runners_token?(token)
self.runners_token && ActiveSupport::SecurityUtils.variable_size_secure_compare(token, self.runners_token)
end
# TODO (ayufan): For now we use runners_token (backward compatibility)
# In 8.4 every build will have its own individual token valid for time of build
def valid_build_token? token
def valid_build_token?(token)
self.builds_enabled? && self.runners_token && ActiveSupport::SecurityUtils.variable_size_secure_compare(token, self.runners_token)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment