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
Boxiang Sun
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
# This is needed for gitlab-shell
ENV
[
'GITLAB_PATH_OUTSIDE_HOOK'
]
=
ENV
[
'PATH'
]
config
.
eager_load_paths
+=
[
"
#{
Rails
.
root
}
/lib"
]
config
.
generators
do
|
g
|
g
.
factory_girl
false
end
...
...
config/routes.rb
View file @
51a8811e
require
'sidekiq/web'
require
'sidekiq/cron/web'
require
'api/api'
Rails
.
application
.
routes
.
draw
do
if
Gitlab
::
Sherlock
.
enabled?
...
...
lib/api/api.rb
View file @
51a8811e
Dir
[
"
#{
Rails
.
root
}
/lib/api/*.rb"
].
each
{
|
file
|
require
file
}
module
API
class
API
<
Grape
::
API
include
::
API
::
APIGuard
include
APIGuard
version
'v3'
,
using: :path
rescue_from
ActiveRecord
::
RecordNotFound
do
...
...
lib/api/api_guard.rb
View file @
51a8811e
...
...
@@ -2,8 +2,7 @@
require
'rack/oauth2'
module
API
module
APIGuard
module
APIGuard
extend
ActiveSupport
::
Concern
included
do
|
base
|
...
...
@@ -170,5 +169,4 @@ module API
@scopes
=
scopes
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}
module
Ci
module
API
class
API
<
Grape
::
API
include
::
API
::
APIGuard
include
APIGuard
version
'v1'
,
using: :path
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