fix errors when deploying a new brand new engine instance
This commit is contained in:
parent
b5fa2c761a
commit
c5692aeb2a
2
Gemfile
2
Gemfile
@ -32,7 +32,7 @@ gem 'flash_cookie_session', '~> 1.1.1'
|
||||
gem 'locomotive_liquid', '2.2.2', :require => 'liquid'
|
||||
gem 'formtastic', '~> 2.0.2'
|
||||
gem 'responders', '~> 0.6.4'
|
||||
gem 'cells', '~> 3.7.1'
|
||||
gem 'cells', '~> 3.8.0'
|
||||
gem 'RedCloth', '~> 4.2.8'
|
||||
gem 'sanitize', '~> 2.0.3'
|
||||
gem 'highline', '~> 1.6.2'
|
||||
|
@ -69,7 +69,7 @@ GEM
|
||||
carrierwave-mongoid (0.1.3)
|
||||
carrierwave (>= 0.5.6)
|
||||
mongoid (~> 2.1)
|
||||
cells (3.7.1)
|
||||
cells (3.8.0)
|
||||
actionpack (~> 3.0)
|
||||
railties (~> 3.0)
|
||||
childprocess (0.3.0)
|
||||
@ -291,7 +291,7 @@ DEPENDENCIES
|
||||
cancan (~> 1.6.7)
|
||||
capybara
|
||||
carrierwave-mongoid (~> 0.1.3)
|
||||
cells (~> 3.7.1)
|
||||
cells (~> 3.8.0)
|
||||
codemirror-rails
|
||||
coffee-script (~> 2.2.0)
|
||||
compass (~> 0.12.alpha.4)
|
||||
|
@ -46,10 +46,12 @@ body.installation {
|
||||
} // li.question
|
||||
|
||||
li {
|
||||
input {
|
||||
&[type=text] { width: 302px; }
|
||||
&.string {
|
||||
input[type=text] { width: 290px; }
|
||||
}
|
||||
|
||||
&[type=password] { width: 180px; }
|
||||
&.password {
|
||||
input[type=password] { width: 180px; }
|
||||
}
|
||||
|
||||
} // li
|
||||
|
@ -1,4 +1,5 @@
|
||||
class Locomotive::MenuCell < Cell::Base
|
||||
class Locomotive::MenuCell < Cell::Rails
|
||||
|
||||
include ::Locomotive::Engine.routes.url_helpers
|
||||
|
||||
delegate :sections, :to => :parent_controller
|
||||
@ -17,10 +18,10 @@ class Locomotive::MenuCell < Cell::Base
|
||||
|
||||
def url_options
|
||||
super.reverse_merge(
|
||||
:host => request.host_with_port,
|
||||
:protocol => request.protocol,
|
||||
:_path_segments => request.symbolized_path_parameters
|
||||
).merge(:script_name => request.script_name)
|
||||
:host => request.host_with_port,
|
||||
:protocol => request.protocol,
|
||||
:_path_segments => request.symbolized_path_parameters
|
||||
).merge(:script_name => request.script_name)
|
||||
end
|
||||
|
||||
class MenuProxy
|
||||
|
@ -9,6 +9,8 @@ module Locomotive
|
||||
|
||||
before_filter :require_site
|
||||
|
||||
before_filter :set_locale
|
||||
|
||||
# before_filter :validate_site_membership
|
||||
|
||||
skip_before_filter :verify_authenticity_token
|
||||
@ -39,6 +41,13 @@ module Locomotive
|
||||
authenticate_locomotive_account!
|
||||
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
|
@ -2,7 +2,7 @@
|
||||
!!!
|
||||
%html{ :xmlns => 'http://www.w3.org/1999/xhtml' }
|
||||
%head
|
||||
%title= title || escape_once("#{Locomotive.config.name} — #{current_site.name}")
|
||||
%title= escape_once(title || "#{Locomotive.config.name} — #{current_site.name}")
|
||||
|
||||
= javascript_include_tag 'locomotive/not_logged_in'
|
||||
= stylesheet_link_tag 'locomotive/not_logged_in', :media => 'screen'
|
||||
|
@ -13,6 +13,8 @@ module Locomotive
|
||||
template 'carrierwave.rb', 'config/initializers/carrierwave.rb'
|
||||
|
||||
template 'dragonfly.rb', 'config/initializers/dragonfly.rb'
|
||||
|
||||
template 'mongoid.yml', 'config/mongoid.yml'
|
||||
end
|
||||
|
||||
def insert_engine_routes
|
||||
|
34
lib/generators/locomotive/install/templates/mongoid.yml
Normal file
34
lib/generators/locomotive/install/templates/mongoid.yml
Normal 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'] %>
|
@ -27,7 +27,7 @@ Gem::Specification.new do |s|
|
||||
s.add_dependency 'mongoid', '~> 2.4.2'
|
||||
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'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user