public
Description: probably a waste of time
Clone URL: git://github.com/claude/git_local.git
Bye bye erb
claude (author)
Sun Apr 27 00:43:24 -0700 2008
commit  ecf2ac3f21305470420e8127753363fa7694b0bd
tree    ea92b5e0ceeb0bf3295e4ed68a2db19a23e38747
parent  7264fac12337121e71d858173ff7defe8cc6cbc2
...
1
2
3
4
5
6
7
 
 
8
9
10
11
12
 
13
14
15
16
 
17
18
19
20
21
 
22
23
24
...
27
28
29
30
 
31
32
33
34
35
 
36
37
38
...
45
46
47
48
 
49
50
51
...
1
2
 
 
 
 
 
3
4
5
6
 
 
 
7
8
9
10
 
11
12
13
14
15
 
16
17
18
19
...
22
23
24
 
25
26
27
28
29
 
30
31
32
33
...
40
41
42
 
43
44
45
46
0
@@ -1,24 +1,19 @@
0
 #!ruby
0
 
0
-require 'rubygems'
0
-require 'syntaxi'
0
-require 'grit'
0
-require 'sinatra'
0
-require 'yaml'
0
+# Required Gems
0
+%w(rubygems syntaxi grit sinatra yaml haml).each {|d| require d}
0
 
0
 Syntaxi::wrap_at_column = 120
0
-
0
-layout 'layout.erb'
0
-
0
+layout 'layout.haml'
0
 get "/" do
0
   load_config
0
   load_repos
0
- erb :index
0
+ haml :index
0
 end
0
 
0
 get "/history/:name" do
0
   @repo = get_repo(params[:name])
0
- erb :history
0
+ haml :history
0
 end
0
 
0
 # TODO: need to figure out how to traverse commits
0
@@ -27,12 +22,12 @@ get "/history/:name/:id" do
0
   commit = repo.commit(params[:id])
0
   diff_text = "[code lang=\"ruby\"]" + repo.diff(commit.parents[0], commit) + "[/code]"
0
   @formatted_text = Syntaxi.new(diff_text).process
0
- erb :diff
0
+ haml :diff
0
 end
0
 
0
 get "/tree/:name" do
0
   @tree = get_repo(params[:name]).tree
0
- erb :tree
0
+ haml :tree
0
 end
0
 
0
 get "/tree/:name/*" do
0
@@ -45,7 +40,7 @@ get "/tree/:name/*" do
0
     @tree = get_repo(params[:name]).tree
0
   end
0
    
0
- erb :tree
0
+ haml :tree
0
 end
0
 
0
 post "/create_repo_path" do
...
8
9
10
 
11
12
13
...
8
9
10
11
12
13
14
0
@@ -8,6 +8,7 @@ h1
0
 
0
 a
0
   :color #324F17
0
+ :text-decoration none
0
   &:hover
0
     :background-color #324f17
0
     :color #E3CF57

Comments

    No one has commented yet.