gollum 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of gollum might be problematic. Click here for more details.

Files changed (463) hide show
  1. data/HISTORY.md +3 -0
  2. data/LICENSE +21 -0
  3. data/README.md +435 -0
  4. data/Rakefile +146 -0
  5. data/bin/gollum +41 -0
  6. data/docs/sanitization.md +32 -0
  7. data/gollum.gemspec +506 -0
  8. data/lib/gollum.rb +58 -0
  9. data/lib/gollum/albino.rb +17 -0
  10. data/lib/gollum/file.rb +60 -0
  11. data/lib/gollum/frontend/app.rb +154 -0
  12. data/lib/gollum/frontend/public/css/editbar.css +194 -0
  13. data/lib/gollum/frontend/public/css/gollum.css +55 -0
  14. data/lib/gollum/frontend/public/css/screen.css +726 -0
  15. data/lib/gollum/frontend/public/css/syntax.css +61 -0
  16. data/lib/gollum/frontend/public/images/buttons.png +0 -0
  17. data/lib/gollum/frontend/public/images/editbar-buttons.png +0 -0
  18. data/lib/gollum/frontend/public/images/example.png +0 -0
  19. data/lib/gollum/frontend/public/images/twiddle-down.png +0 -0
  20. data/lib/gollum/frontend/public/images/twiddle-right.png +0 -0
  21. data/lib/gollum/frontend/public/images/txt.png +0 -0
  22. data/lib/gollum/frontend/public/javascript/MathJax/COPYING.txt +202 -0
  23. data/lib/gollum/frontend/public/javascript/MathJax/MathJax.js +1704 -0
  24. data/lib/gollum/frontend/public/javascript/MathJax/README.txt +480 -0
  25. data/lib/gollum/frontend/public/javascript/MathJax/config/MMLorHTML.js +63 -0
  26. data/lib/gollum/frontend/public/javascript/MathJax/config/MathJax.js +351 -0
  27. data/lib/gollum/frontend/public/javascript/MathJax/config/local/local.js +37 -0
  28. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/AMSmath.js +376 -0
  29. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/AMSsymbols.js +385 -0
  30. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/autobold.js +43 -0
  31. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/boldsymbol.js +109 -0
  32. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/mathchoice.js +65 -0
  33. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/newcommand.js +185 -0
  34. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/noErrors.js +169 -0
  35. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/unicode.js +131 -0
  36. data/lib/gollum/frontend/public/javascript/MathJax/extensions/TeX/verb.js +53 -0
  37. data/lib/gollum/frontend/public/javascript/MathJax/extensions/jsMath2jax.js +77 -0
  38. data/lib/gollum/frontend/public/javascript/MathJax/extensions/mml2jax.js +101 -0
  39. data/lib/gollum/frontend/public/javascript/MathJax/extensions/tex2jax.js +242 -0
  40. data/lib/gollum/frontend/public/javascript/MathJax/extensions/toMathML.js +140 -0
  41. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/jax.js +1474 -0
  42. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/Arrows.js +122 -0
  43. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/BasicLatin.js +58 -0
  44. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/CombDiacritMarks.js +35 -0
  45. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/CombDiactForSymbols.js +35 -0
  46. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/Dingbats.js +35 -0
  47. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/GeneralPunctuation.js +40 -0
  48. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/GeometricShapes.js +66 -0
  49. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/GreekAndCoptic.js +35 -0
  50. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/Latin1Supplement.js +37 -0
  51. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/LetterlikeSymbols.js +39 -0
  52. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/MathOperators.js +228 -0
  53. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/MiscMathSymbolsA.js +38 -0
  54. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/MiscMathSymbolsB.js +167 -0
  55. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/MiscTechnical.js +38 -0
  56. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/SpacingModLetters.js +36 -0
  57. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/SuppMathOperators.js +289 -0
  58. data/lib/gollum/frontend/public/javascript/MathJax/jax/element/mml/optable/SupplementalArrowsB.js +162 -0
  59. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/config.js +39 -0
  60. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/a.js +87 -0
  61. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/b.js +114 -0
  62. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/c.js +111 -0
  63. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/d.js +112 -0
  64. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/e.js +88 -0
  65. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/f.js +58 -0
  66. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/fr.js +79 -0
  67. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/g.js +82 -0
  68. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/h.js +52 -0
  69. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/i.js +85 -0
  70. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/j.js +36 -0
  71. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/k.js +36 -0
  72. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/l.js +175 -0
  73. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/m.js +61 -0
  74. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/n.js +219 -0
  75. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/o.js +88 -0
  76. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/opf.js +79 -0
  77. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/p.js +84 -0
  78. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/q.js +34 -0
  79. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/r.js +134 -0
  80. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/s.js +168 -0
  81. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/scr.js +79 -0
  82. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/t.js +82 -0
  83. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/u.js +91 -0
  84. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/v.js +73 -0
  85. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/w.js +35 -0
  86. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/x.js +47 -0
  87. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/y.js +41 -0
  88. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/entities/z.js +39 -0
  89. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/MathML/jax.js +590 -0
  90. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/TeX/config.js +40 -0
  91. data/lib/gollum/frontend/public/javascript/MathJax/jax/input/TeX/jax.js +1652 -0
  92. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/menclose.js +61 -0
  93. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/mglyph.js +98 -0
  94. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/autoload/ms.js +49 -0
  95. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/blank.gif +0 -0
  96. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/config.js +127 -0
  97. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/AlphaPresentForms.js +32 -0
  98. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/Arrows.js +109 -0
  99. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/BoldFraktur.js +79 -0
  100. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/BoxDrawing.js +67 -0
  101. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/CombDiacritMarks.js +98 -0
  102. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/CombDiactForSymbols.js +49 -0
  103. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/ControlPictures.js +28 -0
  104. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/CurrencySymbols.js +31 -0
  105. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/Cyrillic.js +129 -0
  106. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/EnclosedAlphanum.js +89 -0
  107. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/GeneralPunctuation.js +67 -0
  108. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/GeometricShapes.js +33 -0
  109. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/GreekAndCoptic.js +109 -0
  110. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/GreekBold.js +85 -0
  111. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/GreekSSBold.js +85 -0
  112. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/IPAExtensions.js +116 -0
  113. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/Latin1Supplement.js +123 -0
  114. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/LatinExtendedA.js +155 -0
  115. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/LatinExtendedAdditional.js +35 -0
  116. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/LatinExtendedB.js +59 -0
  117. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/LetterlikeSymbols.js +69 -0
  118. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/Main.js +172 -0
  119. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MathBold.js +89 -0
  120. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MathOperators.js +260 -0
  121. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MathSSBold.js +89 -0
  122. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MiscMathSymbolsA.js +31 -0
  123. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MiscMathSymbolsB.js +37 -0
  124. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MiscSymbols.js +30 -0
  125. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/MiscTechnical.js +42 -0
  126. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/NumberForms.js +39 -0
  127. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/PhoneticExtensions.js +30 -0
  128. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/SpacingModLetters.js +87 -0
  129. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/SuperAndSubscripts.js +28 -0
  130. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Bold/SuppMathOperators.js +84 -0
  131. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/AlphaPresentForms.js +32 -0
  132. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/BasicLatin.js +122 -0
  133. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/BoxDrawing.js +67 -0
  134. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/CombDiactForSymbols.js +28 -0
  135. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/ControlPictures.js +28 -0
  136. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/CurrencySymbols.js +31 -0
  137. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/Cyrillic.js +129 -0
  138. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/EnclosedAlphanum.js +89 -0
  139. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/GeneralPunctuation.js +50 -0
  140. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/GreekAndCoptic.js +119 -0
  141. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/GreekBoldItalic.js +85 -0
  142. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/GreekSSBoldItalic.js +85 -0
  143. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/IPAExtensions.js +116 -0
  144. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/Latin1Supplement.js +123 -0
  145. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/LatinExtendedA.js +155 -0
  146. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/LatinExtendedAdditional.js +35 -0
  147. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/LatinExtendedB.js +59 -0
  148. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/LetterlikeSymbols.js +56 -0
  149. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/Main.js +56 -0
  150. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathBoldItalic.js +79 -0
  151. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathBoldScript.js +79 -0
  152. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathOperators.js +29 -0
  153. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/MathSSItalicBold.js +79 -0
  154. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/BoldItalic/SpacingModLetters.js +54 -0
  155. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/AlphaPresentForms.js +32 -0
  156. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/BoxDrawing.js +67 -0
  157. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/CombDiactForSymbols.js +47 -0
  158. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/ControlPictures.js +28 -0
  159. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/CurrencySymbols.js +31 -0
  160. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/Cyrillic.js +129 -0
  161. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/EnclosedAlphanum.js +89 -0
  162. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/GeneralPunctuation.js +50 -0
  163. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/GreekAndCoptic.js +78 -0
  164. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/GreekItalic.js +85 -0
  165. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/IPAExtensions.js +116 -0
  166. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/Latin1Supplement.js +123 -0
  167. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LatinExtendedA.js +154 -0
  168. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LatinExtendedAdditional.js +35 -0
  169. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LatinExtendedB.js +58 -0
  170. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/LetterlikeSymbols.js +56 -0
  171. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/Main.js +192 -0
  172. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathItalic.js +78 -0
  173. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathOperators.js +29 -0
  174. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathSSItalic.js +79 -0
  175. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/MathScript.js +68 -0
  176. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/SpacingModLetters.js +54 -0
  177. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Italic/ij.js +29 -0
  178. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/AlphaPresentForms.js +32 -0
  179. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Arrows.js +106 -0
  180. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BBBold.js +82 -0
  181. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BlockElements.js +35 -0
  182. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BoldFraktur.js +79 -0
  183. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/BoxDrawing.js +72 -0
  184. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CJK.js +29 -0
  185. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CombDiacritMarks.js +86 -0
  186. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CombDiactForSymbols.js +50 -0
  187. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/ControlPictures.js +28 -0
  188. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/CurrencySymbols.js +31 -0
  189. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Cyrillic.js +129 -0
  190. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Dingbats.js +57 -0
  191. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/EnclosedAlphanum.js +89 -0
  192. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Fraktur.js +74 -0
  193. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GeneralPunctuation.js +68 -0
  194. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GeometricShapes.js +118 -0
  195. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekAndCoptic.js +109 -0
  196. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekBold.js +85 -0
  197. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekBoldItalic.js +85 -0
  198. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekItalic.js +85 -0
  199. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekSSBold.js +85 -0
  200. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/GreekSSBoldItalic.js +85 -0
  201. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Hiragana.js +28 -0
  202. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/IPAExtensions.js +118 -0
  203. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Latin1Supplement.js +115 -0
  204. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/LatinExtendedA.js +154 -0
  205. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/LatinExtendedAdditional.js +35 -0
  206. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/LatinExtendedB.js +63 -0
  207. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/LatinExtendedD.js +28 -0
  208. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/LetterlikeSymbols.js +82 -0
  209. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Main.js +380 -0
  210. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathBold.js +89 -0
  211. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathBoldItalic.js +79 -0
  212. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathBoldScript.js +79 -0
  213. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathItalic.js +78 -0
  214. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathOperators.js +207 -0
  215. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathSS.js +89 -0
  216. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathSSBold.js +90 -0
  217. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathSSItalic.js +79 -0
  218. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathSSItalicBold.js +79 -0
  219. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathScript.js +68 -0
  220. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MathTT.js +88 -0
  221. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MiscMathSymbolsA.js +66 -0
  222. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MiscMathSymbolsB.js +154 -0
  223. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MiscSymbols.js +74 -0
  224. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MiscSymbolsAndArrows.js +91 -0
  225. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/MiscTechnical.js +80 -0
  226. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/NumberForms.js +39 -0
  227. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/PhoneticExtensions.js +36 -0
  228. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SpacingModLetters.js +79 -0
  229. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/Specials.js +28 -0
  230. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SuperAndSubscripts.js +28 -0
  231. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SuppMathOperators.js +271 -0
  232. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SupplementalArrowsA.js +35 -0
  233. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SupplementalArrowsB.js +155 -0
  234. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/ij.js +29 -0
  235. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsD/Bold/All.js +55 -0
  236. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsD/Regular/All.js +54 -0
  237. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsD/Regular/Main.js +36 -0
  238. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsSm/Bold/All.js +55 -0
  239. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsSm/Regular/All.js +54 -0
  240. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsSm/Regular/Main.js +36 -0
  241. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUp/Bold/All.js +55 -0
  242. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUp/Regular/All.js +54 -0
  243. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUp/Regular/Main.js +36 -0
  244. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpD/Bold/All.js +55 -0
  245. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpD/Regular/All.js +54 -0
  246. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpD/Regular/Main.js +36 -0
  247. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpSm/Bold/All.js +55 -0
  248. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpSm/Regular/All.js +54 -0
  249. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/IntegralsUpSm/Regular/Main.js +36 -0
  250. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Bold/All.js +29 -0
  251. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Bold/Main.js +35 -0
  252. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Bold/PrivateUse.js +182 -0
  253. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/BoldItalic/All.js +29 -0
  254. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/BoldItalic/Main.js +36 -0
  255. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/BoldItalic/PrivateUse.js +215 -0
  256. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Italic/All.js +29 -0
  257. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Italic/Main.js +60 -0
  258. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Italic/PrivateUse.js +242 -0
  259. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Regular/All.js +29 -0
  260. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Regular/Main.js +57 -0
  261. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/NonUnicode/Regular/PrivateUse.js +387 -0
  262. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeFiveSym/Regular/All.js +51 -0
  263. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeFiveSym/Regular/Main.js +43 -0
  264. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeFourSym/Bold/Main.js +46 -0
  265. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeFourSym/Regular/All.js +63 -0
  266. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeFourSym/Regular/Main.js +62 -0
  267. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeOneSym/Bold/All.js +28 -0
  268. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeOneSym/Bold/Main.js +52 -0
  269. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeOneSym/Regular/All.js +77 -0
  270. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeOneSym/Regular/Main.js +105 -0
  271. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeThreeSym/Bold/Main.js +46 -0
  272. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeThreeSym/Regular/All.js +63 -0
  273. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeThreeSym/Regular/Main.js +62 -0
  274. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeTwoSym/Bold/Main.js +46 -0
  275. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeTwoSym/Regular/All.js +64 -0
  276. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/SizeTwoSym/Regular/Main.js +63 -0
  277. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/Variants/Bold/All.js +60 -0
  278. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/Variants/Bold/Main.js +44 -0
  279. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/Variants/Regular/All.js +120 -0
  280. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/Variants/Regular/Main.js +49 -0
  281. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/fontdata-beta.js +373 -0
  282. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/STIX/fontdata.js +1403 -0
  283. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Arrows.js +65 -0
  284. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BBBold.js +55 -0
  285. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/BoxDrawing.js +33 -0
  286. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/CombDiacritMarks.js +29 -0
  287. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Dingbats.js +29 -0
  288. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/EnclosedAlphanum.js +28 -0
  289. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeneralPunctuation.js +28 -0
  290. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GeometricShapes.js +36 -0
  291. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/GreekAndCoptic.js +29 -0
  292. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Latin1Supplement.js +31 -0
  293. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LatinExtendedA.js +28 -0
  294. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/LetterlikeSymbols.js +34 -0
  295. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/Main.js +51 -0
  296. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MathOperators.js +138 -0
  297. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscMathSymbolsB.js +28 -0
  298. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscSymbols.js +28 -0
  299. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/MiscTechnical.js +29 -0
  300. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/PUA.js +43 -0
  301. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js +29 -0
  302. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SuppMathOperators.js +50 -0
  303. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Bold/Main.js +96 -0
  304. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Caligraphic/Regular/Main.js +95 -0
  305. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/BasicLatin.js +109 -0
  306. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Main.js +36 -0
  307. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/Other.js +30 -0
  308. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Bold/PUA.js +34 -0
  309. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/BasicLatin.js +109 -0
  310. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Main.js +35 -0
  311. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/Other.js +30 -0
  312. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Fraktur/Regular/PUA.js +35 -0
  313. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Greek/Bold/Main.js +43 -0
  314. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Greek/BoldItalic/Main.js +110 -0
  315. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Greek/Italic/Main.js +109 -0
  316. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Greek/Regular/Main.js +42 -0
  317. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Arrows.js +51 -0
  318. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiacritMarks.js +39 -0
  319. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/CombDiactForSymbols.js +28 -0
  320. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeneralPunctuation.js +44 -0
  321. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GeometricShapes.js +32 -0
  322. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/GreekAndCoptic.js +38 -0
  323. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Latin1Supplement.js +36 -0
  324. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedA.js +28 -0
  325. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LatinExtendedB.js +28 -0
  326. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/LetterlikeSymbols.js +33 -0
  327. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/Main.js +161 -0
  328. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MathOperators.js +94 -0
  329. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscMathSymbolsA.js +29 -0
  330. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscSymbols.js +34 -0
  331. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/MiscTechnical.js +33 -0
  332. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SpacingModLetters.js +36 -0
  333. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SuppMathOperators.js +30 -0
  334. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Bold/SupplementalArrowsA.js +34 -0
  335. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/CombDiacritMarks.js +38 -0
  336. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/GeneralPunctuation.js +33 -0
  337. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/GreekAndCoptic.js +38 -0
  338. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Latin1Supplement.js +28 -0
  339. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/LatinExtendedA.js +28 -0
  340. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/LatinExtendedB.js +28 -0
  341. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/LetterlikeSymbols.js +28 -0
  342. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Italic/Main.js +137 -0
  343. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Arrows.js +51 -0
  344. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/CombDiacritMarks.js +39 -0
  345. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/CombDiactForSymbols.js +28 -0
  346. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/GeneralPunctuation.js +38 -0
  347. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/GeometricShapes.js +32 -0
  348. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/GreekAndCoptic.js +38 -0
  349. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Latin1Supplement.js +32 -0
  350. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/LatinExtendedA.js +28 -0
  351. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/LatinExtendedB.js +28 -0
  352. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/LetterlikeSymbols.js +33 -0
  353. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/Main.js +304 -0
  354. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MathOperators.js +94 -0
  355. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscMathSymbolsA.js +31 -0
  356. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscSymbols.js +34 -0
  357. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/MiscTechnical.js +35 -0
  358. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SpacingModLetters.js +28 -0
  359. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SuppMathOperators.js +30 -0
  360. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Main/Regular/SupplementalArrowsA.js +34 -0
  361. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Math/BoldItalic/Main.js +205 -0
  362. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Math/Italic/Main.js +204 -0
  363. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/BasicLatin.js +115 -0
  364. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/CombDiacritMarks.js +38 -0
  365. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Main.js +36 -0
  366. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Bold/Other.js +47 -0
  367. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/BasicLatin.js +115 -0
  368. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/CombDiacritMarks.js +38 -0
  369. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Main.js +36 -0
  370. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Italic/Other.js +47 -0
  371. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/BasicLatin.js +115 -0
  372. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/CombDiacritMarks.js +38 -0
  373. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Main.js +35 -0
  374. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/SansSerif/Regular/Other.js +47 -0
  375. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/BasicLatin.js +54 -0
  376. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Main.js +62 -0
  377. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Script/Regular/Other.js +28 -0
  378. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Size1/Regular/Main.js +74 -0
  379. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Size2/Regular/Main.js +66 -0
  380. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Size3/Regular/Main.js +50 -0
  381. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Size4/Regular/Main.js +77 -0
  382. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/BasicLatin.js +123 -0
  383. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/CombDiacritMarks.js +36 -0
  384. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Main.js +35 -0
  385. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/Typewriter/Regular/Other.js +44 -0
  386. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/WinChrome/Regular/Main.js +43 -0
  387. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/AMS.js +56 -0
  388. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Bold.js +82 -0
  389. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/WinIE6/Regular/Main.js +111 -0
  390. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/fonts/TeX/fontdata.js +1691 -0
  391. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/imageFonts.js +185 -0
  392. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/HTML-CSS/jax.js +1991 -0
  393. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/NativeMML/config.js +51 -0
  394. data/lib/gollum/frontend/public/javascript/MathJax/jax/output/NativeMML/jax.js +230 -0
  395. data/lib/gollum/frontend/public/javascript/MathJax/test/index-images.html +119 -0
  396. data/lib/gollum/frontend/public/javascript/MathJax/test/index.html +127 -0
  397. data/lib/gollum/frontend/public/javascript/MathJax/test/sample.html +99 -0
  398. data/lib/gollum/frontend/public/javascript/gollum.js +244 -0
  399. data/lib/gollum/frontend/public/javascript/jquery-1.4.2.min.js +154 -0
  400. data/lib/gollum/frontend/public/javascript/jquery.previewable_comment_form.js +57 -0
  401. data/lib/gollum/frontend/public/javascript/jquery.tabs.js +59 -0
  402. data/lib/gollum/frontend/public/javascript/jquery.text_selection-1.0.0.min.js +1 -0
  403. data/lib/gollum/frontend/templates/compare.mustache +33 -0
  404. data/lib/gollum/frontend/templates/create.mustache +39 -0
  405. data/lib/gollum/frontend/templates/edit.mustache +38 -0
  406. data/lib/gollum/frontend/templates/editbar.mustache +1196 -0
  407. data/lib/gollum/frontend/templates/history.mustache +37 -0
  408. data/lib/gollum/frontend/templates/layout.mustache +33 -0
  409. data/lib/gollum/frontend/templates/page.mustache +27 -0
  410. data/lib/gollum/frontend/views/compare.rb +90 -0
  411. data/lib/gollum/frontend/views/create.rb +21 -0
  412. data/lib/gollum/frontend/views/edit.rb +13 -0
  413. data/lib/gollum/frontend/views/editable.rb +13 -0
  414. data/lib/gollum/frontend/views/history.rb +44 -0
  415. data/lib/gollum/frontend/views/layout.rb +14 -0
  416. data/lib/gollum/frontend/views/page.rb +38 -0
  417. data/lib/gollum/markup.rb +331 -0
  418. data/lib/gollum/page.rb +354 -0
  419. data/lib/gollum/pagination.rb +61 -0
  420. data/lib/gollum/wiki.rb +335 -0
  421. data/templates/formatting.html +92 -0
  422. data/test/examples/lotr.git/HEAD +1 -0
  423. data/test/examples/lotr.git/config +5 -0
  424. data/test/examples/lotr.git/description +1 -0
  425. data/test/examples/lotr.git/hooks/applypatch-msg.sample +15 -0
  426. data/test/examples/lotr.git/hooks/commit-msg.sample +24 -0
  427. data/test/examples/lotr.git/hooks/post-commit.sample +8 -0
  428. data/test/examples/lotr.git/hooks/post-receive.sample +15 -0
  429. data/test/examples/lotr.git/hooks/post-update.sample +8 -0
  430. data/test/examples/lotr.git/hooks/pre-applypatch.sample +14 -0
  431. data/test/examples/lotr.git/hooks/pre-commit.sample +46 -0
  432. data/test/examples/lotr.git/hooks/pre-rebase.sample +169 -0
  433. data/test/examples/lotr.git/hooks/prepare-commit-msg.sample +36 -0
  434. data/test/examples/lotr.git/hooks/update.sample +128 -0
  435. data/test/examples/lotr.git/info/exclude +6 -0
  436. data/test/examples/lotr.git/info/refs +1 -0
  437. data/test/examples/lotr.git/objects/06/131480411710c92a82fe2d1e76932c70feb2e5 +0 -0
  438. data/test/examples/lotr.git/objects/0a/de1e2916346d4c1f2fb63b863fd3c16808fe44 +0 -0
  439. data/test/examples/lotr.git/objects/0e/d8cbe0a25235bd867e65193c7d837c66b328ef +3 -0
  440. data/test/examples/lotr.git/objects/24/49c2681badfd3c189e8ed658dacffe8ba48fe5 +0 -0
  441. data/test/examples/lotr.git/objects/2c/b9156ad383914561a8502fc70f5a1d887e48ad +4 -0
  442. data/test/examples/lotr.git/objects/5d/cac289a8603188d2c5caf481dcba2985126aaa +0 -0
  443. data/test/examples/lotr.git/objects/60/f12f4254f58801b9ee7db7bca5fa8aeefaa56b +0 -0
  444. data/test/examples/lotr.git/objects/71/4323c104239440a5c66ab12a67ed07a83c404f +0 -0
  445. data/test/examples/lotr.git/objects/93/6b83ee0dd8837adb82511e40d5e4ebe59bb675 +0 -0
  446. data/test/examples/lotr.git/objects/94/523d7ae48aeba575099dd12926420d8fd0425d +2 -0
  447. data/test/examples/lotr.git/objects/96/97dc65e095658bbd1b8e8678e08881e86d32f1 +0 -0
  448. data/test/examples/lotr.git/objects/aa/b61fe89d56f8614c0a8151da34f939dcedfa68 +0 -0
  449. data/test/examples/lotr.git/objects/c3/b43e9f08966b088e7a0192e436b7a884542e05 +0 -0
  450. data/test/examples/lotr.git/objects/dc/596d6b2dd89ab05c66f4abd7d5eb706bc17f19 +0 -0
  451. data/test/examples/lotr.git/objects/ec/da3205bee14520aab5a7bb307392064b938e83 +0 -0
  452. data/test/examples/lotr.git/objects/fa/e7ef5344202bba4129abdc13060d9297d99465 +3 -0
  453. data/test/examples/lotr.git/objects/info/packs +2 -0
  454. data/test/examples/lotr.git/objects/pack/pack-dcbeaf3f6ff6c5eb08ea2b0a2d83626e8763546b.idx +0 -0
  455. data/test/examples/lotr.git/objects/pack/pack-dcbeaf3f6ff6c5eb08ea2b0a2d83626e8763546b.pack +0 -0
  456. data/test/examples/lotr.git/packed-refs +2 -0
  457. data/test/examples/lotr.git/refs/heads/master +1 -0
  458. data/test/helper.rb +38 -0
  459. data/test/test_file.rb +18 -0
  460. data/test/test_markup.rb +348 -0
  461. data/test/test_page.rb +112 -0
  462. data/test/test_wiki.rb +201 -0
  463. metadata +626 -0
@@ -0,0 +1,354 @@
1
+ module Gollum
2
+ class Page
3
+ include Pagination
4
+
5
+ Wiki.page_class = self
6
+
7
+ VALID_PAGE_RE = /^(.+)\.(md|mkdn?|mdown|markdown|textile|rdoc|org|creole|re?st(\.txt)?|asciidoc|pod)$/i
8
+ FORMAT_NAMES = { :markdown => "Markdown",
9
+ :textile => "Textile",
10
+ :rdoc => "RDoc",
11
+ :org => "Org-mode",
12
+ :creole => "Creole",
13
+ :rest => "reStructuredText",
14
+ :asciidoc => "AsciiDoc",
15
+ :pod => "Pod" }
16
+
17
+ # Checks if a filename has a valid extension understood by GitHub::Markup.
18
+ #
19
+ # filename - String filename, like "Home.md".
20
+ #
21
+ # Returns the matching String basename of the file without the extension.
22
+ def self.valid_filename?(filename)
23
+ filename && filename.to_s =~ VALID_PAGE_RE && $1
24
+ end
25
+
26
+ # Checks if a filename has a valid extension understood by GitHub::Markup.
27
+ # Also, checks if the filename has no "_" in the front (such as
28
+ # _Footer.md).
29
+ #
30
+ # filename - String filename, like "Home.md".
31
+ #
32
+ # Returns the matching String basename of the file without the extension.
33
+ def self.valid_page_name?(filename)
34
+ match = valid_filename?(filename)
35
+ filename =~ /^_/ ? false : match
36
+ end
37
+
38
+ # Public: Initialize a page.
39
+ #
40
+ # wiki - The Gollum::Wiki in question.
41
+ #
42
+ # Returns a newly initialized Gollum::Page.
43
+ def initialize(wiki)
44
+ @wiki = wiki
45
+ @blob = nil
46
+ end
47
+
48
+ # Public: The on-disk filename of the page including extension.
49
+ #
50
+ # Returns the String name.
51
+ def filename
52
+ @blob && @blob.name
53
+ end
54
+
55
+ # Public: The canonical page name without extension, and dashes converted
56
+ # to spaces.
57
+ #
58
+ # Returns the String name.
59
+ def name
60
+ filename.split('.')[0..-2].join('.').gsub('-', ' ')
61
+ end
62
+
63
+ # Public: If the first element of a formatted page is an <h1> tag it can
64
+ # be considered the title of the page and used in the display. If the
65
+ # first element is NOT an <h1> tag, the title will be constructed from the
66
+ # filename by stripping the extension and replacing any dashes with
67
+ # spaces.
68
+ #
69
+ # Returns the fully sanitized String title.
70
+ def title
71
+ doc = Nokogiri::HTML(%{<div id="gollum-root">} + self.formatted_data + %{</div>})
72
+
73
+ header =
74
+ case self.format
75
+ when :asciidoc
76
+ doc.css("div#gollum-root > div#header > h1:first-child")
77
+ when :org
78
+ doc.css("div#gollum-root > p.title:first-child")
79
+ when :pod
80
+ doc.css("div#gollum-root > a.dummyTopAnchor:first-child + h1")
81
+ when :rest
82
+ doc.css("div#gollum-root > div > div > h1:first-child")
83
+ else
84
+ doc.css("div#gollum-root > h1:first-child")
85
+ end
86
+
87
+ if !header.empty?
88
+ Sanitize.clean(header.to_html)
89
+ else
90
+ Sanitize.clean(name)
91
+ end
92
+ end
93
+
94
+ # Public: The path of the page within the repo.
95
+ #
96
+ # Returns the String path.
97
+ attr_reader :path
98
+
99
+ # Public: The raw contents of the page.
100
+ #
101
+ # Returns the String data.
102
+ def raw_data
103
+ @blob && @blob.data
104
+ end
105
+
106
+ # Public: The formatted contents of the page.
107
+ #
108
+ # Returns the String data.
109
+ def formatted_data
110
+ @blob && Gollum::Markup.new(self).render
111
+ end
112
+
113
+ # Public: The format of the page.
114
+ #
115
+ # Returns the Symbol format of the page. One of:
116
+ # [ :markdown | :textile | :rdoc | :org | :rest | :asciidoc | :pod |
117
+ # :roff ]
118
+ def format
119
+ case @blob.name
120
+ when /\.(md|mkdn?|mdown|markdown)$/i
121
+ :markdown
122
+ when /\.(textile)$/i
123
+ :textile
124
+ when /\.(rdoc)$/i
125
+ :rdoc
126
+ when /\.(org)$/i
127
+ :org
128
+ when /\.(creole)$/i
129
+ :creole
130
+ when /\.(re?st(\.txt)?)$/i
131
+ :rest
132
+ when /\.(asciidoc)$/i
133
+ :asciidoc
134
+ when /\.(pod)$/i
135
+ :pod
136
+ when /\.(\d)$/i
137
+ :roff
138
+ else
139
+ nil
140
+ end
141
+ end
142
+
143
+ # Public: The current version of the page.
144
+ #
145
+ # Returns the Grit::Commit.
146
+ attr_reader :version
147
+
148
+ # Public: All of the versions that have touched the Page.
149
+ #
150
+ # options - The options Hash:
151
+ # :page - The Integer page number (default: 1).
152
+ # :per_page - The Integer max count of items to return.
153
+ # :follow - Follow's a file across renames, but falls back
154
+ # to a slower Grit native call. (default: false)
155
+ #
156
+ # Returns an Array of Grit::Commit.
157
+ def versions(options = {})
158
+ if options[:follow]
159
+ options[:pretty] = 'raw'
160
+ options.delete :max_count
161
+ options.delete :skip
162
+ log = @wiki.repo.git.native "log", options, "master", "--", @path
163
+ Grit::Commit.list_from_string(@wiki.repo, log)
164
+ else
165
+ @wiki.repo.log('master', @path, log_pagination_options(options))
166
+ end
167
+ end
168
+
169
+ # Public: The footer Page.
170
+ #
171
+ # Returns the footer Page or nil if none exists.
172
+ def footer
173
+ return nil if page_match('_Footer', self.filename)
174
+
175
+ dirs = self.path.split('/')
176
+ dirs.pop
177
+ while !dirs.empty?
178
+ tree = self.version.tree / dirs.join('/')
179
+ if page = find_page_in_this_tree(tree, dirs.join('/'), '_Footer')
180
+ return page
181
+ end
182
+ dirs.pop
183
+ end
184
+
185
+ tree = self.version.tree
186
+ if page = find_page_in_this_tree(tree, '', '_Footer')
187
+ return page
188
+ end
189
+
190
+ return nil
191
+ end
192
+
193
+ #########################################################################
194
+ #
195
+ # Class Methods
196
+ #
197
+ #########################################################################
198
+
199
+ # Convert a human page name into a canonical page name.
200
+ #
201
+ # name - The String human page name.
202
+ #
203
+ # Examples
204
+ #
205
+ # Page.cname("Bilbo Baggins")
206
+ # # => 'Bilbo-Baggins'
207
+ #
208
+ # Returns the String canonical name.
209
+ def self.cname(name)
210
+ name.gsub(%r{[ /<>]}, '-')
211
+ end
212
+
213
+ # Convert a format Symbol into an extension String.
214
+ #
215
+ # format - The format Symbol.
216
+ #
217
+ # Returns the String extension (no leading period).
218
+ def self.format_to_ext(format)
219
+ case format
220
+ when :markdown then 'md'
221
+ when :textile then 'textile'
222
+ when :rdoc then 'rdoc'
223
+ when :org then 'org'
224
+ when :creole then 'creole'
225
+ when :rest then 'rest'
226
+ when :asciidoc then 'asciidoc'
227
+ when :pod then 'pod'
228
+ end
229
+ end
230
+
231
+ #########################################################################
232
+ #
233
+ # Internal Methods
234
+ #
235
+ #########################################################################
236
+
237
+ # The underlying wiki repo.
238
+ #
239
+ # Returns the Gollum::Wiki containing the page.
240
+ attr_reader :wiki
241
+
242
+ # Set the Grit::Commit version of the page.
243
+ #
244
+ # Returns nothing.
245
+ attr_writer :version
246
+
247
+ # Find a page in the given Gollum repo.
248
+ #
249
+ # name - The human or canonical String page name to find.
250
+ # version - The String version ID to find.
251
+ #
252
+ # Returns a Gollum::Page or nil if the page could not be found.
253
+ def find(name, version)
254
+ if commit = @wiki.repo.commit(version)
255
+ if page = find_page_in_tree(commit.tree, name)
256
+ page.version = commit
257
+ page
258
+ end
259
+ end
260
+ end
261
+
262
+ # Find a page in a given tree.
263
+ #
264
+ # tree - The Grit::Tree in which to look.
265
+ # name - The canonical String page name.
266
+ #
267
+ # Returns a Gollum::Page or nil if the page could not be found.
268
+ def find_page_in_tree(tree, name)
269
+ treemap = {}
270
+ trees = [tree]
271
+
272
+ while !trees.empty?
273
+ ptree = trees.shift
274
+ ptree.contents.each do |item|
275
+ case item
276
+ when Grit::Blob
277
+ if page_match(name, item.name)
278
+ return self.class.new(@wiki).populate(item, tree_path(treemap, ptree))
279
+ end
280
+ when Grit::Tree
281
+ treemap[item] = ptree
282
+ trees << item
283
+ end
284
+ end
285
+ end
286
+
287
+ return nil # nothing was found
288
+ end
289
+
290
+ # Find a page in a given tree without recursing into subtrees.
291
+ #
292
+ # tree - The Grit::Tree in which to look.
293
+ # dir - The String path of the given Grit::Tree.
294
+ # name - The canonical String page name.
295
+ #
296
+ # Returns a Gollum::Page or nil if the page could not be found.
297
+ def find_page_in_this_tree(tree, dir, name)
298
+ treemap = {}
299
+ tree.contents.each do |item|
300
+ case item
301
+ when Grit::Blob
302
+ if page_match(name, item.name)
303
+ path = dir == '' ? '' : ::File.join('/', dir)
304
+ page = self.class.new(@wiki).populate(item, path)
305
+ page.version = self.version
306
+ return page
307
+ end
308
+ end
309
+ end
310
+
311
+ return nil # nothing was found
312
+ end
313
+
314
+ # Populate the Page with information from the Blob.
315
+ #
316
+ # blob - The Grit::Blob that contains the info.
317
+ # path - The String directory path of the page file.
318
+ #
319
+ # Returns the populated Gollum::Page.
320
+ def populate(blob, path)
321
+ @blob = blob
322
+ @path = (path + '/' + blob.name)[1..-1]
323
+ self
324
+ end
325
+
326
+ # The full directory path for the given tree.
327
+ #
328
+ # treemap - The Hash treemap containing parentage information.
329
+ # tree - The Grit::Tree for which to compute the path.
330
+ #
331
+ # Returns the String path.
332
+ def tree_path(treemap, tree)
333
+ if ptree = treemap[tree]
334
+ tree_path(treemap, ptree) + '/' + tree.name
335
+ else
336
+ ''
337
+ end
338
+ end
339
+
340
+ # Compare the canonicalized versions of the two names.
341
+ #
342
+ # name - The human or canonical String page name.
343
+ # filename - the String filename on disk (including extension).
344
+ #
345
+ # Returns a Boolean.
346
+ def page_match(name, filename)
347
+ if match = self.class.valid_filename?(filename)
348
+ Page.cname(name).downcase == Page.cname(match).downcase
349
+ else
350
+ false
351
+ end
352
+ end
353
+ end
354
+ end
@@ -0,0 +1,61 @@
1
+ module Gollum
2
+ module Pagination
3
+ def self.included(klass)
4
+ klass.extend ClassMethods
5
+ class << klass
6
+ # Default Integer max count of items to return in git commands.
7
+ attr_accessor :per_page
8
+ end
9
+ klass.per_page = 30
10
+ end
11
+
12
+ module ClassMethods
13
+ # Turns a page number into an offset number for the git skip option.
14
+ #
15
+ # page - Integer page number.
16
+ #
17
+ # Returns an Integer.
18
+ def page_to_skip(page)
19
+ ([1, page.to_i].max - 1) * per_page
20
+ end
21
+
22
+ # Fills in git-specific options for the log command using simple
23
+ # pagination options.
24
+ #
25
+ # options - Hash of options:
26
+ # page - Optional Integer page number (default: 1)
27
+ # per_page - Optional Integer max count of items to return.
28
+ # Defaults to #per_class class method.
29
+ #
30
+ # Returns Hash with :max_count and :skip keys.
31
+ def log_pagination_options(options = {})
32
+ skip = page_to_skip(options.delete(:page))
33
+ options[:max_count] = [options.delete(:per_page).to_i, per_page].max
34
+ options[:skip] = skip if skip > 0
35
+ options
36
+ end
37
+ end
38
+
39
+ # Turns a page number into an offset number for the git skip option.
40
+ #
41
+ # page - Integer page number.
42
+ #
43
+ # Returns an Integer.
44
+ def page_to_skip(page)
45
+ self.class.page_to_skip(page)
46
+ end
47
+
48
+ # Fills in git-specific options for the log command using simple
49
+ # pagination options.
50
+ #
51
+ # options - Hash of options:
52
+ # page - Optional Integer page number (default: 1)
53
+ # per_page - Optional Integer max count of items to return.
54
+ # Defaults to #per_class class method.
55
+ #
56
+ # Returns Hash with :max_count and :skip keys.
57
+ def log_pagination_options(options = {})
58
+ self.class.log_pagination_options(options)
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,335 @@
1
+ module Gollum
2
+ class Wiki
3
+ include Pagination
4
+
5
+ class << self
6
+ # Sets the page class used by all instances of this Wiki.
7
+ attr_writer :page_class
8
+
9
+ # Sets the file class used by all instances of this Wiki.
10
+ attr_writer :file_class
11
+
12
+ # Gets the page class used by all instances of this Wiki.
13
+ # Default: Gollum::Page.
14
+ def page_class
15
+ @page_class ||
16
+ if superclass.respond_to?(:page_class)
17
+ superclass.page_class
18
+ else
19
+ ::Gollum::Page
20
+ end
21
+ end
22
+
23
+ # Gets the file class used by all instances of this Wiki.
24
+ # Default: Gollum::File.
25
+ def file_class
26
+ @file_class ||
27
+ if superclass.respond_to?(:file_class)
28
+ superclass.file_class
29
+ else
30
+ ::Gollum::File
31
+ end
32
+ end
33
+ end
34
+
35
+
36
+ # The String base path to prefix to internal links. For example, when set
37
+ # to "/wiki", the page "Hobbit" will be linked as "/wiki/Hobbit". Defaults
38
+ # to "/".
39
+ attr_reader :base_path
40
+
41
+ # Public: Initialize a new Gollum Repo.
42
+ #
43
+ # repo - The String path to the Git repository that holds the Gollum
44
+ # site.
45
+ # options - Optional Hash:
46
+ # :base_path - String base path for all Wiki links.
47
+ # Default: "/"
48
+ # :page_class - The page Class. Default: Gollum::Page
49
+ # :file_class - The file Class. Default: Gollum::File
50
+ #
51
+ # Returns a fresh Gollum::Repo.
52
+ def initialize(path, options = {})
53
+ @path = path
54
+ @repo = Grit::Repo.new(path)
55
+ @base_path = options[:base_path] || "/"
56
+ @page_class = options[:page_class] || self.class.page_class
57
+ @file_class = options[:file_class] || self.class.file_class
58
+ end
59
+
60
+ # Public: check whether the wiki's git repo exists on the filesystem.
61
+ #
62
+ # Returns true if the repo exists, and false if it does not.
63
+ def exist?
64
+ @repo.git.exist?
65
+ end
66
+
67
+ # Public: Get the formatted page for a given page name.
68
+ #
69
+ # name - The human or canonical String page name of the wiki page.
70
+ # version - The String version ID to find (default: "master").
71
+ #
72
+ # Returns a Gollum::Page or nil if no matching page was found.
73
+ def page(name, version = 'master')
74
+ @page_class.new(self).find(name, version)
75
+ end
76
+
77
+ # Public: Get the static file for a given name.
78
+ #
79
+ # name - The full String pathname to the file.
80
+ # version - The String version ID to find (default: "master").
81
+ #
82
+ # Returns a Gollum::File or nil if no matching file was found.
83
+ def file(name, version = 'master')
84
+ @file_class.new(self).find(name, version)
85
+ end
86
+
87
+ # Public: Create an in-memory Page with the given data and format. This
88
+ # is useful for previewing what content will look like before committing
89
+ # it to the repository.
90
+ #
91
+ # name - The String name of the page.
92
+ # format - The Symbol format of the page.
93
+ # data - The new String contents of the page.
94
+ #
95
+ # Returns the in-memory Gollum::Page.
96
+ def preview_page(name, data, format)
97
+ page = @page_class.new(self)
98
+ ext = @page_class.format_to_ext(format.to_sym)
99
+ path = @page_class.cname(name) + '.' + ext
100
+ blob = OpenStruct.new(:name => path, :data => data)
101
+ page.populate(blob, path)
102
+ page.version = self.repo.commit("HEAD")
103
+ page
104
+ end
105
+
106
+ # Public: Write a new version of a page to the Gollum repo root.
107
+ #
108
+ # name - The String name of the page.
109
+ # format - The Symbol format of the page.
110
+ # data - The new String contents of the page.
111
+ # commit - The commit Hash details:
112
+ # :message - The String commit message.
113
+ # :name - The String author full name.
114
+ # :email - The String email address.
115
+ #
116
+ # Returns the String SHA1 of the newly written version.
117
+ def write_page(name, format, data, commit = {})
118
+ map = {}
119
+ if pcommit = @repo.commit('master')
120
+ map = tree_map(pcommit.tree)
121
+ end
122
+
123
+ map = add_to_tree_map(map, '', name, format, data)
124
+ index = tree_map_to_index(map)
125
+
126
+ parents = pcommit ? [pcommit] : []
127
+ actor = Grit::Actor.new(commit[:name], commit[:email])
128
+ index.commit(commit[:message], parents, actor)
129
+ end
130
+
131
+ # Public: Update an existing page with new content. The location of the
132
+ # page inside the repository will not change. If the given format is
133
+ # different than the current format of the page, the filename will be
134
+ # changed to reflect the new format.
135
+ #
136
+ # page - The Gollum::Page to update.
137
+ # name - The String extension-less name of the page.
138
+ # format - The Symbol format of the page.
139
+ # data - The new String contents of the page.
140
+ # commit - The commit Hash details:
141
+ # :message - The String commit message.
142
+ # :name - The String author full name.
143
+ # :email - The String email address.
144
+ #
145
+ # Returns the String SHA1 of the newly written version.
146
+ def update_page(page, name, format, data, commit = {})
147
+ pcommit = @repo.commit('master')
148
+ map = tree_map(pcommit.tree)
149
+ name ||= page.name
150
+ format ||= page.format
151
+ index = nil
152
+
153
+ if page.name == name && page.format == format
154
+ index = tree_map_to_index(map)
155
+ index.add(page.path, normalize(data))
156
+ else
157
+ map = delete_from_tree_map(map, page.path)
158
+ dir = ::File.dirname(page.path)
159
+ map = add_to_tree_map(map, dir, name, format, data)
160
+ index = tree_map_to_index(map)
161
+ end
162
+
163
+ actor = Grit::Actor.new(commit[:name], commit[:email])
164
+ index.commit(commit[:message], [pcommit], actor)
165
+ end
166
+
167
+ # Public: Delete a page.
168
+ #
169
+ # page - The Gollum::Page to delete.
170
+ # commit - The commit Hash details:
171
+ # :message - The String commit message.
172
+ # :author - The String author full name.
173
+ # :email - The String email address.
174
+ #
175
+ # Returns the String SHA1 of the newly written version.
176
+ def delete_page(page, commit)
177
+ pcommit = @repo.commit('master')
178
+ map = tree_map(pcommit.tree)
179
+
180
+ map = delete_from_tree_map(map, page.path)
181
+ index = tree_map_to_index(map)
182
+
183
+ actor = Grit::Actor.new(commit[:name], commit[:email])
184
+ index.commit(commit[:message], [pcommit], actor)
185
+ end
186
+
187
+ # Public: Lists all pages for this wiki.
188
+ #
189
+ # treeish - The String commit ID or ref to find (default: master)
190
+ #
191
+ # Returns an Array of Gollum::Page instances.
192
+ def pages(treeish = nil)
193
+ treeish ||= 'master'
194
+ if commit = @repo.commit(treeish)
195
+ tree_list(commit)
196
+ else
197
+ []
198
+ end
199
+ end
200
+
201
+ # Public: All of the versions that have touched the Page.
202
+ #
203
+ # options - The options Hash:
204
+ # :page - The Integer page number (default: 1).
205
+ # :per_page - The Integer max count of items to return.
206
+ #
207
+ # Returns an Array of Grit::Commit.
208
+ def log(options = {})
209
+ @repo.log('master', nil, log_pagination_options(options))
210
+ end
211
+
212
+ #########################################################################
213
+ #
214
+ # Internal Methods
215
+ #
216
+ #########################################################################
217
+
218
+ # The Grit::Repo associated with the wiki.
219
+ #
220
+ # Returns the Grit::Repo.
221
+ attr_reader :repo
222
+
223
+ # The String path to the Git repository that holds the Gollum site.
224
+ #
225
+ # Returns the String path.
226
+ attr_reader :path
227
+
228
+ # Normalize the data.
229
+ #
230
+ # data - The String data to be normalized.
231
+ #
232
+ # Returns the normalized data String.
233
+ def normalize(data)
234
+ data.gsub(/\r/, '')
235
+ end
236
+
237
+ # Fill an array with a list of pages.
238
+ #
239
+ # commit - The Grit::Commit
240
+ # tree - The Grit::Tree to start with.
241
+ # sub_tree - Optional String specifying the parent path of the Page.
242
+ #
243
+ # Returns a flat Array of Gollum::Page instances.
244
+ def tree_list(commit, tree = commit.tree, sub_tree = nil)
245
+ list = []
246
+ path = tree.name ? "#{sub_tree}/#{tree.name}" : ''
247
+ tree.contents.each do |item|
248
+ case item
249
+ when Grit::Blob
250
+ if @page_class.valid_page_name?(item.name)
251
+ page = @page_class.new(self).populate(item, path)
252
+ page.version = commit
253
+ list << page
254
+ end
255
+ when Grit::Tree
256
+ list.push *tree_list(commit, item, path)
257
+ end
258
+ end
259
+ list
260
+ end
261
+
262
+ # Fill an index with the existing state of the repository.
263
+ #
264
+ # tree - The Grit::Tree to start with.
265
+ #
266
+ # Returns a nested Hash of filename to content mappings.
267
+ def tree_map(tree)
268
+ map = {}
269
+ tree.contents.each do |item|
270
+ case item
271
+ when Grit::Blob
272
+ map[item.name] = item.data
273
+ when Grit::Tree
274
+ map[item.name] = tree_map(item)
275
+ end
276
+ end
277
+ map
278
+ end
279
+
280
+ # Use a treemap to fill in the index.
281
+ #
282
+ # map - The Hash map:
283
+ # key - The String directory or filename.
284
+ # val - The Hash submap or the String contents of the file.
285
+ # index - The Grit::Index to use. Leave blank when calling from outside
286
+ # this method (default: nil).
287
+ #
288
+ # Returns the Grit::Index.
289
+ def tree_map_to_index(map, prefix = '', index = nil)
290
+ index ||= @repo.index
291
+ map.each do |k, v|
292
+ case k
293
+ when String
294
+ name = [prefix, k].join('/')[1..-1]
295
+ index.add(k, v)
296
+ when Hash
297
+ new_prefix = [prefix, k].join('/')[1..-1]
298
+ tree_map_to_index(v, new_prefix, index)
299
+ end
300
+ end
301
+ index
302
+ end
303
+
304
+ def add_to_tree_map(map, dir, name, format, data)
305
+ ext = @page_class.format_to_ext(format)
306
+ path = @page_class.cname(name) + '.' + ext
307
+
308
+ parts = dir.split('/')
309
+ container = nil
310
+ parts.each do |part|
311
+ container = map[part]
312
+ end
313
+
314
+ (container || map)[path] = normalize(data)
315
+ map
316
+ end
317
+
318
+ # Delete an entry from a tree map.
319
+ #
320
+ # map - The Hash tree map of the repository.
321
+ # path - The String path of the file to delete.
322
+ #
323
+ # Returns the modified Hash tree map.
324
+ def delete_from_tree_map(map, path)
325
+ parts = path.split('/')
326
+ name = parts.pop
327
+ container = nil
328
+ parts.each do |part|
329
+ container = map[part]
330
+ end
331
+ (container || map).delete(name)
332
+ map
333
+ end
334
+ end
335
+ end