Explicitly load constants on Travis::Api

For some reason not loading it broke new relic notifications
This commit is contained in:
Piotr Sarnacki 2013-01-19 23:08:47 +01:00
parent 046b396b9e
commit a2018bc0f1

View File

@ -9,6 +9,8 @@ require 'core_ext/module/load_constants'
models = Travis::Model.constants.map(&:to_s)
only = [/^(ActiveRecord|ActiveModel|Travis|GH|#{models.join('|')})/]
Travis.load_constants! :only => only, :skip => ['Travis::Memory', 'GH::ResponseWrapper'], :debug => false
[Travis::Api, Travis, GH].each do |target|
target.load_constants! :only => only, :skip => ['Travis::Memory', 'GH::ResponseWrapper'], :debug => false
end
run Travis::Api::App.new