public
Fork of sr/git-wiki
Description: A wiki engine that uses a Git repository as its data store.
Homepage: http://atonie.org/2008/02/git-wiki
Clone URL: git://github.com/al3x/git-wiki.git
added tarball download
schacon (author)
Thu Mar 06 16:44:52 -0800 2008
commit  08c0cd93320742399b87a9909ebc5b63fd28f54c
tree    c1798f79b91adc32057dd41283023e5ba3ce5875
parent  7e85fd546e2fd49dbe3a9215e5be7dad32330aee
...
84
85
86
 
 
 
 
 
 
 
87
...
84
85
86
87
88
89
90
91
92
93
94
0
@@ -84,3 +84,10 @@ get '/d/:page.:format/:rev' do
0
   @page = Page.new(page_with_ext)
0
   show :delta, "Diff of #{@page.name}"
0
 end
0
+
0
+get '/a/tarball' do
0
+ header 'Content-Type' => 'application/x-gzip'
0
+ header 'Content-Disposition' => 'filename=archive.tgz'
0
+ archive = $repo.archive('HEAD', nil, :format => 'tgz', :prefix => 'wiki/')
0
+ File.open(archive).read
0
+end
0
\ No newline at end of file
...
11
12
13
 
14
15
16
...
11
12
13
14
15
16
17
0
@@ -11,6 +11,7 @@
0
       <ul class="nav_list" id="top_nav">
0
         <li><a href="/" class="nav_link">home</a></li>
0
         <li><a href="/_list" class="nav_link">pages</a></li>
0
+ <li><a href="/a/tarball" class="nav_link">tarball</a></li>
0
       </ul>
0
       <%= yield %>
0
       <div id="footer">

Comments

    No one has commented yet.