Skip to content
Snippets Groups Projects
Commit da884aab authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Avoid using {...} for multi-line blocks

parent 6579c336
No related branches found
No related tags found
No related merge requests found
Loading
@@ -74,7 +74,7 @@ Style/BlockComments:
Loading
@@ -74,7 +74,7 @@ Style/BlockComments:
   
Style/BlockEndNewline: Style/BlockEndNewline:
Description: 'Put end statement of multiline block on its own line.' Description: 'Put end statement of multiline block on its own line.'
Enabled: false Enabled: true
   
Style/Blocks: Style/Blocks:
Description: >- Description: >-
Loading
@@ -82,7 +82,7 @@ Style/Blocks:
Loading
@@ -82,7 +82,7 @@ Style/Blocks:
always ugly). always ugly).
Prefer {...} over do...end for single-line blocks. Prefer {...} over do...end for single-line blocks.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks' StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
Enabled: false Enabled: true
   
Style/BracesAroundHashParameters: Style/BracesAroundHashParameters:
Description: 'Enforce braces style around hash parameters.' Description: 'Enforce braces style around hash parameters.'
Loading
Loading
Loading
@@ -120,7 +120,7 @@ module APIGuard
Loading
@@ -120,7 +120,7 @@ module APIGuard
end end
   
def oauth2_bearer_token_error_handler def oauth2_bearer_token_error_handler
Proc.new {|e| Proc.new do |e|
response = case e response = case e
when MissingTokenError when MissingTokenError
Rack::OAuth2::Server::Resource::Bearer::Unauthorized.new Rack::OAuth2::Server::Resource::Bearer::Unauthorized.new
Loading
@@ -150,7 +150,7 @@ module APIGuard
Loading
@@ -150,7 +150,7 @@ module APIGuard
end end
   
response.finish response.finish
} end
end end
end end
   
Loading
Loading
module API module API
# Internal access API # Internal access API
class Internal < Grape::API class Internal < Grape::API
before { before { authenticate_by_gitlab_shell_token! }
authenticate_by_gitlab_shell_token!
}
   
namespace 'internal' do namespace 'internal' do
# Check if git command is allowed to project # Check if git command is allowed to project
Loading
Loading
module API module API
# namespaces API # namespaces API
class Namespaces < Grape::API class Namespaces < Grape::API
before { before do
authenticate! authenticate!
authenticated_as_admin! authenticated_as_admin!
} end
   
resource :namespaces do resource :namespaces do
# Get a namespaces list # Get a namespaces list
Loading
Loading
module API module API
# Hooks API # Hooks API
class SystemHooks < Grape::API class SystemHooks < Grape::API
before { before do
authenticate! authenticate!
authenticated_as_admin! authenticated_as_admin!
} end
   
resource :hooks do resource :hooks do
# Get the list of system hooks # Get the list of system hooks
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment