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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
c370dce0
Commit
c370dce0
authored
May 30, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Style/RedundantParentheses rubocop cop
See #17478
parent
43c35b0f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
.rubocop.yml
.rubocop.yml
+1
-2
app/helpers/diff_helper.rb
app/helpers/diff_helper.rb
+2
-2
config/initializers/session_store.rb
config/initializers/session_store.rb
+1
-1
lib/api/users.rb
lib/api/users.rb
+1
-1
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+1
-1
No files found.
.rubocop.yml
View file @
c370dce0
...
@@ -486,10 +486,9 @@ Style/RedundantException:
...
@@ -486,10 +486,9 @@ Style/RedundantException:
Style/RedundantFreeze
:
Style/RedundantFreeze
:
Enabled
:
false
Enabled
:
false
# TODO: Enable RedundantParentheses Cop.
# Checks for parentheses that seem not to serve any purpose.
# Checks for parentheses that seem not to serve any purpose.
Style/RedundantParentheses
:
Style/RedundantParentheses
:
Enabled
:
fals
e
Enabled
:
tru
e
# Don't use return where it's not required.
# Don't use return where it's not required.
Style/RedundantReturn
:
Style/RedundantReturn
:
...
...
app/helpers/diff_helper.rb
View file @
c370dce0
...
@@ -39,11 +39,11 @@ module DiffHelper
...
@@ -39,11 +39,11 @@ module DiffHelper
end
end
def
unfold_bottom_class
(
bottom
)
def
unfold_bottom_class
(
bottom
)
(
bottom
)
?
'js-unfold-bottom'
:
''
bottom
?
'js-unfold-bottom'
:
''
end
end
def
unfold_class
(
unfold
)
def
unfold_class
(
unfold
)
(
unfold
)
?
'unfold js-unfold'
:
''
unfold
?
'unfold js-unfold'
:
''
end
end
def
diff_line_content
(
line
,
line_type
=
nil
)
def
diff_line_content
(
line
,
line_type
=
nil
)
...
...
config/initializers/session_store.rb
View file @
c370dce0
...
@@ -23,6 +23,6 @@ else
...
@@ -23,6 +23,6 @@ else
secure:
Gitlab
.
config
.
gitlab
.
https
,
secure:
Gitlab
.
config
.
gitlab
.
https
,
httponly:
true
,
httponly:
true
,
expires_in:
Settings
.
gitlab
[
'session_expire_delay'
]
*
60
,
expires_in:
Settings
.
gitlab
[
'session_expire_delay'
]
*
60
,
path:
(
Rails
.
application
.
config
.
relative_url_root
.
nil?
)
?
'/'
:
Gitlab
::
Application
.
config
.
relative_url_root
path:
Rails
.
application
.
config
.
relative_url_root
.
nil?
?
'/'
:
Gitlab
::
Application
.
config
.
relative_url_root
)
)
end
end
lib/api/users.rb
View file @
c370dce0
...
@@ -76,7 +76,7 @@ module API
...
@@ -76,7 +76,7 @@ module API
required_attributes!
[
:email
,
:password
,
:name
,
:username
]
required_attributes!
[
:email
,
:password
,
:name
,
:username
]
attrs
=
attributes_for_keys
[
:email
,
:name
,
:password
,
:skype
,
:linkedin
,
:twitter
,
:projects_limit
,
:username
,
:bio
,
:location
,
:can_create_group
,
:admin
,
:confirm
,
:external
]
attrs
=
attributes_for_keys
[
:email
,
:name
,
:password
,
:skype
,
:linkedin
,
:twitter
,
:projects_limit
,
:username
,
:bio
,
:location
,
:can_create_group
,
:admin
,
:confirm
,
:external
]
admin
=
attrs
.
delete
(
:admin
)
admin
=
attrs
.
delete
(
:admin
)
confirm
=
!
(
attrs
.
delete
(
:confirm
)
=~
(
/(false|f|no|0)$/i
)
)
confirm
=
!
(
attrs
.
delete
(
:confirm
)
=~
/(false|f|no|0)$/i
)
user
=
User
.
build_user
(
attrs
)
user
=
User
.
build_user
(
attrs
)
user
.
admin
=
admin
unless
admin
.
nil?
user
.
admin
=
admin
unless
admin
.
nil?
user
.
skip_confirmation!
unless
confirm
user
.
skip_confirmation!
unless
confirm
...
...
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
c370dce0
...
@@ -63,7 +63,7 @@ describe Projects::MergeRequestsController do
...
@@ -63,7 +63,7 @@ describe Projects::MergeRequestsController do
id:
merge_request
.
iid
,
id:
merge_request
.
iid
,
format:
format
)
format:
format
)
expect
(
response
.
body
).
to
eq
(
(
merge_request
.
send
(
:"to_
#{
format
}
"
)
).
to_s
)
expect
(
response
.
body
).
to
eq
(
merge_request
.
send
(
:"to_
#{
format
}
"
).
to_s
)
end
end
it
"should not escape Html"
do
it
"should not escape Html"
do
...
...
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