require dtext correctly
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -53,7 +53,7 @@ gem 'twitter'
|
|||||||
gem 'aws-sdk', '~> 2'
|
gem 'aws-sdk', '~> 2'
|
||||||
gem 'responders'
|
gem 'responders'
|
||||||
gem 'highline'
|
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
|
# needed for looser jpeg header compat
|
||||||
gem 'ruby-imagespec', :require => "image_spec", :git => "https://github.com/r888888888/ruby-imagespec.git", :branch => "exif-fixes"
|
gem 'ruby-imagespec', :require => "image_spec", :git => "https://github.com/r888888888/ruby-imagespec.git", :branch => "exif-fixes"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
require 'dtext'
|
||||||
|
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
def wordbreakify(string)
|
def wordbreakify(string)
|
||||||
lines = string.scan(/.{1,10}/)
|
lines = string.scan(/.{1,10}/)
|
||||||
@@ -48,11 +50,11 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def format_text(text, options = {})
|
def format_text(text, options = {})
|
||||||
DTextRagel.parse(text)
|
raw(DTextRagel.parse(text))
|
||||||
end
|
end
|
||||||
|
|
||||||
def strip_dtext(text)
|
def strip_dtext(text)
|
||||||
DTextRagel.parse_strip(text)
|
raw(DTextRagel.parse_strip(text))
|
||||||
end
|
end
|
||||||
|
|
||||||
def error_messages_for(instance_name)
|
def error_messages_for(instance_name)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ app_path = "/var/www/danbooru2/current"
|
|||||||
# Set unicorn options
|
# Set unicorn options
|
||||||
worker_processes 2
|
worker_processes 2
|
||||||
|
|
||||||
preload_app false
|
preload_app true
|
||||||
timeout 180
|
timeout 180
|
||||||
listen "127.0.0.1:9000"
|
listen "127.0.0.1:9000"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user