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,393 @@
1
+ /* ------------------------------------------
2
+ CSS3 GITHUB BUTTONS (Nicolas Gallagher)
3
+ Licensed under Unlicense
4
+ http://github.com/necolas/css3-github-buttons
5
+ ------------------------------------------ */
6
+
7
+
8
+ /* ------------------------------------------------------------------------------------------------------------- BUTTON */
9
+
10
+ .button {
11
+ position: relative;
12
+ overflow: visible;
13
+ display: inline-block;
14
+ padding: 0.5em 1em;
15
+ border: 1px solid #d4d4d4;
16
+ margin: 0;
17
+ text-decoration: none;
18
+ text-shadow: 1px 1px 0 #fff;
19
+ font:11px/normal sans-serif;
20
+ color: #333;
21
+ white-space: nowrap;
22
+ cursor: pointer;
23
+ outline: none;
24
+ background-color: #ececec;
25
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f4f4f4), to(#ececec));
26
+ background-image: -moz-linear-gradient(#f4f4f4, #ececec);
27
+ background-image: -o-linear-gradient(#f4f4f4, #ececec);
28
+ background-image: linear-gradient(#f4f4f4, #ececec);
29
+ -webkit-background-clip: padding;
30
+ -moz-background-clip: padding;
31
+ -o-background-clip: padding-box;
32
+ /*background-clip: padding-box;*/ /* commented out due to Opera 11.10 bug */
33
+ -webkit-border-radius: 0.2em;
34
+ -moz-border-radius: 0.2em;
35
+ border-radius: 0.2em;
36
+ /* IE hacks */
37
+ zoom: 1;
38
+ *display: inline;
39
+ }
40
+
41
+ .button:hover,
42
+ .button:focus,
43
+ .button:active,
44
+ .button.active {
45
+ border-color: #3072b3;
46
+ border-bottom-color: #2a65a0;
47
+ text-decoration: none;
48
+ text-shadow: -1px -1px 0 rgba(0,0,0,0.3);
49
+ color: #fff;
50
+ background-color: #3C8DDE;
51
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#599bdc), to(#3072b3));
52
+ background-image: -moz-linear-gradient(#599bdc, #3072b3);
53
+ background-image: -o-linear-gradient(#599bdc, #3072b3);
54
+ background-image: linear-gradient(#599bdc, #3072b3);
55
+ }
56
+
57
+ .button:active,
58
+ .button.active {
59
+ border-color: #2a65a0;
60
+ border-bottom-color: #3884CF;
61
+ background-color: #3072b3;
62
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3072b3), to(#599bdc));
63
+ background-image: -moz-linear-gradient(#3072b3, #599bdc);
64
+ background-image: -o-linear-gradient(#3072b3, #599bdc);
65
+ background-image: linear-gradient(#3072b3, #599bdc);
66
+ }
67
+
68
+ /* overrides extra padding on button elements in Firefox */
69
+ .button::-moz-focus-inner {
70
+ padding: 0;
71
+ border: 0;
72
+ }
73
+
74
+ /* ............................................................................................................. Icons */
75
+
76
+ .button.icon:before {
77
+ content: "";
78
+ position: relative;
79
+ top: 1px;
80
+ float:left;
81
+ width: 12px;
82
+ height: 12px;
83
+ margin: 0 0.75em 0 -0.25em;
84
+ background: url(../images/gh-icons.png) 0 99px no-repeat;
85
+ }
86
+
87
+ .button.arrowup.icon:before { background-position: 0 0; }
88
+ .button.arrowup.icon:hover:before,
89
+ .button.arrowup.icon:focus:before,
90
+ .button.arrowup.icon:active:before { background-position: -12px 0; }
91
+
92
+ .button.arrowdown.icon:before { background-position: 0 -12px; }
93
+ .button.arrowdown.icon:hover:before,
94
+ .button.arrowdown.icon:focus:before,
95
+ .button.arrowdown.icon:active:before { background-position: -12px -12px; }
96
+
97
+ .button.arrowleft.icon:before { background-position: 0 -24px; }
98
+ .button.arrowleft.icon:hover:before,
99
+ .button.arrowleft.icon:focus:before,
100
+ .button.arrowleft.icon:active:before { background-position: -12px -24px; }
101
+
102
+ .button.arrowright.icon:before { float:right; margin: 0 -0.25em 0 0.5em; background-position: 0 -36px; }
103
+ .button.arrowright.icon:hover:before,
104
+ .button.arrowright.icon:focus:before,
105
+ .button.arrowright.icon:active:before { background-position: -12px -36px; }
106
+
107
+ .button.approve.icon:before { background-position: 0 -48px; }
108
+ .button.approve.icon:hover:before,
109
+ .button.approve.icon:focus:before,
110
+ .button.approve.icon:active:before { background-position: -12px -48px; }
111
+
112
+ .button.add.icon:before { background-position: 0 -288px; }
113
+ .button.add.icon:hover:before,
114
+ .button.add.icon:focus:before,
115
+ .button.add.icon:active:before { background-position: -12px -288px; }
116
+
117
+ .button.remove.icon:before { background-position: 0 -60px; }
118
+ .button.remove.icon:hover:before,
119
+ .button.remove.icon:focus:before,
120
+ .button.remove.icon:active:before { background-position: -12px -60px; }
121
+
122
+ .button.log.icon:before { background-position: 0 -72px; }
123
+ .button.log.icon:hover:before,
124
+ .button.log.icon:focus:before,
125
+ .button.log.icon:active:before { background-position: -12px -72px; }
126
+
127
+ .button.calendar.icon:before { background-position: 0 -84px; }
128
+ .button.calendar.icon:hover:before,
129
+ .button.calendar.icon:focus:before,
130
+ .button.calendar.icon:active:before { background-position: -12px -84px; }
131
+
132
+ .button.chat.icon:before { background-position: 0 -96px; }
133
+ .button.chat.icon:hover:before,
134
+ .button.chat.icon:focus:before,
135
+ .button.chat.icon:active:before { background-position: -12px -96px; }
136
+
137
+ .button.clock.icon:before { background-position: 0 -108px; }
138
+ .button.clock.icon:hover:before,
139
+ .button.clock.icon:focus:before,
140
+ .button.clock.icon:active:before { background-position: -12px -108px; }
141
+
142
+ .button.settings.icon:before { background-position: 0 -120px; }
143
+ .button.settings.icon:hover:before,
144
+ .button.settings.icon:focus:before,
145
+ .button.settings.icon:active:before { background-position: -12px -120px; }
146
+
147
+ .button.comment.icon:before { background-position: 0 -132px; }
148
+ .button.comment.icon:hover:before,
149
+ .button.comment.icon:focus:before,
150
+ .button.comment.icon:active:before { background-position: -12px -132px; }
151
+
152
+ .button.fork.icon:before { background-position: 0 -144px; }
153
+ .button.fork.icon:hover:before,
154
+ .button.fork.icon:focus:before,
155
+ .button.fork.icon:active:before { background-position: -12px -144px; }
156
+
157
+ .button.like.icon:before { background-position: 0 -156px; }
158
+ .button.like.icon:hover:before,
159
+ .button.like.icon:focus:before,
160
+ .button.like.icon:active:before { background-position: -12px -156px; }
161
+
162
+ .button.favorite.icon:before { background-position: 0 -348px; }
163
+ .button.favorite.icon:hover:before,
164
+ .button.favorite.icon:focus:before,
165
+ .button.favorite.icon:active:before { background-position: -12px -348px; }
166
+
167
+ .button.home.icon:before { background-position: 0 -168px; }
168
+ .button.home.icon:hover:before,
169
+ .button.home.icon:focus:before,
170
+ .button.home.icon:active:before { background-position: -12px -168px; }
171
+
172
+ .button.key.icon:before { background-position: 0 -180px; }
173
+ .button.key.icon:hover:before,
174
+ .button.key.icon:focus:before,
175
+ .button.key.icon:active:before { background-position: -12px -180px; }
176
+
177
+ .button.lock.icon:before { background-position: 0 -192px; }
178
+ .button.lock.icon:hover:before,
179
+ .button.lock.icon:focus:before,
180
+ .button.lock.icon:active:before { background-position: -12px -192px; }
181
+
182
+ .button.unlock.icon:before { background-position: 0 -204px; }
183
+ .button.unlock.icon:hover:before,
184
+ .button.unlock.icon:focus:before,
185
+ .button.unlock.icon:active:before { background-position: -12px -204px; }
186
+
187
+ .button.loop.icon:before { background-position: 0 -216px; }
188
+ .button.loop.icon:hover:before,
189
+ .button.loop.icon:focus:before,
190
+ .button.loop.icon:active:before { background-position: -12px -216px; }
191
+
192
+ .button.search.icon:before { background-position: 0 -228px; }
193
+ .button.search.icon:hover:before,
194
+ .button.search.icon:focus:before,
195
+ .button.search.icon:active:before { background-position: -12px -228px; }
196
+
197
+ .button.mail.icon:before { background-position: 0 -240px; }
198
+ .button.mail.icon:hover:before,
199
+ .button.mail.icon:focus:before,
200
+ .button.mail.icon:active:before { background-position: -12px -240px; }
201
+
202
+ .button.move.icon:before { background-position: 0 -252px; }
203
+ .button.move.icon:hover:before,
204
+ .button.move.icon:focus:before,
205
+ .button.move.icon:active:before { background-position: -12px -252px; }
206
+
207
+ .button.edit.icon:before { background-position: 0 -264px; }
208
+ .button.edit.icon:hover:before,
209
+ .button.edit.icon:focus:before,
210
+ .button.edit.icon:active:before { background-position: -12px -264px; }
211
+
212
+ .button.pin.icon:before { background-position: 0 -276px; }
213
+ .button.pin.icon:hover:before,
214
+ .button.pin.icon:focus:before,
215
+ .button.pin.icon:active:before { background-position: -12px -276px; }
216
+
217
+ .button.reload.icon:before { background-position: 0 -300px; }
218
+ .button.reload.icon:hover:before,
219
+ .button.reload.icon:focus:before,
220
+ .button.reload.icon:active:before { background-position: -12px -300px; }
221
+
222
+ .button.rss.icon:before { background-position: 0 -312px; }
223
+ .button.rss.icon:hover:before,
224
+ .button.rss.icon:focus:before,
225
+ .button.rss.icon:active:before { background-position: -12px -312px; }
226
+
227
+ .button.tag.icon:before { background-position: 0 -324px; }
228
+ .button.tag.icon:hover:before,
229
+ .button.tag.icon:focus:before,
230
+ .button.tag.icon:active:before { background-position: -12px -324px; }
231
+
232
+ .button.trash.icon:before { background-position: 0 -336px; }
233
+ .button.trash.icon:hover:before,
234
+ .button.trash.icon:focus:before,
235
+ .button.trash.icon:active:before { background-position: -12px -336px; }
236
+
237
+ .button.user.icon:before { background-position: 0 -360px; }
238
+ .button.user.icon:hover:before,
239
+ .button.user.icon:focus:before,
240
+ .button.user.icon:active:before { background-position: -12px -360px; }
241
+
242
+
243
+ /* ------------------------------------------------------------------------------------------------------------- BUTTON EXTENSIONS */
244
+
245
+ /* ............................................................................................................. Primary */
246
+
247
+ .button.primary {
248
+ font-weight: bold;
249
+ }
250
+
251
+ /* ............................................................................................................. Danger */
252
+
253
+ .button.danger {
254
+ color: #900;
255
+ }
256
+
257
+ .button.danger:hover,
258
+ .button.danger:focus,
259
+ .button.danger:active {
260
+ border-color: #b53f3a;
261
+ border-bottom-color: #a0302a;
262
+ color: #fff;
263
+ background-color: #dc5f59;
264
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#dc5f59), to(#b33630));
265
+ background-image: -moz-linear-gradient(#dc5f59, #b33630);
266
+ background-image: -o-linear-gradient(#dc5f59, #b33630);
267
+ background-image: linear-gradient(#dc5f59, #b33630);
268
+ }
269
+
270
+ .button.danger:active,
271
+ .button.danger.active {
272
+ border-color: #a0302a;
273
+ border-bottom-color: #bf4843;
274
+ background-color: #b33630;
275
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#b33630), to(#dc5f59));
276
+ background-image: -moz-linear-gradient(#b33630, #dc5f59);
277
+ background-image: -o-linear-gradient(#b33630, #dc5f59);
278
+ background-image: linear-gradient(#b33630, #dc5f59);
279
+ }
280
+
281
+ /* ............................................................................................................. Pill */
282
+
283
+ .button.pill {
284
+ -webkit-border-radius: 50em;
285
+ -moz-border-radius: 50em;
286
+ border-radius: 50em;
287
+ }
288
+
289
+ /* ............................................................................................................. Disable */
290
+
291
+ .button.disable {
292
+ opacity: 0.5;
293
+ }
294
+
295
+ /* ............................................................................................................. Big */
296
+
297
+ .button.big {
298
+ font-size: 14px;
299
+ }
300
+
301
+ .button.big.icon:before { top: 0; }
302
+
303
+
304
+ /* ------------------------------------------------------------------------------------------------------------- BUTTON GROUPS */
305
+
306
+ /* ............................................................................................................. Standard */
307
+
308
+ .button-group {
309
+ display: inline-block;
310
+ list-style: none;
311
+ padding: 0;
312
+ margin: 0 0 30px 0;
313
+ /* IE hacks */
314
+ zoom: 1;
315
+ *display: inline;
316
+ }
317
+
318
+ .button + .button,
319
+ .button + .button-group,
320
+ .button-group + .button,
321
+ .button-group + .button-group {
322
+ margin-left: 15px;
323
+ }
324
+
325
+ .button-group li {
326
+ float: left;
327
+ padding: 0;
328
+ margin: 0;
329
+ }
330
+
331
+ .button-group .button {
332
+ float: left;
333
+ margin-left: -1px;
334
+ }
335
+
336
+ .button-group > .button:not(:first-child):not(:last-child),
337
+ .button-group li:not(:first-child):not(:last-child) .button {
338
+ -webkit-border-radius: 0;
339
+ -moz-border-radius: 0;
340
+ border-radius: 0;
341
+ }
342
+
343
+ .button-group > .button:first-child,
344
+ .button-group li:first-child .button {
345
+ margin-left: 0;
346
+ -webkit-border-top-right-radius: 0;
347
+ -webkit-border-bottom-right-radius: 0;
348
+ -moz-border-radius-topright: 0;
349
+ -moz-border-radius-bottomright: 0;
350
+ border-top-right-radius: 0;
351
+ border-bottom-right-radius: 0;
352
+ }
353
+
354
+ .button-group > .button:last-child,
355
+ .button-group li:last-child > .button {
356
+ -webkit-border-top-left-radius: 0;
357
+ -webkit-border-bottom-left-radius: 0;
358
+ -moz-border-radius-topleft: 0;
359
+ -moz-border-radius-bottomleft: 0;
360
+ border-top-left-radius: 0;
361
+ border-bottom-left-radius: 0;
362
+ }
363
+
364
+ /* ............................................................................................................. Minor */
365
+
366
+ .button-group.minor-group .button {
367
+ border: 1px solid #d4d4d4;
368
+ text-shadow: none;
369
+ background-image: none;
370
+ background-color: #fff;
371
+ }
372
+
373
+ .button-group.minor-group .button:hover,
374
+ .button-group.minor-group .button:focus {
375
+ background-color: #599bdc;
376
+ }
377
+
378
+ .button-group.minor-group .button:active,
379
+ .button-group.minor-group .button.active {
380
+ background-color: #3072b3;
381
+ }
382
+
383
+ .button-group.minor-group .button.icon:before {
384
+ opacity: 0.8;
385
+ }
386
+
387
+ /* ------------------------------------------------------------------------------------------------------------- BUTTON CONTAINER */
388
+ /* For mixing buttons and button groups, e.g., in a navigation bar */
389
+
390
+ .button-container .button,
391
+ .button-container .button-group {
392
+ vertical-align: top;
393
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,10 @@
1
+ <% title "404 file not found" %>
2
+
3
+ <div id="guide">
4
+ <h2>404 - File Not Found</h2>
5
+
6
+ <p>We could not find the file you were looking for. Did you type in a url incorrectly?</p>
7
+
8
+ <p>If you think you have found a bug please report it on our <%=link_to "github project page", "http://github.com/georgedrummond/ghoul"%></p>
9
+
10
+ </div>