Merge branch 'rubocop/enable-space-before-comma-cop' into 'master'
Enable Style/SpaceBeforeComma rubocop cop No spaces before commas. See #17478 See merge request !4360
This commit is contained in:
commit
de20bd5b31
3 changed files with 17 additions and 6 deletions
|
@ -569,7 +569,7 @@ Style/SpaceBeforeBlockBraces:
|
||||||
|
|
||||||
# No spaces before commas.
|
# No spaces before commas.
|
||||||
Style/SpaceBeforeComma:
|
Style/SpaceBeforeComma:
|
||||||
Enabled: false
|
Enabled: true
|
||||||
|
|
||||||
# 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:
|
||||||
|
|
|
@ -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|
|
|
||||||
h[item.commit_id] = item.note_count.to_i
|
@project
|
||||||
end
|
.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
|
||||||
|
end
|
||||||
|
|
||||||
h
|
h
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
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
|
||||||
|
|
Loading…
Reference in a new issue