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