BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
0a280158
Commit
0a280158
authored
Apr 15, 2016
by
Timothy Andrew
Committed by
Kamil Trzcinski
Apr 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eager load `lib/api`
- So that the server doesn't have to be restarted for every change in dev.
parent
5fc310b4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
5 deletions
+4
-5
application.rb
config/application.rb
+2
-0
routes.rb
config/routes.rb
+0
-1
api.rb
lib/api/api.rb
+1
-3
api_guard.rb
lib/api/api_guard.rb
+0
-0
api.rb
lib/ci/api/api.rb
+1
-1
No files found.
config/application.rb
View file @
0a280158
...
...
@@ -79,6 +79,8 @@ 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 @
0a280158
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 @
0a280158
Dir
[
"
#{
Rails
.
root
}
/lib/api/*.rb"
].
each
{
|
file
|
require
file
}
module
API
class
API
<
Grape
::
API
include
APIGuard
include
::
API
::
APIGuard
version
'v3'
,
using: :path
rescue_from
ActiveRecord
::
RecordNotFound
do
...
...
lib/api/api_guard.rb
View file @
0a280158
This diff is collapsed.
Click to expand it.
lib/ci/api/api.rb
View file @
0a280158
...
...
@@ -3,7 +3,7 @@ Dir["#{Rails.root}/lib/ci/api/*.rb"].each {|file| require file}
module
Ci
module
API
class
API
<
Grape
::
API
include
APIGuard
include
::
API
::
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