fix errors when deploying a new brand new engine instance

This commit is contained in:
did 2012-01-27 02:27:26 +01:00
parent b5fa2c761a
commit c5692aeb2a
9 changed files with 61 additions and 13 deletions

View File

@ -32,7 +32,7 @@ gem 'flash_cookie_session', '~> 1.1.1'
gem 'locomotive_liquid', '2.2.2', :require => 'liquid' gem 'locomotive_liquid', '2.2.2', :require => 'liquid'
gem 'formtastic', '~> 2.0.2' gem 'formtastic', '~> 2.0.2'
gem 'responders', '~> 0.6.4' gem 'responders', '~> 0.6.4'
gem 'cells', '~> 3.7.1' gem 'cells', '~> 3.8.0'
gem 'RedCloth', '~> 4.2.8' gem 'RedCloth', '~> 4.2.8'
gem 'sanitize', '~> 2.0.3' gem 'sanitize', '~> 2.0.3'
gem 'highline', '~> 1.6.2' gem 'highline', '~> 1.6.2'

View File

@ -69,7 +69,7 @@ GEM
carrierwave-mongoid (0.1.3) carrierwave-mongoid (0.1.3)
carrierwave (>= 0.5.6) carrierwave (>= 0.5.6)
mongoid (~> 2.1) mongoid (~> 2.1)
cells (3.7.1) cells (3.8.0)
actionpack (~> 3.0) actionpack (~> 3.0)
railties (~> 3.0) railties (~> 3.0)
childprocess (0.3.0) childprocess (0.3.0)
@ -291,7 +291,7 @@ DEPENDENCIES
cancan (~> 1.6.7) cancan (~> 1.6.7)
capybara capybara
carrierwave-mongoid (~> 0.1.3) carrierwave-mongoid (~> 0.1.3)
cells (~> 3.7.1) cells (~> 3.8.0)
codemirror-rails codemirror-rails
coffee-script (~> 2.2.0) coffee-script (~> 2.2.0)
compass (~> 0.12.alpha.4) compass (~> 0.12.alpha.4)

View File

@ -46,10 +46,12 @@ body.installation {
} // li.question } // li.question
li { li {
input { &.string {
&[type=text] { width: 302px; } input[type=text] { width: 290px; }
}
&[type=password] { width: 180px; } &.password {
input[type=password] { width: 180px; }
} }
} // li } // li

View File

@ -1,4 +1,5 @@
class Locomotive::MenuCell < Cell::Base class Locomotive::MenuCell < Cell::Rails
include ::Locomotive::Engine.routes.url_helpers include ::Locomotive::Engine.routes.url_helpers
delegate :sections, :to => :parent_controller delegate :sections, :to => :parent_controller

View File

@ -9,6 +9,8 @@ module Locomotive
before_filter :require_site before_filter :require_site
before_filter :set_locale
# before_filter :validate_site_membership # before_filter :validate_site_membership
skip_before_filter :verify_authenticity_token skip_before_filter :verify_authenticity_token
@ -39,6 +41,13 @@ module Locomotive
authenticate_locomotive_account! authenticate_locomotive_account!
end end
def set_locale
::Mongoid::Fields::I18n.locale = params[:locale] || current_site.default_locale
::I18n.locale = ::Mongoid::Fields::I18n.locale
self.setup_i18n_fallbacks
end
end end
end end
end end

View File

@ -2,7 +2,7 @@
!!! !!!
%html{ :xmlns => 'http://www.w3.org/1999/xhtml' } %html{ :xmlns => 'http://www.w3.org/1999/xhtml' }
%head %head
%title= title || escape_once("#{Locomotive.config.name} &mdash; #{current_site.name}") %title= escape_once(title || "#{Locomotive.config.name} &mdash; #{current_site.name}")
= javascript_include_tag 'locomotive/not_logged_in' = javascript_include_tag 'locomotive/not_logged_in'
= stylesheet_link_tag 'locomotive/not_logged_in', :media => 'screen' = stylesheet_link_tag 'locomotive/not_logged_in', :media => 'screen'

View File

@ -13,6 +13,8 @@ module Locomotive
template 'carrierwave.rb', 'config/initializers/carrierwave.rb' template 'carrierwave.rb', 'config/initializers/carrierwave.rb'
template 'dragonfly.rb', 'config/initializers/dragonfly.rb' template 'dragonfly.rb', 'config/initializers/dragonfly.rb'
template 'mongoid.yml', 'config/mongoid.yml'
end end
def insert_engine_routes def insert_engine_routes

View File

@ -0,0 +1,34 @@
defaults: &defaults
host: localhost
port: 27017
# slaves:
# - host: slave1.local
# port: 27018
# - host: slave2.local
# port: 27019
development:
<<: *defaults
database: locomotive_dev
test:
<<: *defaults
database: locomotive_test
# set these environment variables on your prod server
production:
# <<: *defaults
# database: locomotive_prod
# other settings for production
# host: <%%= ENV['MONGOID_HOST'] %>
# port: <%%= ENV['MONGOID_PORT'] %>
# username: <%%= ENV['MONGOID_USERNAME'] %>
# password: <%%= ENV['MONGOID_PASSWORD'] %>
# database: <%%= ENV['MONGOID_DATABASE'] %>
# heroku
# uri: <%%= ENV['MONGOHQ_URL'] %>
# bushido (mongohq_url will also work)
uri: <%%= ENV['MONGODB_URL'] %>

View File

@ -27,7 +27,7 @@ Gem::Specification.new do |s|
s.add_dependency 'mongoid', '~> 2.4.2' s.add_dependency 'mongoid', '~> 2.4.2'
s.add_dependency 'locomotive_mongoid_acts_as_tree', '0.1.5.8' s.add_dependency 'locomotive_mongoid_acts_as_tree', '0.1.5.8'
s.add_dependency 'custom_fields', '~> 2.0.0.rc1' s.add_dependency 'custom_fields', '~> 2.0.0.rc2'
s.add_dependency 'kaminari' s.add_dependency 'kaminari'