Compare commits

...

2 Commits

Author SHA1 Message Date
benjamin wil e87142ef19 Explicitly set encoding for Precious::App
An issue was reported (see #1721) where, in docker containers where the
`LANG` was not being set, `Precious::App` would serve Mustache templates
in an ASCII encoding. This caused templates to error out.

In the past, this would have happened in environments where `LANG` was
not set and the Gollum applciation configuration had enabled MathJax.
Now, it happens even if MathJax is disabled because of a UTF-8 character
I added to the mobile navigation menu.

Basically, we should enforce a UTF-8 encoding from now on to avoid
runtime errors related to ASCII encoding.
2021-06-13 14:24:26 -07:00
benjamin wil aa823b5a2d Use recent JRuby release for Travis CI (#1730)
Our JRuby CI runs have been errorring due to what I think is an issue
with an older `jruby-openssl` version.
2021-06-13 14:17:18 -07:00
2 changed files with 17 additions and 14 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ rvm:
- 2.4.0
- 2.6.0
- 3.0.0
- jruby-9.2.9.0
- jruby-9.2.18.0
jdk:
- oraclejdk9
before_install:
+4 -1
View File
@@ -1,4 +1,5 @@
# ~*~ encoding: utf-8 ~*~
# encoding: UTF-8
require 'cgi'
require 'sinatra'
require 'sinatra/namespace'
@@ -69,6 +70,8 @@ module Precious
register Sinatra::Namespace
include Precious::Helpers
Encoding.default_external = "UTF-8"
dir = File.dirname(File.expand_path(__FILE__))
set :sprockets, ::Precious::Assets.sprockets(dir)