Merge branch '5.x' of https://github.com/gollum/gollum into 5.x

This commit is contained in:
Bart Kamphorst
2018-09-17 21:12:39 +02:00
3 changed files with 4 additions and 17 deletions
+4 -4
View File
@@ -29,10 +29,10 @@ class String
def to_ascii
self # Do not transliterate utf-8 url's unless using Grit
end
end
def to_url
to_ascii
end
def to_url
to_ascii
end
end
@@ -389,7 +389,7 @@ module Precious
@page = wiki_page(params[:splat].first).page
@page_num = [params[:page].to_i, 1].max
unless @page.nil?
@versions = @page.versions(:page => @page_num, :follow => settings.wiki_options.fetch(:follow_renames, git_adapter == 'rjgit' ? false : true))
@versions = @page.versions(:page => @page_num, :follow => settings.wiki_options.fetch(:follow_renames, ::Gollum::GIT_ADAPTER == 'rjgit' ? false : true))
mustache :history
else
redirect to("/")
-4
View File
@@ -6,10 +6,6 @@ module Precious
EMOJI_PATHNAME = Pathname.new(Gemojione.images_path).freeze
def git_adapter
defined?(Gollum::GIT_ADAPTER) ? Gollum::GIT_ADAPTER : DEFAULT_ADAPTER.match(/(.*)_adapter/)[1]
end
def join_page_name(name, ext)
"#{name}#{ext}"
end
-9
View File
@@ -4,15 +4,6 @@ require File.expand_path(File.join(File.dirname(__FILE__), "helper"))
context "Precious::Helpers" do
include Precious::Helpers
test "return git adapter" do
if defined?(Gollum::GIT_ADAPTER)
result = Gollum::GIT_ADAPTER
else
Gollum::GIT_ADAPTER = result = 'grit'
end
assert_equal result, git_adapter
end
test "extracting paths from URLs" do
assert_nil extract_path('Eye-Of-Sauron')
assert_equal 'Mordor', extract_path('Mordor/Sauron')