Fix tests

This commit is contained in:
Dawa Ometto
2017-04-12 23:31:47 +02:00
parent df9382bbc3
commit cabe9f353b
11 changed files with 30 additions and 51 deletions
-8
View File
@@ -23,7 +23,6 @@ module Precious
:date_full => v.authored_date,
:files => v.stats.files.map { |f,*rest|
page_path = extract_renamed_path_destination(f)
page_path = remove_page_extentions(page_path)
{ :file => f,
:link => "#{page_path}/#{v.id}"
}
@@ -32,13 +31,6 @@ module Precious
end
end
def remove_page_extentions(page_path)
Gollum::Markup.formats.values.each do |format|
page_path = page_path.gsub(/\.#{format[:regexp]}$/, '')
end
return page_path
end
def extract_renamed_path_destination(file)
return file.gsub(/{.* => (.*)}/, '\1').gsub(/.* => (.*)/, '\1')
end