Implement simple history.

This commit is contained in:
Tom Preston-Werner
2010-08-02 18:15:41 -06:00
parent 17278fcf09
commit e4fa888c38
7 changed files with 148 additions and 19 deletions
+7
View File
@@ -78,6 +78,13 @@ module Precious
wiki.preview_page("Preview", data, format).formatted_data
end
get '/history/:name' do
@name = params[:name]
wiki = Gollum::Wiki.new($path)
@page = wiki.page(@name)
mustache :history
end
get %r{/(.+?)/([0-9a-f]{40})} do
name = params[:captures][0]
wiki = Gollum::Wiki.new($path)