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
Kazuhiko Shiozaki
gitlab-ce
Commits
da884aab
Commit
da884aab
authored
Feb 02, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid using {...} for multi-line blocks
parent
6579c336
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
11 deletions
+9
-11
.rubocop.yml
.rubocop.yml
+2
-2
lib/api/api_guard.rb
lib/api/api_guard.rb
+2
-2
lib/api/internal.rb
lib/api/internal.rb
+1
-3
lib/api/namespaces.rb
lib/api/namespaces.rb
+2
-2
lib/api/system_hooks.rb
lib/api/system_hooks.rb
+2
-2
No files found.
.rubocop.yml
View file @
da884aab
...
...
@@ -74,7 +74,7 @@ Style/BlockComments:
Style/BlockEndNewline
:
Description
:
'
Put
end
statement
of
multiline
block
on
its
own
line.'
Enabled
:
fals
e
Enabled
:
tru
e
Style/Blocks
:
Description
:
>-
...
...
@@ -82,7 +82,7 @@ Style/Blocks:
always ugly).
Prefer {...} over do...end for single-line blocks.
StyleGuide
:
'
https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
Enabled
:
fals
e
Enabled
:
tru
e
Style/BracesAroundHashParameters
:
Description
:
'
Enforce
braces
style
around
hash
parameters.'
...
...
lib/api/api_guard.rb
View file @
da884aab
...
...
@@ -120,7 +120,7 @@ module APIGuard
end
def
oauth2_bearer_token_error_handler
Proc
.
new
{
|
e
|
Proc
.
new
do
|
e
|
response
=
case
e
when
MissingTokenError
Rack
::
OAuth2
::
Server
::
Resource
::
Bearer
::
Unauthorized
.
new
...
...
@@ -150,7 +150,7 @@ module APIGuard
end
response
.
finish
}
end
end
end
...
...
lib/api/internal.rb
View file @
da884aab
module
API
# Internal access API
class
Internal
<
Grape
::
API
before
{
authenticate_by_gitlab_shell_token!
}
before
{
authenticate_by_gitlab_shell_token!
}
namespace
'internal'
do
# Check if git command is allowed to project
...
...
lib/api/namespaces.rb
View file @
da884aab
module
API
# namespaces API
class
Namespaces
<
Grape
::
API
before
{
before
do
authenticate!
authenticated_as_admin!
}
end
resource
:namespaces
do
# Get a namespaces list
...
...
lib/api/system_hooks.rb
View file @
da884aab
module
API
# Hooks API
class
SystemHooks
<
Grape
::
API
before
{
before
do
authenticate!
authenticated_as_admin!
}
end
resource
:hooks
do
# Get the list of system hooks
...
...
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