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
# 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
......
require 'sidekiq/web'
require 'sidekiq/cron/web'
require 'api/api'
Rails.application.routes.draw do
if Gitlab::Sherlock.enabled?
......
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
......
......@@ -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
......@@ -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
......
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