do not run the locomotive core initializer if engine
This commit is contained in:
parent
9ec642136f
commit
2cba14afec
3
Gemfile
3
Gemfile
@ -8,7 +8,7 @@ gem 'warden'
|
|||||||
gem 'devise', '= 1.1.3'
|
gem 'devise', '= 1.1.3'
|
||||||
|
|
||||||
gem 'mongoid', '2.0.0.rc.7'
|
gem 'mongoid', '2.0.0.rc.7'
|
||||||
gem 'bson_ext', '~> 1.2.1'
|
gem 'bson_ext', '~> 1.3.0'
|
||||||
gem 'locomotive_mongoid_acts_as_tree', '0.1.5.5', :require => 'mongoid_acts_as_tree'
|
gem 'locomotive_mongoid_acts_as_tree', '0.1.5.5', :require => 'mongoid_acts_as_tree'
|
||||||
gem 'will_paginate'
|
gem 'will_paginate'
|
||||||
|
|
||||||
@ -32,6 +32,7 @@ gem 'delayed_job', '2.1.4'
|
|||||||
gem 'delayed_job_mongoid', '1.0.2'
|
gem 'delayed_job_mongoid', '1.0.2'
|
||||||
gem 'rubyzip'
|
gem 'rubyzip'
|
||||||
gem 'locomotive_jammit-s3', :require => 'jammit-s3'
|
gem 'locomotive_jammit-s3', :require => 'jammit-s3'
|
||||||
|
gem 'SystemTimer', :platforms => :ruby_18
|
||||||
|
|
||||||
# The rest of the dependencies are for use when in the locomotive dev environment
|
# The rest of the dependencies are for use when in the locomotive dev environment
|
||||||
|
|
||||||
|
60
Gemfile.lock
60
Gemfile.lock
@ -26,41 +26,42 @@ GEM
|
|||||||
open4
|
open4
|
||||||
Platform (0.4.0)
|
Platform (0.4.0)
|
||||||
RedCloth (4.2.7)
|
RedCloth (4.2.7)
|
||||||
|
SystemTimer (1.2.3)
|
||||||
ZenTest (4.5.0)
|
ZenTest (4.5.0)
|
||||||
abstract (1.0.0)
|
abstract (1.0.0)
|
||||||
actionmailer (3.0.5)
|
actionmailer (3.0.6)
|
||||||
actionpack (= 3.0.5)
|
actionpack (= 3.0.6)
|
||||||
mail (~> 2.2.15)
|
mail (~> 2.2.15)
|
||||||
actionpack (3.0.5)
|
actionpack (3.0.6)
|
||||||
activemodel (= 3.0.5)
|
activemodel (= 3.0.6)
|
||||||
activesupport (= 3.0.5)
|
activesupport (= 3.0.6)
|
||||||
builder (~> 2.1.2)
|
builder (~> 2.1.2)
|
||||||
erubis (~> 2.6.6)
|
erubis (~> 2.6.6)
|
||||||
i18n (~> 0.4)
|
i18n (~> 0.5.0)
|
||||||
rack (~> 1.2.1)
|
rack (~> 1.2.1)
|
||||||
rack-mount (~> 0.6.13)
|
rack-mount (~> 0.6.14)
|
||||||
rack-test (~> 0.5.7)
|
rack-test (~> 0.5.7)
|
||||||
tzinfo (~> 0.3.23)
|
tzinfo (~> 0.3.23)
|
||||||
activemodel (3.0.5)
|
activemodel (3.0.6)
|
||||||
activesupport (= 3.0.5)
|
activesupport (= 3.0.6)
|
||||||
builder (~> 2.1.2)
|
builder (~> 2.1.2)
|
||||||
i18n (~> 0.4)
|
i18n (~> 0.5.0)
|
||||||
activerecord (3.0.5)
|
activerecord (3.0.6)
|
||||||
activemodel (= 3.0.5)
|
activemodel (= 3.0.6)
|
||||||
activesupport (= 3.0.5)
|
activesupport (= 3.0.6)
|
||||||
arel (~> 2.0.2)
|
arel (~> 2.0.2)
|
||||||
tzinfo (~> 0.3.23)
|
tzinfo (~> 0.3.23)
|
||||||
activeresource (3.0.5)
|
activeresource (3.0.6)
|
||||||
activemodel (= 3.0.5)
|
activemodel (= 3.0.6)
|
||||||
activesupport (= 3.0.5)
|
activesupport (= 3.0.6)
|
||||||
activesupport (3.0.5)
|
activesupport (3.0.6)
|
||||||
archive-tar-minitar (0.5.2)
|
archive-tar-minitar (0.5.2)
|
||||||
arel (2.0.9)
|
arel (2.0.9)
|
||||||
autotest (4.4.6)
|
autotest (4.4.6)
|
||||||
ZenTest (>= 4.4.1)
|
ZenTest (>= 4.4.1)
|
||||||
bcrypt-ruby (2.1.4)
|
bcrypt-ruby (2.1.4)
|
||||||
bson (1.3.0)
|
bson (1.3.0)
|
||||||
bson_ext (1.2.4)
|
bson_ext (1.3.0)
|
||||||
builder (2.1.2)
|
builder (2.1.2)
|
||||||
bushido (0.0.12)
|
bushido (0.0.12)
|
||||||
highline (>= 1.6.1)
|
highline (>= 1.6.1)
|
||||||
@ -195,17 +196,17 @@ GEM
|
|||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
rack-test (0.5.7)
|
rack-test (0.5.7)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rails (3.0.5)
|
rails (3.0.6)
|
||||||
actionmailer (= 3.0.5)
|
actionmailer (= 3.0.6)
|
||||||
actionpack (= 3.0.5)
|
actionpack (= 3.0.6)
|
||||||
activerecord (= 3.0.5)
|
activerecord (= 3.0.6)
|
||||||
activeresource (= 3.0.5)
|
activeresource (= 3.0.6)
|
||||||
activesupport (= 3.0.5)
|
activesupport (= 3.0.6)
|
||||||
bundler (~> 1.0)
|
bundler (~> 1.0)
|
||||||
railties (= 3.0.5)
|
railties (= 3.0.6)
|
||||||
railties (3.0.5)
|
railties (3.0.6)
|
||||||
actionpack (= 3.0.5)
|
actionpack (= 3.0.6)
|
||||||
activesupport (= 3.0.5)
|
activesupport (= 3.0.6)
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (~> 0.14.4)
|
thor (~> 0.14.4)
|
||||||
rake (0.8.7)
|
rake (0.8.7)
|
||||||
@ -271,10 +272,11 @@ PLATFORMS
|
|||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
RedCloth (= 4.2.7)
|
RedCloth (= 4.2.7)
|
||||||
|
SystemTimer
|
||||||
ZenTest
|
ZenTest
|
||||||
actionmailer_with_request!
|
actionmailer_with_request!
|
||||||
autotest
|
autotest
|
||||||
bson_ext (~> 1.2.1)
|
bson_ext (~> 1.3.0)
|
||||||
bushido
|
bushido
|
||||||
capybara
|
capybara
|
||||||
cucumber (= 0.8.5)
|
cucumber (= 0.8.5)
|
||||||
|
@ -7,16 +7,16 @@ Locomotive.configure do |config|
|
|||||||
# your own domain name (ex: locomotivehosting.com).
|
# your own domain name (ex: locomotivehosting.com).
|
||||||
#
|
#
|
||||||
# Ex:
|
# Ex:
|
||||||
config.multi_sites do |multi_sites|
|
# config.multi_sites do |multi_sites|
|
||||||
# each new website you add will have a default entry based on a subdomain
|
# # each new website you add will have a default entry based on a subdomain
|
||||||
# and the multi_site_domain value (ex: website_1.locomotivehosting.com).
|
# # and the multi_site_domain value (ex: website_1.locomotivehosting.com).
|
||||||
multi_sites.domain = 'example.com' #'myhostingplatform.com'
|
# multi_sites.domain = 'example.com' #'myhostingplatform.com'
|
||||||
|
#
|
||||||
# define the reserved subdomains
|
# # define the reserved subdomains
|
||||||
# Ex:
|
# # Ex:
|
||||||
multi_sites.reserved_subdomains = %w(www admin email blog webmail mail support help site sites)
|
# multi_sites.reserved_subdomains = %w(www admin email blog webmail mail support help site sites)
|
||||||
end
|
# end
|
||||||
# config.multi_sites = false
|
config.multi_sites = false
|
||||||
|
|
||||||
# configure the hosting target for the production environment. Locomotive can be installed in:
|
# configure the hosting target for the production environment. Locomotive can be installed in:
|
||||||
# - your own server
|
# - your own server
|
||||||
@ -60,4 +60,4 @@ Locomotive.configure do |config|
|
|||||||
# config.mailer_sender = 'support'
|
# config.mailer_sender = 'support'
|
||||||
# # => 'support@heroku.com' (Heroku), 'support@bushi.do' (Bushido), 'support@example.com' (Dev) or 'support@<your_hosting_platform>' (Multi-sites)
|
# # => 'support@heroku.com' (Heroku), 'support@bushi.do' (Bushido), 'support@example.com' (Dev) or 'support@<your_hosting_platform>' (Multi-sites)
|
||||||
config.mailer_sender = 'support'
|
config.mailer_sender = 'support'
|
||||||
end
|
end unless Locomotive.engine?
|
||||||
|
@ -35,6 +35,10 @@ module Locomotive
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.engine?
|
||||||
|
self.const_defined?('Engine')
|
||||||
|
end
|
||||||
|
|
||||||
def self.configure
|
def self.configure
|
||||||
self.config ||= Configuration.new
|
self.config ||= Configuration.new
|
||||||
|
|
||||||
|
@ -35,8 +35,6 @@ module Locomotive
|
|||||||
|
|
||||||
self.enhance_site_model_with_heroku
|
self.enhance_site_model_with_heroku
|
||||||
|
|
||||||
puts "HEROKU NAME = #{self.config.heroku[:name]} / #{ENV['APP_NAME'].inspect} / #{ENV.inspect}"
|
|
||||||
|
|
||||||
# "cache" domains for better performance
|
# "cache" domains for better performance
|
||||||
self.heroku_domains = self.heroku_connection.list_domains(self.config.heroku[:name]).collect { |h| h[:domain] }
|
self.heroku_domains = self.heroku_connection.list_domains(self.config.heroku[:name]).collect { |h| h[:domain] }
|
||||||
end
|
end
|
||||||
@ -45,8 +43,6 @@ module Locomotive
|
|||||||
login = self.config.heroku[:login] || ENV['HEROKU_LOGIN']
|
login = self.config.heroku[:login] || ENV['HEROKU_LOGIN']
|
||||||
password = self.config.heroku[:password] || ENV['HEROKU_PASSWORD']
|
password = self.config.heroku[:password] || ENV['HEROKU_PASSWORD']
|
||||||
|
|
||||||
puts "LOGIN = #{login} / PASSWORD = #{password}"
|
|
||||||
|
|
||||||
self.heroku_connection = ::Heroku::Client.new(login, password)
|
self.heroku_connection = ::Heroku::Client.new(login, password)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user