engine/lib/locomotive/hosting/heroku.rb

20 lines
393 B
Ruby
Raw Normal View History

require 'locomotive/hosting/heroku/enabler'
2011-03-27 23:49:12 +00:00
module Locomotive
module Hosting
2011-03-27 23:49:12 +00:00
module Heroku
def heroku?
self.config.hosting == :heroku ||
(self.config.hosting == :auto && ENV['HEROKU_SLUG'].present?)
2011-03-27 23:49:12 +00:00
end
def enable_heroku
Locomotive.send(:include, Locomotive::Hosting::Heroku::Enabler)
2011-03-27 23:49:12 +00:00
self.enable_heroku!
2011-03-27 23:49:12 +00:00
end
end
end
end