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
51a8811e
Commit
51a8811e
authored
May 09, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Eager load `lib/api`"
This reverts commit
0a280158
.
parent
71da2e0b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
140 additions
and
141 deletions
+140
-141
config/application.rb
config/application.rb
+0
-2
config/routes.rb
config/routes.rb
+1
-0
lib/api/api.rb
lib/api/api.rb
+3
-1
lib/api/api_guard.rb
lib/api/api_guard.rb
+135
-137
lib/ci/api/api.rb
lib/ci/api/api.rb
+1
-1
No files found.
config/application.rb
View file @
51a8811e
...
@@ -102,8 +102,6 @@ module Gitlab
...
@@ -102,8 +102,6 @@ module Gitlab
# This is needed for gitlab-shell
# This is needed for gitlab-shell
ENV
[
'GITLAB_PATH_OUTSIDE_HOOK'
]
=
ENV
[
'PATH'
]
ENV
[
'GITLAB_PATH_OUTSIDE_HOOK'
]
=
ENV
[
'PATH'
]
config
.
eager_load_paths
+=
[
"
#{
Rails
.
root
}
/lib"
]
config
.
generators
do
|
g
|
config
.
generators
do
|
g
|
g
.
factory_girl
false
g
.
factory_girl
false
end
end
...
...
config/routes.rb
View file @
51a8811e
require
'sidekiq/web'
require
'sidekiq/web'
require
'sidekiq/cron/web'
require
'sidekiq/cron/web'
require
'api/api'
Rails
.
application
.
routes
.
draw
do
Rails
.
application
.
routes
.
draw
do
if
Gitlab
::
Sherlock
.
enabled?
if
Gitlab
::
Sherlock
.
enabled?
...
...
lib/api/api.rb
View file @
51a8811e
Dir
[
"
#{
Rails
.
root
}
/lib/api/*.rb"
].
each
{
|
file
|
require
file
}
module
API
module
API
class
API
<
Grape
::
API
class
API
<
Grape
::
API
include
::
API
::
APIGuard
include
APIGuard
version
'v3'
,
using: :path
version
'v3'
,
using: :path
rescue_from
ActiveRecord
::
RecordNotFound
do
rescue_from
ActiveRecord
::
RecordNotFound
do
...
...
lib/api/api_guard.rb
View file @
51a8811e
...
@@ -2,8 +2,7 @@
...
@@ -2,8 +2,7 @@
require
'rack/oauth2'
require
'rack/oauth2'
module
API
module
APIGuard
module
APIGuard
extend
ActiveSupport
::
Concern
extend
ActiveSupport
::
Concern
included
do
|
base
|
included
do
|
base
|
...
@@ -170,5 +169,4 @@ module API
...
@@ -170,5 +169,4 @@ module API
@scopes
=
scopes
@scopes
=
scopes
end
end
end
end
end
end
end
lib/ci/api/api.rb
View file @
51a8811e
...
@@ -3,7 +3,7 @@ Dir["#{Rails.root}/lib/ci/api/*.rb"].each {|file| require file}
...
@@ -3,7 +3,7 @@ Dir["#{Rails.root}/lib/ci/api/*.rb"].each {|file| require file}
module
Ci
module
Ci
module
API
module
API
class
API
<
Grape
::
API
class
API
<
Grape
::
API
include
::
API
::
APIGuard
include
APIGuard
version
'v1'
,
using: :path
version
'v1'
,
using: :path
rescue_from
ActiveRecord
::
RecordNotFound
do
rescue_from
ActiveRecord
::
RecordNotFound
do
...
...
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