Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
9d5f80e0
Commit
9d5f80e0
authored
May 30, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Style/MethodDefParentheses rubocop cop
Use def with parentheses when there are parameters. See #17478
parent
43c35b0f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
5 deletions
+5
-5
.rubocop.yml
.rubocop.yml
+1
-1
app/controllers/omniauth_callbacks_controller.rb
app/controllers/omniauth_callbacks_controller.rb
+1
-1
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
app/models/project.rb
app/models/project.rb
+2
-2
No files found.
.rubocop.yml
View file @
9d5f80e0
...
@@ -330,7 +330,7 @@ Style/MethodCallParentheses:
...
@@ -330,7 +330,7 @@ Style/MethodCallParentheses:
# Checks if the method definitions have or don't have parentheses.
# Checks if the method definitions have or don't have parentheses.
Style/MethodDefParentheses
:
Style/MethodDefParentheses
:
Enabled
:
fals
e
Enabled
:
tru
e
# Use the configured style when naming methods.
# Use the configured style when naming methods.
Style/MethodName
:
Style/MethodName
:
...
...
app/controllers/omniauth_callbacks_controller.rb
View file @
9d5f80e0
...
@@ -97,7 +97,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
...
@@ -97,7 +97,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
handle_signup_error
handle_signup_error
end
end
def
handle_service_ticket
provider
,
ticket
def
handle_service_ticket
(
provider
,
ticket
)
Gitlab
::
OAuth
::
Session
.
create
provider
,
ticket
Gitlab
::
OAuth
::
Session
.
create
provider
,
ticket
session
[
:service_tickets
]
||=
{}
session
[
:service_tickets
]
||=
{}
session
[
:service_tickets
][
provider
]
=
ticket
session
[
:service_tickets
][
provider
]
=
ticket
...
...
app/models/ci/build.rb
View file @
9d5f80e0
...
@@ -286,7 +286,7 @@ module Ci
...
@@ -286,7 +286,7 @@ module Ci
project
.
runners_token
project
.
runners_token
end
end
def
valid_token?
token
def
valid_token?
(
token
)
project
.
valid_runners_token?
token
project
.
valid_runners_token?
token
end
end
...
...
app/models/project.rb
View file @
9d5f80e0
...
@@ -946,13 +946,13 @@ class Project < ActiveRecord::Base
...
@@ -946,13 +946,13 @@ class Project < ActiveRecord::Base
shared_runners_enabled?
&&
Ci
::
Runner
.
shared
.
active
.
any?
(
&
block
)
shared_runners_enabled?
&&
Ci
::
Runner
.
shared
.
active
.
any?
(
&
block
)
end
end
def
valid_runners_token?
token
def
valid_runners_token?
(
token
)
self
.
runners_token
&&
ActiveSupport
::
SecurityUtils
.
variable_size_secure_compare
(
token
,
self
.
runners_token
)
self
.
runners_token
&&
ActiveSupport
::
SecurityUtils
.
variable_size_secure_compare
(
token
,
self
.
runners_token
)
end
end
# TODO (ayufan): For now we use runners_token (backward compatibility)
# 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
# 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
)
self
.
builds_enabled?
&&
self
.
runners_token
&&
ActiveSupport
::
SecurityUtils
.
variable_size_secure_compare
(
token
,
self
.
runners_token
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment