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
Boxiang Sun
gitlab-ce
Commits
c9aa1988
Commit
c9aa1988
authored
Aug 06, 2016
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Style/SpaceAroundEqualsInParameterDefault cop
parent
aa49c20e
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
18 additions
and
21 deletions
+18
-21
.rubocop.yml
.rubocop.yml
+4
-0
.rubocop_todo.yml
.rubocop_todo.yml
+0
-7
app/controllers/registrations_controller.rb
app/controllers/registrations_controller.rb
+1
-1
app/helpers/explore_helper.rb
app/helpers/explore_helper.rb
+1
-1
app/helpers/search_helper.rb
app/helpers/search_helper.rb
+1
-1
app/models/merge_request_diff.rb
app/models/merge_request_diff.rb
+1
-1
app/models/repository.rb
app/models/repository.rb
+1
-1
lib/gitlab/ldap/access.rb
lib/gitlab/ldap/access.rb
+1
-1
lib/gitlab/ldap/adapter.rb
lib/gitlab/ldap/adapter.rb
+1
-1
lib/gitlab/popen.rb
lib/gitlab/popen.rb
+1
-1
lib/gitlab/redis.rb
lib/gitlab/redis.rb
+1
-1
spec/requests/git_http_spec.rb
spec/requests/git_http_spec.rb
+4
-4
spec/support/select2_helper.rb
spec/support/select2_helper.rb
+1
-1
No files found.
.rubocop.yml
View file @
c9aa1988
...
@@ -373,6 +373,10 @@ Style/SpaceAfterNot:
...
@@ -373,6 +373,10 @@ Style/SpaceAfterNot:
Style/SpaceAfterSemicolon
:
Style/SpaceAfterSemicolon
:
Enabled
:
true
Enabled
:
true
# Use space around equals in parameter default
Style/SpaceAroundEqualsInParameterDefault
:
Enabled
:
true
# Use a space around keywords if appropriate.
# Use a space around keywords if appropriate.
Style/SpaceAroundKeyword
:
Style/SpaceAroundKeyword
:
Enabled
:
true
Enabled
:
true
...
...
.rubocop_todo.yml
View file @
c9aa1988
...
@@ -339,13 +339,6 @@ Style/SingleLineBlockParams:
...
@@ -339,13 +339,6 @@ Style/SingleLineBlockParams:
Style/SingleLineMethods
:
Style/SingleLineMethods
:
Enabled
:
false
Enabled
:
false
# Offense count: 14
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: space, no_space
Style/SpaceAroundEqualsInParameterDefault
:
Enabled
:
false
# Offense count: 119
# Offense count: 119
# Cop supports --auto-correct.
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# Configuration parameters: EnforcedStyle, SupportedStyles.
...
...
app/controllers/registrations_controller.rb
View file @
c9aa1988
...
@@ -33,7 +33,7 @@ class RegistrationsController < Devise::RegistrationsController
...
@@ -33,7 +33,7 @@ class RegistrationsController < Devise::RegistrationsController
protected
protected
def
build_resource
(
hash
=
nil
)
def
build_resource
(
hash
=
nil
)
super
super
end
end
...
...
app/helpers/explore_helper.rb
View file @
c9aa1988
module
ExploreHelper
module
ExploreHelper
def
filter_projects_path
(
options
=
{})
def
filter_projects_path
(
options
=
{})
exist_opts
=
{
exist_opts
=
{
sort:
params
[
:sort
],
sort:
params
[
:sort
],
scope:
params
[
:scope
],
scope:
params
[
:scope
],
...
...
app/helpers/search_helper.rb
View file @
c9aa1988
...
@@ -107,7 +107,7 @@ module SearchHelper
...
@@ -107,7 +107,7 @@ module SearchHelper
Sanitize
.
clean
(
str
)
Sanitize
.
clean
(
str
)
end
end
def
search_filter_path
(
options
=
{})
def
search_filter_path
(
options
=
{})
exist_opts
=
{
exist_opts
=
{
search:
params
[
:search
],
search:
params
[
:search
],
project_id:
params
[
:project_id
],
project_id:
params
[
:project_id
],
...
...
app/models/merge_request_diff.rb
View file @
c9aa1988
...
@@ -36,7 +36,7 @@ class MergeRequestDiff < ActiveRecord::Base
...
@@ -36,7 +36,7 @@ class MergeRequestDiff < ActiveRecord::Base
real_size
.
presence
||
raw_diffs
.
size
real_size
.
presence
||
raw_diffs
.
size
end
end
def
raw_diffs
(
options
=
{})
def
raw_diffs
(
options
=
{})
if
options
[
:ignore_whitespace_change
]
if
options
[
:ignore_whitespace_change
]
@raw_diffs_no_whitespace
||=
begin
@raw_diffs_no_whitespace
||=
begin
compare
=
Gitlab
::
Git
::
Compare
.
new
(
compare
=
Gitlab
::
Git
::
Compare
.
new
(
...
...
app/models/repository.rb
View file @
c9aa1988
...
@@ -601,7 +601,7 @@ class Repository
...
@@ -601,7 +601,7 @@ class Repository
commit
(
sha
)
commit
(
sha
)
end
end
def
next_branch
(
name
,
opts
=
{})
def
next_branch
(
name
,
opts
=
{})
branch_ids
=
self
.
branch_names
.
map
do
|
n
|
branch_ids
=
self
.
branch_names
.
map
do
|
n
|
next
1
if
n
==
name
next
1
if
n
==
name
result
=
n
.
match
(
/\A
#{
name
}
-([0-9]+)\z/
)
result
=
n
.
match
(
/\A
#{
name
}
-([0-9]+)\z/
)
...
...
lib/gitlab/ldap/access.rb
View file @
c9aa1988
...
@@ -25,7 +25,7 @@ module Gitlab
...
@@ -25,7 +25,7 @@ module Gitlab
end
end
end
end
def
initialize
(
user
,
adapter
=
nil
)
def
initialize
(
user
,
adapter
=
nil
)
@adapter
=
adapter
@adapter
=
adapter
@user
=
user
@user
=
user
@provider
=
user
.
ldap_identity
.
provider
@provider
=
user
.
ldap_identity
.
provider
...
...
lib/gitlab/ldap/adapter.rb
View file @
c9aa1988
...
@@ -13,7 +13,7 @@ module Gitlab
...
@@ -13,7 +13,7 @@ module Gitlab
Gitlab
::
LDAP
::
Config
.
new
(
provider
)
Gitlab
::
LDAP
::
Config
.
new
(
provider
)
end
end
def
initialize
(
provider
,
ldap
=
nil
)
def
initialize
(
provider
,
ldap
=
nil
)
@provider
=
provider
@provider
=
provider
@ldap
=
ldap
||
Net
::
LDAP
.
new
(
config
.
adapter_options
)
@ldap
=
ldap
||
Net
::
LDAP
.
new
(
config
.
adapter_options
)
end
end
...
...
lib/gitlab/popen.rb
View file @
c9aa1988
...
@@ -5,7 +5,7 @@ module Gitlab
...
@@ -5,7 +5,7 @@ module Gitlab
module
Popen
module
Popen
extend
self
extend
self
def
popen
(
cmd
,
path
=
nil
)
def
popen
(
cmd
,
path
=
nil
)
unless
cmd
.
is_a?
(
Array
)
unless
cmd
.
is_a?
(
Array
)
raise
"System commands must be given as an array of strings"
raise
"System commands must be given as an array of strings"
end
end
...
...
lib/gitlab/redis.rb
View file @
c9aa1988
...
@@ -37,7 +37,7 @@ module Gitlab
...
@@ -37,7 +37,7 @@ module Gitlab
redis_config_hash
redis_config_hash
end
end
def
initialize
(
rails_env
=
nil
)
def
initialize
(
rails_env
=
nil
)
rails_env
||=
Rails
.
env
rails_env
||=
Rails
.
env
config_file
=
File
.
expand_path
(
'../../../config/resque.yml'
,
__FILE__
)
config_file
=
File
.
expand_path
(
'../../../config/resque.yml'
,
__FILE__
)
...
...
spec/requests/git_http_spec.rb
View file @
c9aa1988
...
@@ -349,19 +349,19 @@ describe 'Git HTTP requests', lib: true do
...
@@ -349,19 +349,19 @@ describe 'Git HTTP requests', lib: true do
end
end
end
end
def
clone_get
(
project
,
options
=
{})
def
clone_get
(
project
,
options
=
{})
get
"/
#{
project
}
/info/refs"
,
{
service:
'git-upload-pack'
},
auth_env
(
*
options
.
values_at
(
:user
,
:password
,
:spnego_request_token
))
get
"/
#{
project
}
/info/refs"
,
{
service:
'git-upload-pack'
},
auth_env
(
*
options
.
values_at
(
:user
,
:password
,
:spnego_request_token
))
end
end
def
clone_post
(
project
,
options
=
{})
def
clone_post
(
project
,
options
=
{})
post
"/
#{
project
}
/git-upload-pack"
,
{},
auth_env
(
*
options
.
values_at
(
:user
,
:password
,
:spnego_request_token
))
post
"/
#{
project
}
/git-upload-pack"
,
{},
auth_env
(
*
options
.
values_at
(
:user
,
:password
,
:spnego_request_token
))
end
end
def
push_get
(
project
,
options
=
{})
def
push_get
(
project
,
options
=
{})
get
"/
#{
project
}
/info/refs"
,
{
service:
'git-receive-pack'
},
auth_env
(
*
options
.
values_at
(
:user
,
:password
,
:spnego_request_token
))
get
"/
#{
project
}
/info/refs"
,
{
service:
'git-receive-pack'
},
auth_env
(
*
options
.
values_at
(
:user
,
:password
,
:spnego_request_token
))
end
end
def
push_post
(
project
,
options
=
{})
def
push_post
(
project
,
options
=
{})
post
"/
#{
project
}
/git-receive-pack"
,
{},
auth_env
(
*
options
.
values_at
(
:user
,
:password
,
:spnego_request_token
))
post
"/
#{
project
}
/git-receive-pack"
,
{},
auth_env
(
*
options
.
values_at
(
:user
,
:password
,
:spnego_request_token
))
end
end
...
...
spec/support/select2_helper.rb
View file @
c9aa1988
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
module
Select2Helper
module
Select2Helper
def
select2
(
value
,
options
=
{})
def
select2
(
value
,
options
=
{})
raise
ArgumentError
,
'options must be a Hash'
unless
options
.
kind_of?
(
Hash
)
raise
ArgumentError
,
'options must be a Hash'
unless
options
.
kind_of?
(
Hash
)
selector
=
options
.
fetch
(
:from
)
selector
=
options
.
fetch
(
:from
)
...
...
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