mirror of
https://github.com/neocities/neocities.git
synced 2025-05-20 11:19:36 +02:00
work on converting slim to erb
This commit is contained in:
parent
cff94803a9
commit
a96f16fded
35 changed files with 322 additions and 333 deletions
|
@ -35,6 +35,8 @@ if defined?(Pry)
|
|||
Pry.commands.alias_command 'f', 'finish'
|
||||
end
|
||||
|
||||
Sidekiq::Logging.logger = nil unless ENV['RACK_ENV'] == 'production'
|
||||
|
||||
Sidekiq.configure_server do |config|
|
||||
config.redis = { namespace: 'neocitiesworker' }
|
||||
end
|
||||
|
@ -59,10 +61,11 @@ Sequel::Migrator.apply DB, './migrations'
|
|||
Dir.glob('models/*.rb').each {|m| require File.join(DIR_ROOT, "#{m}") }
|
||||
DB.loggers << Logger.new(STDOUT) if ENV['RACK_ENV'] == 'development'
|
||||
|
||||
# If new, throw up a random Server for development.
|
||||
|
||||
if ENV['RACK_ENV'] == 'development' && Server.count == 0
|
||||
Server.create ip: '127.0.0.1', slots_available: 999999
|
||||
if ENV['RACK_ENV'] == 'development'
|
||||
# If new, throw up a random Server for development.
|
||||
if Server.count == 0
|
||||
Server.create ip: '127.0.0.1', slots_available: 999999
|
||||
end
|
||||
end
|
||||
|
||||
Mail.defaults do
|
||||
|
@ -78,6 +81,8 @@ Mail.defaults do
|
|||
delivery_method :sendmail, options
|
||||
end
|
||||
|
||||
Sinatra::Application.set :erb, escape_html: true
|
||||
|
||||
class Sinatra::Base
|
||||
alias_method :render_original, :render
|
||||
def render(engine, data, options = {}, locals = {}, &block)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue