require dtext correctly

This commit is contained in:
r888888888
2016-03-17 15:14:08 -07:00
parent b24ab33109
commit 0ab1c9f9f5
3 changed files with 6 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ gem 'twitter'
gem 'aws-sdk', '~> 2'
gem 'responders'
gem 'highline'
gem 'dtext_rb', :git => "https://github.com/r888888888/dtext_rb.git"
gem 'dtext_rb', :git => "https://github.com/r888888888/dtext_rb.git", :require => "dtext"
# needed for looser jpeg header compat
gem 'ruby-imagespec', :require => "image_spec", :git => "https://github.com/r888888888/ruby-imagespec.git", :branch => "exif-fixes"

View File

@@ -1,3 +1,5 @@
require 'dtext'
module ApplicationHelper
def wordbreakify(string)
lines = string.scan(/.{1,10}/)
@@ -48,11 +50,11 @@ module ApplicationHelper
end
def format_text(text, options = {})
DTextRagel.parse(text)
raw(DTextRagel.parse(text))
end
def strip_dtext(text)
DTextRagel.parse_strip(text)
raw(DTextRagel.parse_strip(text))
end
def error_messages_for(instance_name)

View File

@@ -4,7 +4,7 @@ app_path = "/var/www/danbooru2/current"
# Set unicorn options
worker_processes 2
preload_app false
preload_app true
timeout 180
listen "127.0.0.1:9000"