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
Tatuya Kamada
gitlab-ce
Commits
fdcb7e36
Commit
fdcb7e36
authored
May 30, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Style/SpaceBeforeComma rubocop cop
No spaces before commas. See #17478
parent
43c35b0f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
+17
-6
.rubocop.yml
.rubocop.yml
+1
-1
app/models/network/graph.rb
app/models/network/graph.rb
+10
-3
config/routes.rb
config/routes.rb
+6
-2
No files found.
.rubocop.yml
View file @
fdcb7e36
...
@@ -570,7 +570,7 @@ Style/SpaceBeforeBlockBraces:
...
@@ -570,7 +570,7 @@ Style/SpaceBeforeBlockBraces:
# No spaces before commas.
# No spaces before commas.
Style/SpaceBeforeComma
:
Style/SpaceBeforeComma
:
Enabled
:
fals
e
Enabled
:
tru
e
# Checks for missing space between code and a comment on the same line.
# Checks for missing space between code and a comment on the same line.
Style/SpaceBeforeComment
:
Style/SpaceBeforeComment
:
...
...
app/models/network/graph.rb
View file @
fdcb7e36
...
@@ -22,9 +22,16 @@ module Network
...
@@ -22,9 +22,16 @@ module Network
def
collect_notes
def
collect_notes
h
=
Hash
.
new
(
0
)
h
=
Hash
.
new
(
0
)
@project
.
notes
.
where
(
'noteable_type = ?'
,
"Commit"
).
group
(
'notes.commit_id'
).
select
(
'notes.commit_id, count(notes.id) as note_count'
).
each
do
|
item
|
@project
.
notes
.
where
(
'noteable_type = ?'
,
'Commit'
)
.
group
(
'notes.commit_id'
)
.
select
(
'notes.commit_id, count(notes.id) as note_count'
)
.
each
do
|
item
|
h
[
item
.
commit_id
]
=
item
.
note_count
.
to_i
h
[
item
.
commit_id
]
=
item
.
note_count
.
to_i
end
end
h
h
end
end
...
...
config/routes.rb
View file @
fdcb7e36
...
@@ -421,7 +421,11 @@ Rails.application.routes.draw do
...
@@ -421,7 +421,11 @@ Rails.application.routes.draw do
resources
:projects
,
constraints:
{
id:
/[^\/]+/
},
only:
[
:index
,
:new
,
:create
]
resources
:projects
,
constraints:
{
id:
/[^\/]+/
},
only:
[
:index
,
:new
,
:create
]
devise_for
:users
,
controllers:
{
omniauth_callbacks: :omniauth_callbacks
,
registrations: :registrations
,
passwords: :passwords
,
sessions: :sessions
,
confirmations: :confirmations
}
devise_for
:users
,
controllers:
{
omniauth_callbacks: :omniauth_callbacks
,
registrations: :registrations
,
passwords: :passwords
,
sessions: :sessions
,
confirmations: :confirmations
}
devise_scope
:user
do
devise_scope
:user
do
get
'/users/auth/:provider/omniauth_error'
=>
'omniauth_callbacks#omniauth_error'
,
as: :omniauth_error
get
'/users/auth/:provider/omniauth_error'
=>
'omniauth_callbacks#omniauth_error'
,
as: :omniauth_error
...
@@ -789,7 +793,7 @@ Rails.application.routes.draw do
...
@@ -789,7 +793,7 @@ Rails.application.routes.draw do
end
end
# Get all keys of user
# Get all keys of user
get
':username.keys'
=>
'profiles/keys#get_keys'
,
constraints:
{
username:
/.*/
}
get
':username.keys'
=>
'profiles/keys#get_keys'
,
constraints:
{
username:
/.*/
}
get
':id'
=>
'namespaces#show'
,
constraints:
{
id:
/(?:[^.]|\.(?!atom$))+/
,
format:
/atom/
}
get
':id'
=>
'namespaces#show'
,
constraints:
{
id:
/(?:[^.]|\.(?!atom$))+/
,
format:
/atom/
}
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