Commit 51a8811e authored by Kamil Trzcinski's avatar Kamil Trzcinski

Revert "Eager load `lib/api`"

This reverts commit 0a280158.
parent 71da2e0b
...@@ -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
......
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?
......
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
......
...@@ -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
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment