Compare commits

..

14 Commits

Author SHA1 Message Date
Dawa Ometto 6de0914788 Release 4.1.2 2017-08-07 17:54:00 +02:00
Dawa Ometto e4f702d1e2 Lock to newer gollum-lib to avoid falling back to unsafe nokogiri 2017-08-07 17:40:49 +02:00
Dawa Ometto 2f864c5e15 Stop support for ruby 2.0.0 because it is not compatible with a safe nokogiri. See https://github.com/gollum/gollum-lib/issues/278 2017-07-31 18:09:32 +02:00
Dawa Ometto 7139590798 Try fix travis 2017-07-31 18:01:37 +02:00
Dawa Ometto 0870655455 Release 4.1.1 2017-04-17 11:20:06 +02:00
Dawa Ometto ba24a7bb8c Update gemijione dependency. Closes #1227 2017-04-17 11:01:50 +02:00
Dawa Ometto f32d7465a2 Set bar_side for versioned pages. Closes #1226 2017-04-14 00:31:09 +02:00
Dawa Ometto e202698bf1 Merge pull request #1189 from nimag42/patch-1
Solve bug when folder contains non-ascii character
2017-04-09 11:49:54 +02:00
Dawa Ometto 11c2bf7dae Fix date. Closes #1211 2017-04-05 23:05:24 +02:00
Dawa Ometto 53cf0e1148 Merge pull request #1201 from adamniedzielski/skip-transliteration-tests-rugged
Skip tests for transliteration for adapters different than grit
2017-03-11 20:35:53 +01:00
Adam Niedzielski 2d1e49e3f2 Skip tests for transliteration for adapters different than grit 2017-03-11 19:28:31 +01:00
Dawa Ometto 199161f611 Merge pull request #1188 from adamniedzielski/pass-non-empty-author-details
Pass non-empty commit author details in transliteration test
2017-03-10 12:00:57 +01:00
Jacquin Théo a0f5a60ea0 Solve bug when folder contain non-ascii character
When you create a file in a folder with non-ascii character, for exemple "Réseau", after creating the page, it throwed an "URI::InvalidURIError", given the fact that the url returned was "/Réseau/H%C3%A9y", only the part with the name of the file was correctly encoded.

So I propose to encode every part of the url to solve this issue
So I just
2017-01-29 00:39:39 +01:00
Adam Niedzielski af29c6e441 Pass non-empty commit author details in transliteration test
Empty name or email are not allowed by libgit2 and cause a test failure
when the test suite is run against rugged_adapter.
2017-01-27 15:15:50 +01:00
8 changed files with 25 additions and 11 deletions
+3 -2
View File
@@ -1,11 +1,12 @@
rvm:
- 2.0.0
- 2.1.0
- 2.1.1
- 2.2.2
- 2.3.0
- 2.4.0
- jruby-19mode
- jruby-9.1.8.0
jdk:
- oraclejdk8
before_install:
- sudo apt-get update
- sudo apt-get install libicu-dev
+5 -1
View File
@@ -1,4 +1,8 @@
# 4.1.0 /2016-03-09
# 4.1.2 /2017-08-07
* Lock to a newer version of gollum-lib to avoid installing an outdated and vulnerable dependency (nokogiri) on ruby 2.0. See https://github.com/gollum/gollum-lib/pull/279. Note: this breaks semantic versioning so those using outdated rubies will discover the problem on update.
# 4.1.0 /2017-03-09
* Added file deletion functionality to file view
* Various performance improvements
+4 -4
View File
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
s.required_ruby_version = '>= 1.9'
s.name = 'gollum'
s.version = '4.1.0'
s.date = '2017-03-09'
s.version = '4.1.2'
s.date = '2017-08-07'
s.rubyforge_project = 'gollum'
s.license = 'MIT'
@@ -24,12 +24,12 @@ Gem::Specification.new do |s|
s.rdoc_options = ['--charset=UTF-8']
s.extra_rdoc_files = %w[README.md LICENSE]
s.add_dependency 'gollum-lib', '~> 4.0', '>= 4.0.1'
s.add_dependency 'gollum-lib', '>= 4.2.7'
s.add_dependency 'kramdown', '~> 1.9.0'
s.add_dependency 'sinatra', '~> 1.4', '>= 1.4.4'
s.add_dependency 'mustache', ['>= 0.99.5', '< 1.0.0']
s.add_dependency 'useragent', '~> 0.16.2'
s.add_dependency 'gemojione', '~> 2'
s.add_dependency 'gemojione', '~> 3.2'
s.add_development_dependency 'rack-test', '~> 0.6.2'
s.add_development_dependency 'shoulda', '~> 3.5.0'
+1 -1
View File
@@ -16,7 +16,7 @@ require File.expand_path('../gollum/uri_encode_component', __FILE__)
$KCODE = 'U' if RUBY_VERSION[0, 3] == '1.8'
module Gollum
VERSION = '4.1.0'
VERSION = '4.1.2'
def self.assets_path
::File.expand_path('gollum/public', ::File.dirname(__FILE__))
+2 -1
View File
@@ -348,7 +348,7 @@ module Precious
wiki.write_page(name, format, params[:content], commit_message, path)
page_dir = settings.wiki_options[:page_file_dir].to_s
redirect to("/#{clean_url(::File.join(page_dir, path, encodeURIComponent(name)))}")
redirect to("/#{clean_url(::File.join(encodeURIComponent(page_dir), encodeURIComponent(path), encodeURIComponent(name)))}")
rescue Gollum::DuplicatePageError => e
@message = "Duplicate page: #{e.message}"
mustache :error
@@ -464,6 +464,7 @@ module Precious
@name = name
@content = page.formatted_data
@version = version
@bar_side = wikip.wiki.bar_side
mustache :page
elsif file = wikip.wiki.file("#{file_path}", version, true)
show_file(file)
+1 -1
View File
@@ -4,7 +4,7 @@ require 'gemojione'
module Precious
module Helpers
EMOJI_PATHNAME = Pathname.new(Gemojione.index.images_path).freeze
EMOJI_PATHNAME = Pathname.new(Gemojione.images_path).freeze
# Extract the path string that Gollum::Wiki expects
def extract_path(file_path)
+5
View File
@@ -30,6 +30,11 @@ context "Frontend" do
# and in file names saved to disk
# urls are not case sensitive
assert_equal 'Title-Space', 'Title Space'.to_url
end
test "translation" do
# we transliterate only when adapter is grit
return if defined?(Gollum::GIT_ADAPTER) && Gollum::GIT_ADAPTER != 'grit'
# ascii only file names prevent UTF8 issues
# when using git repos across operating systems
+4 -1
View File
@@ -90,8 +90,11 @@ context "Frontend Unicode support" do
end
test 'transliteration' do
# we transliterate only when adapter is grit
return if defined?(Gollum::GIT_ADAPTER) && Gollum::GIT_ADAPTER != 'grit'
# TODO: Remove to_url once write_page changes are merged.
@wiki.write_page('ééééé'.to_url, :markdown, '한글 text', { :name => '', :email => '' })
@wiki.write_page('ééééé'.to_url, :markdown, '한글 text', commit_details)
page = @wiki.page('eeeee')
assert_equal '한글 text', utf8(page.raw_data)
end