./lib/dolt/sinatra/multi_repo_browser.rb in dolt-0.3.1 vs ./lib/dolt/sinatra/multi_repo_browser.rb in dolt-0.4.0
- old
+ new
@@ -66,11 +66,25 @@
aget "/*/blame/*" do
force_ref(params[:splat], "blame", "master")
end
+ aget "/*/history/*:*" do
+ repo, ref, path = params[:splat]
+ history(repo, ref, path, (params[:commit_count] || 20).to_i)
+ end
+
+ aget "/*/history/*" do
+ force_ref(params[:splat], "history", "master")
+ end
+
aget "/*/refs" do
refs(params[:splat].first)
+ end
+
+ aget "/*/tree_history/*:*" do
+ repo, ref, path = params[:splat]
+ tree_history(repo, ref, path)
end
private
def force_ref(args, action, ref)
redirect(args.shift + "/#{action}/#{ref}:" + args.join)