smeagol 0.5.9 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/.ruby +80 -0
  2. data/.yardopts +9 -0
  3. data/HISTORY.md +147 -0
  4. data/LICENSE.txt +30 -0
  5. data/README.md +132 -26
  6. data/bin/smeagol +9 -39
  7. data/bin/smeagol-init +3 -0
  8. data/bin/smeagol-preview +4 -0
  9. data/bin/smeagol-serve +4 -0
  10. data/bin/smeagol-update +4 -0
  11. data/bin/smeagold +1 -4
  12. data/lib/smeagol.rb +77 -6
  13. data/lib/smeagol/app.rb +121 -75
  14. data/lib/smeagol/cache.rb +43 -24
  15. data/lib/smeagol/cli.rb +166 -0
  16. data/lib/smeagol/config.rb +154 -0
  17. data/lib/smeagol/console.rb +369 -0
  18. data/lib/smeagol/controller.rb +275 -0
  19. data/lib/smeagol/core_ext.rb +12 -0
  20. data/lib/smeagol/gollum/blob_entry.rb +17 -0
  21. data/lib/smeagol/gollum/file.rb +44 -0
  22. data/lib/smeagol/gollum/page.rb +47 -0
  23. data/lib/smeagol/gollum/wiki.rb +31 -0
  24. data/lib/smeagol/helpers/rss.rb +96 -0
  25. data/lib/smeagol/helpers/toc.rb +69 -0
  26. data/lib/smeagol/public/assets/smeagol/gollum.css +716 -0
  27. data/lib/smeagol/public/{smeagol → assets/smeagol}/html5.js +0 -0
  28. data/lib/smeagol/public/{smeagol → assets/smeagol}/pygment.css +0 -0
  29. data/lib/smeagol/public/assets/smeagol/template.css +631 -0
  30. data/lib/smeagol/repository.rb +85 -0
  31. data/lib/smeagol/settings.rb +302 -0
  32. data/lib/smeagol/templates/layouts/page.mustache +19 -0
  33. data/lib/smeagol/templates/layouts/versions.mustache +16 -0
  34. data/lib/smeagol/templates/partials/footer.mustache +17 -0
  35. data/lib/smeagol/templates/partials/header.mustache +47 -0
  36. data/lib/smeagol/templates/settings.yml +64 -0
  37. data/lib/smeagol/version.rb +1 -1
  38. data/lib/smeagol/views/base.rb +188 -27
  39. data/lib/smeagol/views/form.rb +56 -0
  40. data/lib/smeagol/views/page.rb +126 -25
  41. data/lib/smeagol/views/post.rb +51 -0
  42. data/lib/smeagol/views/versions.rb +20 -6
  43. data/lib/smeagol/wiki.rb +25 -45
  44. data/test/helper.rb +72 -8
  45. data/test/test_app.rb +57 -0
  46. data/test/test_cache.rb +10 -11
  47. data/test/test_init.rb +27 -0
  48. data/test/test_update.rb +20 -0
  49. data/test/test_wiki.rb +13 -10
  50. metadata +142 -216
  51. data/bin/smeagol-static +0 -115
  52. data/lib/file.rb +0 -10
  53. data/lib/smeagol/hash.rb +0 -13
  54. data/lib/smeagol/option_parser.rb +0 -138
  55. data/lib/smeagol/public/smeagol/main.css +0 -234
  56. data/lib/smeagol/templates/page.mustache +0 -58
  57. data/lib/smeagol/templates/versions.mustache +0 -50
  58. data/test/test_file.rb +0 -12
  59. data/test/test_hash.rb +0 -18
@@ -0,0 +1,631 @@
1
+ /*
2
+ Gollum v3 Template
3
+ */
4
+
5
+ /* margin & padding reset*/
6
+ * {
7
+ margin: 0;
8
+ padding: 0;
9
+ }
10
+
11
+ html, body {
12
+ color: #333;
13
+ }
14
+
15
+ body {
16
+ font: 13.34px helvetica,arial,freesans,clean,sans-serif;
17
+ line-height: 1.4;
18
+ }
19
+
20
+ img {
21
+ border: 0;
22
+ }
23
+
24
+ a {
25
+ color: #4183C4;
26
+ text-decoration: none;
27
+ }
28
+
29
+ a.absent {
30
+ color: #c00;
31
+ }
32
+
33
+ .markdown-body a[id].wiki-toc-anchor {
34
+ color: inherit;
35
+ text-decoration: none;
36
+ }
37
+
38
+ .markdown-body {
39
+ font-size: 14px;
40
+ line-height: 1.6;
41
+ }
42
+ .markdown-body>*:first-child {
43
+ margin-top: 0!important;
44
+ }
45
+ .markdown-body>*:last-child {
46
+ margin-bottom: 0!important;
47
+ }
48
+ .markdown-body a.absent {
49
+ color: #c00;
50
+ }
51
+ .markdown-body a.anchor {
52
+ display: block;
53
+ padding-left: 30px;
54
+ margin-left: -30px;
55
+ cursor: pointer;
56
+ position: absolute;
57
+ top: 0;
58
+ left: 0;
59
+ bottom: 0;
60
+ }
61
+ .markdown-body h1,
62
+ .markdown-body h2,
63
+ .markdown-body h3,
64
+ .markdown-body h4,
65
+ .markdown-body h5,
66
+ .markdown-body h6 {
67
+ margin: 20px 0 10px;
68
+ padding: 0;
69
+ font-weight: bold;
70
+ -webkit-font-smoothing: antialiased;
71
+ cursor: text;
72
+ position: relative;
73
+ }
74
+ .markdown-body h1:hover a.anchor,
75
+ .markdown-body h2:hover a.anchor,
76
+ .markdown-body h3:hover a.anchor,
77
+ .markdown-body h4:hover a.anchor,
78
+ .markdown-body h5:hover a.anchor,
79
+ .markdown-body h6:hover a.anchor {
80
+ background: url('/images/pin-20.png') no-repeat left center;
81
+ text-decoration: none;
82
+ }
83
+ .markdown-body h1 tt,
84
+ .markdown-body h1 code,
85
+ .markdown-body h2 tt,
86
+ .markdown-body h2 code,
87
+ .markdown-body h3 tt,
88
+ .markdown-body h3 code,
89
+ .markdown-body h4 tt,
90
+ .markdown-body h4 code,
91
+ .markdown-body h5 tt,
92
+ .markdown-body h5 code,
93
+ .markdown-body h6 tt,
94
+ .markdown-body h6 code {
95
+ font-size: inherit;
96
+ }
97
+ .markdown-body h1 {
98
+ font-size: 28px;
99
+ color: #000;
100
+ margin-top: 50px;
101
+ margin-bottom: 20px;
102
+ }
103
+ .markdown-body h2 {
104
+ font-size: 24px;
105
+ border-bottom: 1px solid #ccc;
106
+ color: #000;
107
+ margin-top: 40px;
108
+ margin-bottom: 20px;
109
+ }
110
+ .markdown-body h3 {
111
+ font-size: 18px;
112
+ margin-top: 30px;
113
+ margin-bottom: 15px;
114
+ }
115
+ .markdown-body h4 {
116
+ font-size: 16px;
117
+ }
118
+ .markdown-body h5 {
119
+ font-size: 14px;
120
+ }
121
+ .markdown-body h6 {
122
+ color: #777;
123
+ font-size: 14px;
124
+ }
125
+ .markdown-body p,
126
+ .markdown-body blockquote,
127
+ .markdown-body ul,
128
+ .markdown-body ol,
129
+ .markdown-body dl,
130
+ .markdown-body li,
131
+ .markdown-body table,
132
+ .markdown-body pre {
133
+ margin: 15px 0;
134
+ }
135
+ .markdown-body hr {
136
+ background: transparent url('/images/dirty-shade.png') repeat-x 0 0;
137
+ border: 0 none;
138
+ color: #ccc;
139
+ height: 4px;
140
+ padding: 0;
141
+ }
142
+ .markdown-body>h1:first-child,
143
+ .markdown-body>h2:first-child,
144
+ .markdown-body>h3:first-child,
145
+ .markdown-body>h4:first-child,
146
+ .markdown-body>h5:first-child,
147
+ .markdown-body>h6:first-child {
148
+ }
149
+ .markdown-body h1+h2{
150
+ margin-top: 30px;
151
+ }
152
+ .markdown-body h2+h3{
153
+ margin-top: 10px;
154
+ }
155
+ .markdown-body a:first-child h1,
156
+ .markdown-body a:first-child h2,
157
+ .markdown-body a:first-child h3,
158
+ .markdown-body a:first-child h4,
159
+ .markdown-body a:first-child h5,
160
+ .markdown-body a:first-child h6 {
161
+ margin-top: 0;
162
+ padding-top: 0;
163
+ }
164
+ .markdown-body h1+p,
165
+ .markdown-body h2+p,
166
+ .markdown-body h3+p,
167
+ .markdown-body h4+p,
168
+ .markdown-body h5+p,
169
+ .markdown-body h6+p {
170
+ margin-top: 0;
171
+ }
172
+ .markdown-body li p.first {
173
+ display: inline-block;
174
+ }
175
+ .markdown-body ul,
176
+ .markdown-body ol {
177
+ padding-left: 30px;
178
+ }
179
+ .markdown-body ul li>:first-child,
180
+ .markdown-body ol li>:first-child {
181
+ margin-top: 0;
182
+ }
183
+ .markdown-body ul li>:last-child,
184
+ .markdown-body ol li>:last-child {
185
+ margin-bottom: 0;
186
+ }
187
+ .markdown-body dl {
188
+ padding: 0;
189
+ }
190
+ .markdown-body dl dt {
191
+ font-size: 14px;
192
+ font-weight: bold;
193
+ font-style: italic;
194
+ padding: 0;
195
+ margin: 15px 0 5px;
196
+ }
197
+ .markdown-body dl dt:first-child {
198
+ padding: 0;
199
+ }
200
+ .markdown-body dl dt>:first-child {
201
+ margin-top: 0;
202
+ }
203
+ .markdown-body dl dt>:last-child {
204
+ margin-bottom: 0;
205
+ }
206
+ .markdown-body dl dd {
207
+ margin: 0 0 15px;
208
+ padding: 0 15px;
209
+ }
210
+ .markdown-body dl dd>:first-child {
211
+ margin-top: 0;
212
+ }
213
+ .markdown-body dl dd>:last-child {
214
+ margin-bottom: 0;
215
+ }
216
+ .markdown-body blockquote {
217
+ border-left: 4px solid #DDD;
218
+ padding: 0 15px;
219
+ color: #777;
220
+ }
221
+ .markdown-body blockquote>:first-child {
222
+ margin-top: 0;
223
+ }
224
+ .markdown-body blockquote>:last-child {
225
+ margin-bottom: 0;
226
+ }
227
+ .markdown-body table {
228
+ padding: 0;
229
+ }
230
+ .markdown-body table tr {
231
+ border-top: 1px solid #ccc;
232
+ background-color: #fff;
233
+ margin: 0;
234
+ padding: 0;
235
+ }
236
+ .markdown-body table tr:nth-child(2n) {
237
+ background-color: #f8f8f8;
238
+ }
239
+ .markdown-body table tr th {
240
+ font-weight: bold;
241
+ }
242
+ .markdown-body table tr th,
243
+ .markdown-body table tr td {
244
+ border: 1px solid #ccc;
245
+ text-align: left;
246
+ margin: 0;
247
+ padding: 6px 13px;
248
+ }
249
+ .markdown-body table tr th>:first-child,
250
+ .markdown-body table tr td>:first-child {
251
+ margin-top: 0;
252
+ }
253
+ .markdown-body table tr th>:last-child,
254
+ .markdown-body table tr td>:last-child {
255
+ margin-bottom: 0;
256
+ }
257
+ .markdown-body img {
258
+ max-width: 100%;
259
+ }
260
+ .markdown-body span.frame {
261
+ display: block;
262
+ overflow: hidden;
263
+ }
264
+ .markdown-body span.frame>span {
265
+ border: 1px solid #ddd;
266
+ display: block;
267
+ float: left;
268
+ overflow: hidden;
269
+ margin: 13px 0 0;
270
+ padding: 7px;
271
+ width: auto;
272
+ }
273
+ .markdown-body span.frame span img {
274
+ display: block;
275
+ float: left;
276
+ }
277
+ .markdown-body span.frame span span {
278
+ clear: both;
279
+ color: #333;
280
+ display: block;
281
+ padding: 5px 0 0;
282
+ }
283
+ .markdown-body span.align-center {
284
+ display: block;
285
+ overflow: hidden;
286
+ clear: both;
287
+ }
288
+ .markdown-body span.align-center>span {
289
+ display: block;
290
+ overflow: hidden;
291
+ margin: 13px auto 0;
292
+ text-align: center;
293
+ }
294
+ .markdown-body span.align-center span img {
295
+ margin: 0 auto;
296
+ text-align: center;
297
+ }
298
+ .markdown-body span.align-right {
299
+ display: block;
300
+ overflow: hidden;
301
+ clear: both;
302
+ }
303
+ .markdown-body span.align-right>span {
304
+ display: block;
305
+ overflow: hidden;
306
+ margin: 13px 0 0;
307
+ text-align: right;
308
+ }
309
+ .markdown-body span.align-right span img {
310
+ margin: 0;
311
+ text-align: right;
312
+ }
313
+ .markdown-body span.float-left {
314
+ display: block;
315
+ margin-right: 13px;
316
+ overflow: hidden;
317
+ float: left;
318
+ }
319
+ .markdown-body span.float-left span {
320
+ margin: 13px 0 0;
321
+ }
322
+ .markdown-body span.float-right {
323
+ display: block;
324
+ margin-left: 13px;
325
+ overflow: hidden;
326
+ float: right;
327
+ }
328
+ .markdown-body span.float-right>span {
329
+ display: block;
330
+ overflow: hidden;
331
+ margin: 13px auto 0;
332
+ text-align: right;
333
+ }
334
+ .markdown-body code,
335
+ .markdown-body tt {
336
+ margin: 0 2px;
337
+ padding: 0 5px;
338
+ white-space: nowrap;
339
+ border: 1px solid #ddd;
340
+ background-color: #f8f8f8;
341
+ border-radius: 3px;
342
+ }
343
+ .markdown-body pre>tt,
344
+ .markdown-body pre>code {
345
+ margin: 0;
346
+ padding: 0;
347
+ white-space: pre;
348
+ border: none;
349
+ background: transparent;
350
+ }
351
+ .markdown-body pre {
352
+ background-color: #f8f8f8;
353
+ border: 1px solid #ccc;
354
+ font-size: 13px;
355
+ line-height: 19px;
356
+ overflow: auto;
357
+ padding: 6px 10px;
358
+ border-radius: 3px;
359
+ }
360
+ .markdown-body pre pre,
361
+ .markdown-body pre code,
362
+ .markdown-body pre tt {
363
+ background-color: transparent;
364
+ border: none;
365
+ }
366
+ .markdown-body pre pre {
367
+ margin: 0;
368
+ padding: 0;
369
+ }
370
+ .toc {
371
+ background-color: #F7F7F7;
372
+ border: 1px solid #ddd;
373
+ padding: 5px 10px;
374
+ margin: 0;
375
+ border-radius: 3px;
376
+ }
377
+ .toc-title {
378
+ color: #888;
379
+ font-size: 14px;
380
+ line-height: 1.6;
381
+ padding: 2px;
382
+ border-bottom: 1px solid #ddd;
383
+ margin-bottom: 3px;
384
+ }
385
+ .toc ul {
386
+ padding-left: 10px;
387
+ margin: 0;
388
+ }
389
+ .toc>ul {
390
+ margin-left: 10px;
391
+ font-size: 17px;
392
+ }
393
+ .toc ul ul {
394
+ font-size: 15px;
395
+ }
396
+ .toc ul ul ul {
397
+ font-size: 14px;
398
+ }
399
+ .toc ul li{
400
+ margin: 0;
401
+ }
402
+ #header-content .toc,
403
+ #footer-content .toc,
404
+ #sidebar-content .toc {
405
+ border: none;
406
+ }
407
+ .highlight {
408
+ background: #fff;
409
+ }
410
+ .highlight .c {
411
+ color: #998;
412
+ font-style: italic;
413
+ }
414
+ .highlight .err {
415
+ color: #a61717;
416
+ background-color: #e3d2d2;
417
+ }
418
+ .highlight .k {
419
+ font-weight: bold;
420
+ }
421
+ .highlight .o {
422
+ font-weight: bold;
423
+ }
424
+ .highlight .cm {
425
+ color: #998;
426
+ font-style: italic;
427
+ }
428
+ .highlight .cp {
429
+ color: #999;
430
+ font-weight: bold;
431
+ }
432
+ .highlight .c1 {
433
+ color: #998;
434
+ font-style: italic;
435
+ }
436
+ .highlight .cs {
437
+ color: #999;
438
+ font-weight: bold;
439
+ font-style: italic;
440
+ }
441
+ .highlight .gd {
442
+ color: #000;
443
+ background-color: #fdd;
444
+ }
445
+ .highlight .gd .x {
446
+ color: #000;
447
+ background-color: #faa;
448
+ }
449
+ .highlight .ge {
450
+ font-style: italic;
451
+ }
452
+ .highlight .gr {
453
+ color: #a00;
454
+ }
455
+ .highlight .gh {
456
+ color: #999;
457
+ }
458
+ .highlight .gi {
459
+ color: #000;
460
+ background-color: #dfd;
461
+ }
462
+ .highlight .gi .x {
463
+ color: #000;
464
+ background-color: #afa;
465
+ }
466
+ .highlight .go {
467
+ color: #888;
468
+ }
469
+ .highlight .gp {
470
+ color: #555;
471
+ }
472
+ .highlight .gs {
473
+ font-weight: bold;
474
+ }
475
+ .highlight .gu {
476
+ color: #800080;
477
+ font-weight: bold;
478
+ }
479
+ .highlight .gt {
480
+ color: #a00;
481
+ }
482
+ .highlight .kc {
483
+ font-weight: bold;
484
+ }
485
+ .highlight .kd {
486
+ font-weight: bold;
487
+ }
488
+ .highlight .kn {
489
+ font-weight: bold;
490
+ }
491
+ .highlight .kp {
492
+ font-weight: bold;
493
+ }
494
+ .highlight .kr {
495
+ font-weight: bold;
496
+ }
497
+ .highlight .kt {
498
+ color: #458;
499
+ font-weight: bold;
500
+ }
501
+ .highlight .m {
502
+ color: #099;
503
+ }
504
+ .highlight .s {
505
+ color: #d14;
506
+ }
507
+ .highlight .na {
508
+ color: #008080;
509
+ }
510
+ .highlight .nb {
511
+ color: #0086B3;
512
+ }
513
+ .highlight .nc {
514
+ color: #458;
515
+ font-weight: bold;
516
+ }
517
+ .highlight .no {
518
+ color: #008080;
519
+ }
520
+ .highlight .ni {
521
+ color: #800080;
522
+ }
523
+ .highlight .ne {
524
+ color: #900;
525
+ font-weight: bold;
526
+ }
527
+ .highlight .nf {
528
+ color: #900;
529
+ font-weight: bold;
530
+ }
531
+ .highlight .nn {
532
+ color: #555;
533
+ }
534
+ .highlight .nt {
535
+ color: #000080;
536
+ }
537
+ .highlight .nv {
538
+ color: #008080;
539
+ }
540
+ .highlight .ow {
541
+ font-weight: bold;
542
+ }
543
+ .highlight .w {
544
+ color: #bbb;
545
+ }
546
+ .highlight .mf {
547
+ color: #099;
548
+ }
549
+ .highlight .mh {
550
+ color: #099;
551
+ }
552
+ .highlight .mi {
553
+ color: #099;
554
+ }
555
+ .highlight .mo {
556
+ color: #099;
557
+ }
558
+ .highlight .sb {
559
+ color: #d14;
560
+ }
561
+ .highlight .sc {
562
+ color: #d14;
563
+ }
564
+ .highlight .sd {
565
+ color: #d14;
566
+ }
567
+ .highlight .s2 {
568
+ color: #d14;
569
+ }
570
+ .highlight .se {
571
+ color: #d14;
572
+ }
573
+ .highlight .sh {
574
+ color: #d14;
575
+ }
576
+ .highlight .si {
577
+ color: #d14;
578
+ }
579
+ .highlight .sx {
580
+ color: #d14;
581
+ }
582
+ .highlight .sr {
583
+ color: #009926;
584
+ }
585
+ .highlight .s1 {
586
+ color: #d14;
587
+ }
588
+ .highlight .ss {
589
+ color: #990073;
590
+ }
591
+ .highlight .bp {
592
+ color: #999;
593
+ }
594
+ .highlight .vc {
595
+ color: #008080;
596
+ }
597
+ .highlight .vg {
598
+ color: #008080;
599
+ }
600
+ .highlight .vi {
601
+ color: #008080;
602
+ }
603
+ .highlight .il {
604
+ color: #099;
605
+ }
606
+ .highlight .gc {
607
+ color: #999;
608
+ background-color: #EAF2F5;
609
+ }
610
+ .type-csharp .highlight .k {
611
+ color: #00F;
612
+ }
613
+ .type-csharp .highlight .kt {
614
+ color: #00F;
615
+ }
616
+ .type-csharp .highlight .nf {
617
+ color: #000;
618
+ font-weight: normal;
619
+ }
620
+ .type-csharp .highlight .nc {
621
+ color: #2B91AF;
622
+ }
623
+ .type-csharp .highlight .nn {
624
+ color: #000;
625
+ }
626
+ .type-csharp .highlight .s {
627
+ color: #A31515;
628
+ }
629
+ .type-csharp .highlight .sc {
630
+ color: #A31515;
631
+ }