ghoul 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.gitignore +3 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +39 -0
  4. data/LICENSE +20 -0
  5. data/README.md +46 -0
  6. data/Rakefile +1 -0
  7. data/bin/ghoul +19 -0
  8. data/config.ru +30 -0
  9. data/ghoul.gemspec +51 -0
  10. data/lib/ghoul/app.rb +119 -0
  11. data/lib/ghoul/lib/helpers.rb +64 -0
  12. data/lib/ghoul/lib/repository.rb +41 -0
  13. data/lib/ghoul/lib/url_helpers.rb +53 -0
  14. data/lib/ghoul/public/css/buttons.css +38 -0
  15. data/lib/ghoul/public/css/coderay.css +136 -0
  16. data/lib/ghoul/public/css/github-buttons.css +393 -0
  17. data/lib/ghoul/public/flash/clippy.swf +0 -0
  18. data/lib/ghoul/public/images/bg.png +0 -0
  19. data/lib/ghoul/public/images/big_logo.png +0 -0
  20. data/lib/ghoul/public/images/dir.png +0 -0
  21. data/lib/ghoul/public/images/gh-icons.png +0 -0
  22. data/lib/ghoul/public/images/logo-hover.png +0 -0
  23. data/lib/ghoul/public/images/logo.png +0 -0
  24. data/lib/ghoul/public/images/txt.png +0 -0
  25. data/lib/ghoul/views/404.erb +10 -0
  26. data/lib/ghoul/views/app.sass +316 -0
  27. data/lib/ghoul/views/blob.erb +11 -0
  28. data/lib/ghoul/views/commits.erb +11 -0
  29. data/lib/ghoul/views/diff.erb +16 -0
  30. data/lib/ghoul/views/error.erb +6 -0
  31. data/lib/ghoul/views/layout.erb +25 -0
  32. data/lib/ghoul/views/new_repo.erb +16 -0
  33. data/lib/ghoul/views/no_commits.erb +34 -0
  34. data/lib/ghoul/views/partials/_breadcrumbs.erb +6 -0
  35. data/lib/ghoul/views/partials/_commit.erb +10 -0
  36. data/lib/ghoul/views/partials/_footer.erb +5 -0
  37. data/lib/ghoul/views/partials/_repo_header.erb +17 -0
  38. data/lib/ghoul/views/partials/_repo_top_bar.erb +8 -0
  39. data/lib/ghoul/views/repo_settings.erb +18 -0
  40. data/lib/ghoul/views/repositories.erb +73 -0
  41. data/lib/ghoul/views/setup_repos_path.erb +8 -0
  42. data/lib/ghoul/views/tree.erb +17 -0
  43. data/lib/ghoul.rb +24 -0
  44. data/lib/server.rb +39 -0
  45. data/lib/version.rb +3 -0
  46. data/sample +0 -0
  47. data/spec/ghoul_helpers_spec.rb +62 -0
  48. data/spec/spec_helper.rb +0 -0
  49. data/spec/url_helper_spec.rb +56 -0
  50. metadata +195 -0
@@ -0,0 +1,316 @@
1
+ *
2
+ :padding 0
3
+ :margin 0
4
+
5
+ body
6
+ :font-family "Lucida Grande","Lucida Sans Unicode",Helvetica,sans-serif,Verdana,Arial
7
+ :font-size 13px
8
+ :background url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECAAAgAElEQVR4AV3dC3IdR66E4cNm660taDHamRet94vTH8ifgyAiylUFJBIJVJOyPb5x7z5//vzw8+fP24cPH24/fvy43d3d3Y7juN3f38/5169fN/bw8DBLzPk8z9vv379v//79m/ObN2/mjEvs1atXt79//04u3rdv3w6/OvLlvn79ejDO6rE/f/7c3r17Nxi18X7//n041cbNry6esPLCb604YemhQ767PtXFqYYzDprs8HphNDvLYzhg5PLpk68d1/v37yeHvq9fv97OXRSJgfARpXkLKSLElkY0j0Rz+1HkwlsNX7ym8GpCnE/DjI/hJ8yuaQ3KV39rksunPtNkzaWTD2+5/PUih36GV9/iTA/OtKVVHj1x9cDw6ljFnZtrczgRCRDcawoy4IwPFs7eV0AQn0WEu53IBuPscRJtcITCwuAyXLtcWDtTF5ZGewM2GDVxMbtH4e9D0I/a/Hh8mYzv27dvg4N1F083nxzmnAY56qe3vurZvPTD+OCa7YEQGWsHKhmZVRxZouxwGkAq3zBxWr4wPs1rmkiFq0MUPqsvJD2w6mpeDj9cenA48/U4tNDUo9jVwKW+n0J3Oywfoz1t7nh7QLg0qyNHTX692t3pU5sufeNj/DAHUkGNIvKVCPQaCrqLZY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WAiuCAqShuZ6Kc4WvAF1E8fvXUt8Tk4e6njj/t/DTF3cPTIZcWpo6Hl0uLfMsZL6xYHx0+d2bH1wDpY3L0gru5waTp/tOnT//VVEWRbZF9ocQghGfw7giJKc5HcH/QENOwiYjbXnN2Xx8OpmYxd/k1LM/ZqhG1cNOOw6LBnl9eP2VwfTTxq5Hfjttu4LSoZ4ertwauTkOXozY87NThCAxAjF2is6FZrJgvEAEhCiPC0Y/pgK+/4GH9qMNqui+KEJgE4atZPliL370HNSw1+Q0hfXqx+jHG7Sxv88i16MKrL1zx0OzMX3944enjU9cZb/3zwzG1xZrt/PfR/e5DLklxKyKN1RxMODsyWA9jKZa4GlEYljhCnOXA4eVzzqcu48cpzxfUV9RPWHXh/NjiZT6EtPWlT+D6i1x4yx+IrCHD6h+mfLXLEc8vT++09rH49cmahVz9mcP8f+iUrBiAF9A0H8HMHZkXJsRuESCGCLZBIVdEDr4E8vcwvmomLhe2h2tPdikAAACXSURBVG3o+AxETs3w4TNYNeiQv4eFVxyWyYVlfHpoSPJpcO8Bdi9y3ZmZtO/5mANea/N2Vm/+pyxJmlTQkmDnczZIBZkz06zmFKmRHoRP3MPh0MDzy1614PnVxS8ul/FrnjgamDOcYfEZIj55DF4tmHqhreHh9rDqwjA+vDOEp/7FLD3y45WDG74+1MDfLGipRj73elTvf13dqlysiASNAAAAAElFTkSuQmCC)
9
+
10
+ .container
11
+ :width 810px
12
+ :margin 0 auto
13
+
14
+ .gravatar
15
+ :border 2px solid #f1f1f1
16
+ :float left
17
+ :margin-right 10px
18
+ :width 30px
19
+ :height 30px
20
+
21
+ #page
22
+ :float left
23
+ :width 760px
24
+ :padding 20px
25
+ :background #fff
26
+ :border 5px solid #f1f1f1
27
+ :margin-top 30px
28
+ :border-radius 10px
29
+
30
+ #header
31
+ :float left
32
+ :width 100%
33
+ :margin-top 20px
34
+ a#logo
35
+ :float left
36
+ :width 139px
37
+ :height 60px
38
+ :background url(/images/logo.png)
39
+ :text-indent -9999px
40
+ ul
41
+ :float right
42
+ :width auto
43
+ :margin-top 20px
44
+ :margin-right 20px
45
+ li
46
+ :float right
47
+ :width auto
48
+ :list-style none
49
+ :margin-left 30px
50
+ a
51
+ :color #fff
52
+ :font-size 22px
53
+ :text-decoration none
54
+
55
+ #footer
56
+ :float left
57
+ :width 100%
58
+ :padding 20px 0
59
+ :text-align center
60
+ p
61
+ :margin-top 10px
62
+ :color #666
63
+ a
64
+ :color #777
65
+
66
+ h1
67
+ :float left
68
+ :margin 20px 0
69
+
70
+ #commits
71
+ :float left
72
+ //:margin-top 20px
73
+ .commit
74
+ :float left
75
+ :border 1px solid #ccc
76
+ :padding 5px
77
+ :width 748px
78
+ :background #f6f9fe
79
+ :margin-bottom 20px
80
+ &.indent
81
+ :background #fff
82
+ :width 720px
83
+ :margin-left 28px
84
+ .data
85
+ :width 668px
86
+ .diff a
87
+ :float right
88
+ :color #777
89
+ :text-decoration none
90
+ &:hover
91
+ :text-decoration underline
92
+ .commit_hash
93
+ :font-size 10px
94
+ :float left
95
+ :width 100%
96
+ :margin-top 10px
97
+ .data
98
+ :float left
99
+ :width 696px
100
+ .meta
101
+ :float left
102
+ :width 100%
103
+ :margin-top 3px
104
+ :font-size 12px
105
+ .name
106
+ :float left
107
+ .committed_date
108
+ :float left
109
+ :color #888
110
+ :margin-left 10px
111
+ a.mailto
112
+ :color #888
113
+ :text-decoration none
114
+ &:hover
115
+ :text-decoration underline
116
+ .message
117
+ :font-size 13px
118
+ :font-weight bold
119
+ :float left
120
+ :width 100%
121
+ a
122
+ :color #333
123
+ :text-decoration none
124
+ &:hover
125
+ :text-decoration underline
126
+
127
+ #tree
128
+ :float left
129
+ :width 100%
130
+ :background #fff
131
+ :border-top 1px solid #ccc
132
+ .tree
133
+ .name
134
+ :background url(/images/dir.png) 8px center no-repeat
135
+ .blob
136
+ .name
137
+ :background url(/images/txt.png) 8px center no-repeat
138
+ .blob, .tree
139
+ :float left
140
+ :width 760px
141
+ :padding 10px 0
142
+ :border 1px solid #ccc
143
+ :border-top none
144
+ :text-indent 20px
145
+ :background -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed))
146
+ .name
147
+ :float left
148
+ :padding-left 10px
149
+ a
150
+ :color steelblue
151
+ :text-decoration none
152
+ &:hover
153
+ :text-decoration underline
154
+
155
+ #repo_header
156
+ :float left
157
+ :width 100%
158
+ :margin-bottom 20px
159
+ h2
160
+ :float left
161
+ :width 60%
162
+ :font-size 25px
163
+ #actions
164
+ :float left
165
+ :width 40%
166
+ .button
167
+ :float right
168
+ :margin-left 20px
169
+
170
+ .section_bar
171
+ :float left
172
+ :width 758px
173
+ :border 1px solid #ccc
174
+ :border-bottom none
175
+ :background -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed))
176
+ a, .title
177
+ :color #333
178
+ :text-decoration none
179
+ :float left
180
+ :font-weight bold
181
+ a
182
+ :padding 5px
183
+
184
+ #blob
185
+ :float left
186
+ :width 760px
187
+ :background #f1f1f1
188
+ :overflow auto
189
+
190
+
191
+ #breadcrumbs
192
+ :float left
193
+ :width 100%
194
+ :font-size 18px
195
+ :margin-bottom 20px
196
+ a
197
+ :color #333
198
+
199
+ #repo_info
200
+ :float left
201
+ :width 758px
202
+ :background #f1f1f1
203
+ :border 1px solid #ccc
204
+ :border-bottom none
205
+ #git_url
206
+ :float left
207
+ :padding 3px 5px
208
+ :background #fff
209
+ :border 1px solid #ccc
210
+ :border-radius 4px
211
+ :margin 10px
212
+ :width 600px
213
+ #clippy
214
+ :float left
215
+ :margin-top 8px
216
+
217
+ #repositories
218
+ :float left
219
+ :width 100%
220
+ :font-size 30px
221
+ :border-top 1px solid #ccc
222
+ a
223
+ :text-decoration none
224
+ :color #333
225
+ .repository
226
+ :padding 10px
227
+ :border 1px solid #ccc
228
+ :border-top none
229
+ :float left
230
+ :width 738px
231
+ :background -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(47%,#f6f6f6), color-stop(100%,#ededed))
232
+ .data
233
+ :float left
234
+ :width 100%
235
+ :margin-top 10px
236
+ .message, .new_repo
237
+ :float left
238
+ :margin-top 3px
239
+ :font-size 10px
240
+ :background #fff
241
+ :border 1px solid #ccc
242
+ :padding 4px
243
+ :border-radius 5px
244
+ :font-weight bold
245
+
246
+ #diffs
247
+ .diff
248
+ :float left
249
+ :width 100%
250
+ :overflow none
251
+ :margin-bottom 20px
252
+
253
+ #guide
254
+ :float left
255
+ :width 100%
256
+ code
257
+ :float left
258
+ :background #f6f9fe
259
+ :padding 5px
260
+ :border 1px solid #ccc
261
+ :width 740px
262
+ :margin 10px 0
263
+ :border-radius 5px
264
+ h2
265
+ :margin-top 40px
266
+ :float left
267
+ :width 100%
268
+ p
269
+ :float left
270
+ :margin-top 20px
271
+ :width 100%
272
+ :line-height 22px
273
+ ul
274
+ :float left
275
+ :margin-left 40px
276
+ :width 700px
277
+ :margin-top 10px
278
+ li
279
+ :float left
280
+ :width 100%
281
+ :margin-top 10px
282
+
283
+ form
284
+ :float left
285
+ :width 100%
286
+ :margin-bottom 30px
287
+ input
288
+ :font-size 28px
289
+ :padding 4px
290
+ :width 740px
291
+
292
+ #repo_settings
293
+ :float left
294
+ :border 1px solid #ccc
295
+ :width 738px
296
+ :padding 10px
297
+ p
298
+ :margin-top 20px
299
+ code
300
+ :background #f1f1f1
301
+ :padding 3px
302
+ :float left
303
+ :width 730px
304
+ :margin 20px 0
305
+ :border 1px solid #ccc
306
+ a
307
+ :margin-top 20px
308
+
309
+ #big_link
310
+ :float left
311
+ :width 100%
312
+ :padding 40px 0
313
+ :font-size 26px
314
+
315
+ a
316
+ :color dodgerblue
@@ -0,0 +1,11 @@
1
+ <% title "#{@repository} #{params[:splat][0]}" %>
2
+
3
+ <%=partial(:repo_header) %>
4
+
5
+ <div class="section_bar">
6
+ <%=link_to "Raw", raw_blob_for_commit_path(@repository, params[:commit], params[:splat][0]) %>
7
+ </div>
8
+
9
+ <div id="blob">
10
+ <%=@syntaxer%>
11
+ </div>
@@ -0,0 +1,11 @@
1
+ <% title "Recent commits for #{@repository}" %>
2
+
3
+ <%=partial(:repo_header) %>
4
+
5
+ <div id="commits">
6
+ <% @commits.each do |commit| %>
7
+ <div class="commit indent">
8
+ <%=partial(:commit, :commit => commit) %>
9
+ </div>
10
+ <% end %>
11
+ </div>
@@ -0,0 +1,16 @@
1
+ <% title "diffs on #{@commit}" %>
2
+
3
+ <%=partial(:repo_header) %>
4
+
5
+ <div id="diffs">
6
+ <% @commit.diffs.each do |diff| %>
7
+ <div class="section_bar">
8
+ <div class="title">
9
+ <%=link_to diff.b_path, blob_for_commit_path(@repository, @commit, diff.b_path) %>
10
+ </div>
11
+ <div class="diff">
12
+ <%=CodeRay.scan(diff.diff, :diff, :highlight_code => false, :inline_diff => false).div(:css => :class) %>
13
+ </div>
14
+ </div>
15
+ <% end %>
16
+ </div>
@@ -0,0 +1,6 @@
1
+ <% title "500 error" %>
2
+ <h1>An error occured</h1>
3
+
4
+ <p>Something went wrong and Ghoul couldn't complete your request.</p>
5
+
6
+ <p>If you think you've found a bug please let us know and we will fix it in the next release.</p>
@@ -0,0 +1,25 @@
1
+
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8">
5
+ <title><%= @title %> - Ghoul v<%= Ghoul::VERSION %></title>
6
+ <%= stylesheet_link_tag :app, :coderay, :buttons, :'github-buttons' %>
7
+ </head>
8
+ <body>
9
+ <div class="container">
10
+ <div id="header">
11
+ <a href="<%= url("/") %>" id="logo">Ghoul v<%= Ghoul::VERSION %></a>
12
+ <% if repos_path_exists? %>
13
+ <ul>
14
+ <li><%= link_to "Repositories", repositories_path %></li>
15
+ <li><a href="<%= url("/new_repo") %>" class="thoughtbot_button">New Repo</a></li>
16
+ </ul>
17
+ <% end %>
18
+ </div>
19
+ <div id="page">
20
+ <%= yield %>
21
+ </div>
22
+ <%= partial(:footer) %>
23
+ </div>
24
+ </body>
25
+ </html>
@@ -0,0 +1,16 @@
1
+ <% title "New repository" %>
2
+ <form action="<%=url("/new_repo")%>" method="post">
3
+ <input name="name" placeholder="Repository name"/>
4
+ </form>
5
+
6
+ <div id="guide">
7
+ <h2>Creating A Repository</h2>
8
+
9
+ <p>Please bear in mind when you create a repository that:</p>
10
+
11
+ <p>There is currently no authentication built into Ghoul. This first version is a proof of concept and I hope that something will be able to be built into future versions of this software.</p>
12
+
13
+ <p>If you change ports you will need to change add the remote repository again on your local repository.</p>
14
+
15
+ </div>
16
+
@@ -0,0 +1,34 @@
1
+ <% title "Setting up your repository" %>
2
+
3
+ <div id="guide">
4
+ <h2>Global Setup:</h2>
5
+ <pre><code>
6
+ git config --global user.name "Your Name"
7
+ git config --global user.email author@accountsapp.com
8
+ </code>
9
+ </pre>
10
+
11
+ <h2>Next Steps:</h2>
12
+ <pre><code>
13
+ mkdir <%=@repository%>
14
+ cd <%=@repository%>
15
+ touch README
16
+ git init
17
+ git add README
18
+ git commit -m 'first commit'
19
+ git remote add origin <%=repository_git_url(@repository)%>
20
+ git push -u origin master
21
+ </code>
22
+ </pre>
23
+
24
+ <h2>Existing Repository:</h2>
25
+ <pre><code>
26
+ cd existing_repository
27
+ git remote add origin <%=repository_git_url(@repository)%>
28
+ git push -u origin master
29
+ </code>
30
+ </pre>
31
+
32
+ <p>When you're done, <%= link_to "click here", repository_path(@repository) %></p>
33
+ </div>
34
+
@@ -0,0 +1,6 @@
1
+
2
+ <div id="breadcrumbs">
3
+ <%= link_to "Repositories", repositories_path %>
4
+ /<%= link_to @repository, repository_path(@repository) %>
5
+ /<%= breadcrumbs_from_splat(@repository, params[:commit], params[:splat][0]) %>
6
+ </div>
@@ -0,0 +1,10 @@
1
+ <%= gravatar_image(commit.author.email, 30) %>
2
+
3
+ <div class="data">
4
+ <div class="message"><%= link_to commit.message, tree_for_commit_path(@repository, commit.id) %></div>
5
+ <div class="meta">
6
+ <div class="name"><%= mail_to commit.author.email, commit.author.name %></div>
7
+ <div class="committed_date"><%= date_format commit.committed_date %></div>
8
+ <div class="diff"><%= link_to "diff", diff_for_commit_path(@repository, commit.id) %></div>
9
+ </div>
10
+ </div>
@@ -0,0 +1,5 @@
1
+ <div id='footer'>
2
+ <p>Powered by <%= link_to "Ghoul", "http://github.com/georgedrummond/ghoul" %> v<%=Ghoul::VERSION %></p>
3
+ <p>&copy; <%= link_to "George Drummond", "http://www.georgedrummond.com" %> &amp; <%= link_to "AccountsApp Ltd", "http://accountsapp.com" %> 2011. All rights reserved</p>
4
+ <p>Released under the MIT license</p>
5
+ </div>
@@ -0,0 +1,17 @@
1
+ <%= partial :repo_top_bar %>
2
+
3
+ <div id="repo_info">
4
+ <div id="git_url"><%= repository_git_url(@repository) %></div>
5
+ <div id="clippy"><%= clippy(repository_git_url(@repository), '#f1f1f1') %></div>
6
+ </div>
7
+
8
+ <div id="commits">
9
+ <div class="commit"><%= partial(:commit, :commit => @newest_commit) %></div>
10
+ <% if @commit.id != @newest_commit.id %>
11
+ <div class="indent commit">
12
+ <%= partial(:commit, :commit => @commit) %>
13
+ </div>
14
+ <% end %>
15
+ </div>
16
+
17
+ <%= partial(:breadcrumbs) unless @hide_breadcrumbs %>
@@ -0,0 +1,8 @@
1
+ <div id="repo_header">
2
+ <h2><%=@repository %></h2>
3
+ <div id="actions">
4
+ <a class="button log icon" href="<%=commits_path(@repository)%>">Commits</a>
5
+ <a class="button settings icon" href="<%=repository_settings_path(@repository)%>">Settings</a>
6
+ <a class="button home icon" href="<%=repository_path(@repository)%>">Trunk</a>
7
+ </div>
8
+ </div>
@@ -0,0 +1,18 @@
1
+ <% title "Settings for #{@repository}" %>
2
+
3
+ <%=partial :repo_top_bar %>
4
+
5
+ <div id="repo_settings">
6
+ <h2>About this <%=@repository %> repository</h2>
7
+
8
+ <p>You can clone your repository by running the command <b>git clone <%=clone_url(@repository) %></b>.</p>
9
+
10
+ <p>Please note that <b>Ghoul</b> currently <b>does not use any form of authentication</b>. This will be added in future versions. Until we build in authentication please only use this to host your repositories in a secure environment as <b>anyone can push to your repository</b>.</p>
11
+
12
+ <pre><code>Want to delete this repository? Just delete the folder at <%= repos_path %>/<%= @repository %></code></pre>
13
+ <!--
14
+ <form action="<%= url("/repository/#{@repository}/delete") %>" method="post" style="margin-top:40px">
15
+ <button class="danger button">Delete repository</button>
16
+ </form>
17
+ -->
18
+ </div>
@@ -0,0 +1,73 @@
1
+ <% title "Repositories" %>
2
+
3
+ <% unless @repositories.count == 2 %>
4
+ <h1>Repositories</h1>
5
+ <div id="repositories">
6
+ <% @repositories.each do |repo| %>
7
+ <% unless repo == "." || repo == ".." %>
8
+ <div class="repository">
9
+ <div class="name"><%= link_to repo, repository_path(repo) %></div>
10
+ <div class="data">
11
+ <% begin %>
12
+ <% last_commit = commit_from_repository(repo, "trunk") %>
13
+ <div class="message">
14
+ Last updated by <%= last_commit.author.name %> on <%= date_format(last_commit.committed_date) %>
15
+ </div>
16
+ <% rescue %>
17
+ <div class="message">New repository</div>
18
+ <% end %>
19
+ </div>
20
+ </div>
21
+ <% end %>
22
+ <% end %>
23
+ </div>
24
+ <% else %>
25
+
26
+ <div id="guide">
27
+ <h1>Ghoul - Prettier Git For Everyone :)</h1>
28
+ <p><a href="http://github.com/georgedrummond/ghoul">Ghoul</a> is a simple yet good looking interface for your git repositories written in <a href="http://sinatrarb.com">sinatra</a>. It is currently only for demonstration purposes and use on your secure local machine as it does not enforce any authentication as of yet.</p>
29
+
30
+ <h2>Installation</h2>
31
+ <p>Ghoul can be run either using the ghoul gem or by downloading the git repository and running through the rackup command.</p>
32
+ <pre><code># Installing via rubygems
33
+
34
+ gem install ghoul
35
+ ghoul server</code></pre>
36
+ <pre><code># Installing from the git repository
37
+
38
+ git clone http://github.com/georgedrummond/ghoul
39
+ cd ghoul
40
+ bundle install
41
+ rackup
42
+ </code></pre>
43
+
44
+ <h2>How it works</h2>
45
+ <p>Ghoul uses the grit, written by the guys at github for parsing your repositories which are located in a folder named "repos" within your
46
+ home folder e.g. /Users/georgedrummond/repos. For git push, ghoul uses grack. Grack has no authentication so ghoul should only be used
47
+ on your local machine.</p>
48
+
49
+ <h2>License</h2>
50
+ <pre><code>Copyright (c) 2011 George Drummond, george@accountsapp.com
51
+
52
+ Permission is hereby granted, free of charge, to any person obtaining
53
+ a copy of this software and associated documentation files (the
54
+ "Software"), to deal in the Software without restriction, including
55
+ without limitation the rights to use, copy, modify, merge, publish,
56
+ distribute, sublicense, and/or sell copies of the Software, and to
57
+ permit persons to whom the Software is furnished to do so, subject to
58
+ the following conditions:
59
+
60
+ The above copyright notice and this permission notice shall be
61
+ included in all copies or substantial portions of the Software.
62
+
63
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
64
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
65
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
66
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
67
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
68
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
69
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</code></pre>
70
+ </div>
71
+
72
+ <% end %>
73
+
@@ -0,0 +1,8 @@
1
+ <% title "Please set up the repos path"%>
2
+ <div id="guide">
3
+ <h2>Please Set Up The Repos Path</h2>
4
+ <p>Before you can run <b>Ghoul</b> you must setup the home for your ghoul repositories. This is where we will store our bare repositories and its where you will push to.</p>
5
+ <p>To continue please create an empty folder in <b><%= repos_path %></b></p>
6
+ <pre><code>$ mkdir <%= repos_path %></code></pre>
7
+ <p>When you have done that please <a href="<%= repositories_path %>">click here</a></p>
8
+ </div>
@@ -0,0 +1,17 @@
1
+ <% title "#{@repository} tree" %>
2
+
3
+ <%=partial :repo_header %>
4
+
5
+ <div id="tree">
6
+ <% @resource.contents.sort { |a, b| [b.class.name, a.name.downcase] <=> [a.class.name, b.name.downcase] }.each do |f| %>
7
+ <% if f.is_a?(Grit::Tree) %>
8
+ <div class="tree">
9
+ <div class="name"><%= link_to "#{f.name}/", tree_for_commit_path(@repository, params[:commit], params[:splat][0], f.name) %></div>
10
+ </div>
11
+ <% else %>
12
+ <div class="blob">
13
+ <div class="name"><%= link_to f.name, blob_for_commit_path(@repository, params[:commit], params[:splat][0], f.name) %></div>
14
+ </div>
15
+ <% end %>
16
+ <% end %>
17
+ </div>
data/lib/ghoul.rb ADDED
@@ -0,0 +1,24 @@
1
+
2
+ $:.unshift File.dirname(__FILE__)
3
+
4
+
5
+ require "sinatra"
6
+ require "sass"
7
+ require "georgedrummond_sinatra_helpers"
8
+ require "grit"
9
+ require "coderay"
10
+ require "redcarpet"
11
+ require "time"
12
+ require "erb"
13
+
14
+ def require_all(path)
15
+ glob = File.join(File.dirname(__FILE__), path, '*.rb')
16
+ Dir[glob].each do |f|
17
+ require f
18
+ end
19
+ end
20
+
21
+ require "version"
22
+ require_all "ghoul/lib"
23
+ require "ghoul/app"
24
+