poly-cms 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (460) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +10 -0
  3. data/Gemfile +27 -0
  4. data/Gemfile.lock +95 -0
  5. data/README.md +3 -0
  6. data/Rakefile +45 -0
  7. data/bin/poly +88 -0
  8. data/config.ru +3 -0
  9. data/core/admin/assets/images/icons/cache-clear.svg +11 -0
  10. data/core/admin/assets/images/icons/delete-dark.svg +10 -0
  11. data/core/admin/assets/images/icons/delete.svg +10 -0
  12. data/core/admin/assets/images/icons/handle.svg +12 -0
  13. data/core/admin/assets/images/icons/logout.svg +13 -0
  14. data/core/admin/assets/images/icons/move.svg +10 -0
  15. data/core/admin/assets/images/icons/new.svg +9 -0
  16. data/core/admin/assets/images/icons/prompt.svg +11 -0
  17. data/core/admin/assets/images/icons/refresh.svg +40 -0
  18. data/core/admin/assets/images/icons/save.svg +7 -0
  19. data/core/admin/assets/images/poly-small-boxed.svg +51 -0
  20. data/core/admin/assets/images/poly-small.svg +52 -0
  21. data/core/admin/assets/images/poly.svg +36 -0
  22. data/core/admin/assets/js/app/file-ext.js +15 -0
  23. data/core/admin/assets/js/app/views/editor.js +300 -0
  24. data/core/admin/assets/js/app/views/git.js +65 -0
  25. data/core/admin/assets/js/app/views/main.js +59 -0
  26. data/core/admin/assets/js/main.js +44 -0
  27. data/core/admin/assets/js/routes.js +25 -0
  28. data/core/admin/assets/js/vendor/backbone.js +4 -0
  29. data/core/admin/assets/js/vendor/codemirror/.gitattributes +8 -0
  30. data/core/admin/assets/js/vendor/codemirror/.gitignore +6 -0
  31. data/core/admin/assets/js/vendor/codemirror/.travis.yml +3 -0
  32. data/core/admin/assets/js/vendor/codemirror/addon/comment/comment.js +145 -0
  33. data/core/admin/assets/js/vendor/codemirror/addon/comment/continuecomment.js +54 -0
  34. data/core/admin/assets/js/vendor/codemirror/addon/dialog/dialog.css +32 -0
  35. data/core/admin/assets/js/vendor/codemirror/addon/dialog/dialog.js +80 -0
  36. data/core/admin/assets/js/vendor/codemirror/addon/display/fullscreen.css +6 -0
  37. data/core/admin/assets/js/vendor/codemirror/addon/display/fullscreen.js +30 -0
  38. data/core/admin/assets/js/vendor/codemirror/addon/display/placeholder.js +54 -0
  39. data/core/admin/assets/js/vendor/codemirror/addon/edit/closebrackets.js +82 -0
  40. data/core/admin/assets/js/vendor/codemirror/addon/edit/closetag.js +87 -0
  41. data/core/admin/assets/js/vendor/codemirror/addon/edit/continuelist.js +25 -0
  42. data/core/admin/assets/js/vendor/codemirror/addon/edit/matchbrackets.js +86 -0
  43. data/core/admin/assets/js/vendor/codemirror/addon/edit/matchtags.js +56 -0
  44. data/core/admin/assets/js/vendor/codemirror/addon/edit/trailingspace.js +15 -0
  45. data/core/admin/assets/js/vendor/codemirror/addon/fold/brace-fold.js +93 -0
  46. data/core/admin/assets/js/vendor/codemirror/addon/fold/comment-fold.js +40 -0
  47. data/core/admin/assets/js/vendor/codemirror/addon/fold/foldcode.js +75 -0
  48. data/core/admin/assets/js/vendor/codemirror/addon/fold/foldgutter.css +21 -0
  49. data/core/admin/assets/js/vendor/codemirror/addon/fold/foldgutter.js +124 -0
  50. data/core/admin/assets/js/vendor/codemirror/addon/fold/indent-fold.js +26 -0
  51. data/core/admin/assets/js/vendor/codemirror/addon/fold/xml-fold.js +167 -0
  52. data/core/admin/assets/js/vendor/codemirror/addon/hint/anyword-hint.js +34 -0
  53. data/core/admin/assets/js/vendor/codemirror/addon/hint/css-hint.js +50 -0
  54. data/core/admin/assets/js/vendor/codemirror/addon/hint/html-hint.js +337 -0
  55. data/core/admin/assets/js/vendor/codemirror/addon/hint/javascript-hint.js +130 -0
  56. data/core/admin/assets/js/vendor/codemirror/addon/hint/pig-hint.js +121 -0
  57. data/core/admin/assets/js/vendor/codemirror/addon/hint/python-hint.js +95 -0
  58. data/core/admin/assets/js/vendor/codemirror/addon/hint/show-hint.css +38 -0
  59. data/core/admin/assets/js/vendor/codemirror/addon/hint/show-hint.js +274 -0
  60. data/core/admin/assets/js/vendor/codemirror/addon/hint/sql-hint.js +105 -0
  61. data/core/admin/assets/js/vendor/codemirror/addon/hint/xml-hint.js +69 -0
  62. data/core/admin/assets/js/vendor/codemirror/addon/lint/coffeescript-lint.js +27 -0
  63. data/core/admin/assets/js/vendor/codemirror/addon/lint/css-lint.js +19 -0
  64. data/core/admin/assets/js/vendor/codemirror/addon/lint/javascript-lint.js +126 -0
  65. data/core/admin/assets/js/vendor/codemirror/addon/lint/json-lint.js +17 -0
  66. data/core/admin/assets/js/vendor/codemirror/addon/lint/lint.css +73 -0
  67. data/core/admin/assets/js/vendor/codemirror/addon/lint/lint.js +203 -0
  68. data/core/admin/assets/js/vendor/codemirror/addon/merge/dep/diff_match_patch.js +50 -0
  69. data/core/admin/assets/js/vendor/codemirror/addon/merge/merge.css +92 -0
  70. data/core/admin/assets/js/vendor/codemirror/addon/merge/merge.js +474 -0
  71. data/core/admin/assets/js/vendor/codemirror/addon/mode/loadmode.js +51 -0
  72. data/core/admin/assets/js/vendor/codemirror/addon/mode/multiplex.js +101 -0
  73. data/core/admin/assets/js/vendor/codemirror/addon/mode/multiplex_test.js +30 -0
  74. data/core/admin/assets/js/vendor/codemirror/addon/mode/overlay.js +59 -0
  75. data/core/admin/assets/js/vendor/codemirror/addon/runmode/colorize.js +29 -0
  76. data/core/admin/assets/js/vendor/codemirror/addon/runmode/runmode-standalone.js +136 -0
  77. data/core/admin/assets/js/vendor/codemirror/addon/runmode/runmode.js +56 -0
  78. data/core/admin/assets/js/vendor/codemirror/addon/runmode/runmode.node.js +103 -0
  79. data/core/admin/assets/js/vendor/codemirror/addon/scroll/scrollpastend.js +34 -0
  80. data/core/admin/assets/js/vendor/codemirror/addon/search/match-highlighter.js +91 -0
  81. data/core/admin/assets/js/vendor/codemirror/addon/search/search.js +133 -0
  82. data/core/admin/assets/js/vendor/codemirror/addon/search/searchcursor.js +143 -0
  83. data/core/admin/assets/js/vendor/codemirror/addon/selection/active-line.js +39 -0
  84. data/core/admin/assets/js/vendor/codemirror/addon/selection/mark-selection.js +108 -0
  85. data/core/admin/assets/js/vendor/codemirror/addon/tern/tern.css +85 -0
  86. data/core/admin/assets/js/vendor/codemirror/addon/tern/tern.js +632 -0
  87. data/core/admin/assets/js/vendor/codemirror/addon/tern/worker.js +41 -0
  88. data/core/admin/assets/js/vendor/codemirror/addon/wrap/hardwrap.js +99 -0
  89. data/core/admin/assets/js/vendor/codemirror/bin/authors.sh +6 -0
  90. data/core/admin/assets/js/vendor/codemirror/bin/compress +92 -0
  91. data/core/admin/assets/js/vendor/codemirror/bin/lint +16 -0
  92. data/core/admin/assets/js/vendor/codemirror/bin/source-highlight +61 -0
  93. data/core/admin/assets/js/vendor/codemirror/bower.json +15 -0
  94. data/core/admin/assets/js/vendor/codemirror/demo/activeline.html +78 -0
  95. data/core/admin/assets/js/vendor/codemirror/demo/anywordhint.html +79 -0
  96. data/core/admin/assets/js/vendor/codemirror/demo/bidi.html +74 -0
  97. data/core/admin/assets/js/vendor/codemirror/demo/btree.html +86 -0
  98. data/core/admin/assets/js/vendor/codemirror/demo/buffers.html +109 -0
  99. data/core/admin/assets/js/vendor/codemirror/demo/changemode.html +59 -0
  100. data/core/admin/assets/js/vendor/codemirror/demo/closebrackets.html +63 -0
  101. data/core/admin/assets/js/vendor/codemirror/demo/closetag.html +40 -0
  102. data/core/admin/assets/js/vendor/codemirror/demo/complete.html +80 -0
  103. data/core/admin/assets/js/vendor/codemirror/demo/emacs.html +75 -0
  104. data/core/admin/assets/js/vendor/codemirror/demo/folding.html +75 -0
  105. data/core/admin/assets/js/vendor/codemirror/demo/fullscreen.html +130 -0
  106. data/core/admin/assets/js/vendor/codemirror/demo/hardwrap.html +69 -0
  107. data/core/admin/assets/js/vendor/codemirror/demo/html5complete.html +54 -0
  108. data/core/admin/assets/js/vendor/codemirror/demo/indentwrap.html +58 -0
  109. data/core/admin/assets/js/vendor/codemirror/demo/lint.html +171 -0
  110. data/core/admin/assets/js/vendor/codemirror/demo/loadmode.html +49 -0
  111. data/core/admin/assets/js/vendor/codemirror/demo/marker.html +52 -0
  112. data/core/admin/assets/js/vendor/codemirror/demo/markselection.html +45 -0
  113. data/core/admin/assets/js/vendor/codemirror/demo/matchhighlighter.html +47 -0
  114. data/core/admin/assets/js/vendor/codemirror/demo/matchtags.html +49 -0
  115. data/core/admin/assets/js/vendor/codemirror/demo/merge.html +82 -0
  116. data/core/admin/assets/js/vendor/codemirror/demo/multiplex.html +75 -0
  117. data/core/admin/assets/js/vendor/codemirror/demo/mustache.html +68 -0
  118. data/core/admin/assets/js/vendor/codemirror/demo/placeholder.html +45 -0
  119. data/core/admin/assets/js/vendor/codemirror/demo/preview.html +88 -0
  120. data/core/admin/assets/js/vendor/codemirror/demo/resize.html +58 -0
  121. data/core/admin/assets/js/vendor/codemirror/demo/runmode.html +62 -0
  122. data/core/admin/assets/js/vendor/codemirror/demo/search.html +94 -0
  123. data/core/admin/assets/js/vendor/codemirror/demo/spanaffectswrapping_shim.html +85 -0
  124. data/core/admin/assets/js/vendor/codemirror/demo/tern.html +128 -0
  125. data/core/admin/assets/js/vendor/codemirror/demo/theme.html +121 -0
  126. data/core/admin/assets/js/vendor/codemirror/demo/trailingspace.html +48 -0
  127. data/core/admin/assets/js/vendor/codemirror/demo/variableheight.html +61 -0
  128. data/core/admin/assets/js/vendor/codemirror/demo/vim.html +74 -0
  129. data/core/admin/assets/js/vendor/codemirror/demo/visibletabs.html +62 -0
  130. data/core/admin/assets/js/vendor/codemirror/demo/widget.html +85 -0
  131. data/core/admin/assets/js/vendor/codemirror/demo/xmlcomplete.html +116 -0
  132. data/core/admin/assets/js/vendor/codemirror/doc/activebookmark.js +42 -0
  133. data/core/admin/assets/js/vendor/codemirror/doc/compress.html +231 -0
  134. data/core/admin/assets/js/vendor/codemirror/doc/docs.css +226 -0
  135. data/core/admin/assets/js/vendor/codemirror/doc/internals.html +503 -0
  136. data/core/admin/assets/js/vendor/codemirror/doc/logo.png +0 -0
  137. data/core/admin/assets/js/vendor/codemirror/doc/logo.svg +147 -0
  138. data/core/admin/assets/js/vendor/codemirror/doc/manual.html +2512 -0
  139. data/core/admin/assets/js/vendor/codemirror/doc/realworld.html +134 -0
  140. data/core/admin/assets/js/vendor/codemirror/doc/releases.html +779 -0
  141. data/core/admin/assets/js/vendor/codemirror/doc/reporting.html +61 -0
  142. data/core/admin/assets/js/vendor/codemirror/doc/upgrade_v2.2.html +96 -0
  143. data/core/admin/assets/js/vendor/codemirror/doc/upgrade_v3.html +230 -0
  144. data/core/admin/assets/js/vendor/codemirror/index.html +192 -0
  145. data/core/admin/assets/js/vendor/codemirror/keymap/emacs.js +387 -0
  146. data/core/admin/assets/js/vendor/codemirror/keymap/extra.js +43 -0
  147. data/core/admin/assets/js/vendor/codemirror/keymap/vim.js +3704 -0
  148. data/core/admin/assets/js/vendor/codemirror/lib/codemirror.css +263 -0
  149. data/core/admin/assets/js/vendor/codemirror/lib/codemirror.js +5910 -0
  150. data/core/admin/assets/js/vendor/codemirror/mode/apl/apl.js +160 -0
  151. data/core/admin/assets/js/vendor/codemirror/mode/apl/index.html +72 -0
  152. data/core/admin/assets/js/vendor/codemirror/mode/asterisk/asterisk.js +183 -0
  153. data/core/admin/assets/js/vendor/codemirror/mode/asterisk/index.html +154 -0
  154. data/core/admin/assets/js/vendor/codemirror/mode/clike/clike.js +362 -0
  155. data/core/admin/assets/js/vendor/codemirror/mode/clike/index.html +195 -0
  156. data/core/admin/assets/js/vendor/codemirror/mode/clike/scala.html +767 -0
  157. data/core/admin/assets/js/vendor/codemirror/mode/clojure/clojure.js +224 -0
  158. data/core/admin/assets/js/vendor/codemirror/mode/clojure/index.html +88 -0
  159. data/core/admin/assets/js/vendor/codemirror/mode/cobol/cobol.js +240 -0
  160. data/core/admin/assets/js/vendor/codemirror/mode/cobol/index.html +210 -0
  161. data/core/admin/assets/js/vendor/codemirror/mode/coffeescript/coffeescript.js +349 -0
  162. data/core/admin/assets/js/vendor/codemirror/mode/coffeescript/index.html +740 -0
  163. data/core/admin/assets/js/vendor/codemirror/mode/commonlisp/commonlisp.js +105 -0
  164. data/core/admin/assets/js/vendor/codemirror/mode/commonlisp/index.html +177 -0
  165. data/core/admin/assets/js/vendor/codemirror/mode/css/css.js +639 -0
  166. data/core/admin/assets/js/vendor/codemirror/mode/css/index.html +70 -0
  167. data/core/admin/assets/js/vendor/codemirror/mode/css/scss.html +157 -0
  168. data/core/admin/assets/js/vendor/codemirror/mode/css/scss_test.js +84 -0
  169. data/core/admin/assets/js/vendor/codemirror/mode/css/test.js +130 -0
  170. data/core/admin/assets/js/vendor/codemirror/mode/d/d.js +205 -0
  171. data/core/admin/assets/js/vendor/codemirror/mode/d/index.html +273 -0
  172. data/core/admin/assets/js/vendor/codemirror/mode/diff/diff.js +32 -0
  173. data/core/admin/assets/js/vendor/codemirror/mode/diff/index.html +117 -0
  174. data/core/admin/assets/js/vendor/codemirror/mode/dtd/dtd.js +127 -0
  175. data/core/admin/assets/js/vendor/codemirror/mode/dtd/index.html +89 -0
  176. data/core/admin/assets/js/vendor/codemirror/mode/ecl/ecl.js +192 -0
  177. data/core/admin/assets/js/vendor/codemirror/mode/ecl/index.html +52 -0
  178. data/core/admin/assets/js/vendor/codemirror/mode/eiffel/eiffel.js +147 -0
  179. data/core/admin/assets/js/vendor/codemirror/mode/eiffel/index.html +430 -0
  180. data/core/admin/assets/js/vendor/codemirror/mode/erlang/erlang.js +484 -0
  181. data/core/admin/assets/js/vendor/codemirror/mode/erlang/index.html +75 -0
  182. data/core/admin/assets/js/vendor/codemirror/mode/fortran/fortran.js +173 -0
  183. data/core/admin/assets/js/vendor/codemirror/mode/fortran/index.html +81 -0
  184. data/core/admin/assets/js/vendor/codemirror/mode/gas/gas.js +330 -0
  185. data/core/admin/assets/js/vendor/codemirror/mode/gas/index.html +68 -0
  186. data/core/admin/assets/js/vendor/codemirror/mode/gfm/gfm.js +97 -0
  187. data/core/admin/assets/js/vendor/codemirror/mode/gfm/index.html +82 -0
  188. data/core/admin/assets/js/vendor/codemirror/mode/gfm/test.js +112 -0
  189. data/core/admin/assets/js/vendor/codemirror/mode/gherkin/gherkin.js +168 -0
  190. data/core/admin/assets/js/vendor/codemirror/mode/gherkin/index.html +48 -0
  191. data/core/admin/assets/js/vendor/codemirror/mode/go/go.js +168 -0
  192. data/core/admin/assets/js/vendor/codemirror/mode/go/index.html +85 -0
  193. data/core/admin/assets/js/vendor/codemirror/mode/groovy/groovy.js +211 -0
  194. data/core/admin/assets/js/vendor/codemirror/mode/groovy/index.html +84 -0
  195. data/core/admin/assets/js/vendor/codemirror/mode/haml/haml.js +153 -0
  196. data/core/admin/assets/js/vendor/codemirror/mode/haml/index.html +79 -0
  197. data/core/admin/assets/js/vendor/codemirror/mode/haml/test.js +94 -0
  198. data/core/admin/assets/js/vendor/codemirror/mode/haskell/haskell.js +250 -0
  199. data/core/admin/assets/js/vendor/codemirror/mode/haskell/index.html +73 -0
  200. data/core/admin/assets/js/vendor/codemirror/mode/haxe/haxe.js +429 -0
  201. data/core/admin/assets/js/vendor/codemirror/mode/haxe/index.html +103 -0
  202. data/core/admin/assets/js/vendor/codemirror/mode/htmlembedded/htmlembedded.js +73 -0
  203. data/core/admin/assets/js/vendor/codemirror/mode/htmlembedded/index.html +60 -0
  204. data/core/admin/assets/js/vendor/codemirror/mode/htmlmixed/htmlmixed.js +104 -0
  205. data/core/admin/assets/js/vendor/codemirror/mode/htmlmixed/index.html +85 -0
  206. data/core/admin/assets/js/vendor/codemirror/mode/http/http.js +98 -0
  207. data/core/admin/assets/js/vendor/codemirror/mode/http/index.html +45 -0
  208. data/core/admin/assets/js/vendor/codemirror/mode/index.html +112 -0
  209. data/core/admin/assets/js/vendor/codemirror/mode/jade/index.html +66 -0
  210. data/core/admin/assets/js/vendor/codemirror/mode/jade/jade.js +90 -0
  211. data/core/admin/assets/js/vendor/codemirror/mode/javascript/index.html +107 -0
  212. data/core/admin/assets/js/vendor/codemirror/mode/javascript/javascript.js +480 -0
  213. data/core/admin/assets/js/vendor/codemirror/mode/javascript/test.js +10 -0
  214. data/core/admin/assets/js/vendor/codemirror/mode/javascript/typescript.html +61 -0
  215. data/core/admin/assets/js/vendor/codemirror/mode/jinja2/index.html +50 -0
  216. data/core/admin/assets/js/vendor/codemirror/mode/jinja2/jinja2.js +42 -0
  217. data/core/admin/assets/js/vendor/codemirror/mode/less/index.html +753 -0
  218. data/core/admin/assets/js/vendor/codemirror/mode/less/less.js +344 -0
  219. data/core/admin/assets/js/vendor/codemirror/mode/livescript/index.html +459 -0
  220. data/core/admin/assets/js/vendor/codemirror/mode/livescript/livescript.js +267 -0
  221. data/core/admin/assets/js/vendor/codemirror/mode/livescript/livescript.ls +266 -0
  222. data/core/admin/assets/js/vendor/codemirror/mode/lua/index.html +86 -0
  223. data/core/admin/assets/js/vendor/codemirror/mode/lua/lua.js +144 -0
  224. data/core/admin/assets/js/vendor/codemirror/mode/markdown/index.html +359 -0
  225. data/core/admin/assets/js/vendor/codemirror/mode/markdown/markdown.js +551 -0
  226. data/core/admin/assets/js/vendor/codemirror/mode/markdown/test.js +656 -0
  227. data/core/admin/assets/js/vendor/codemirror/mode/meta.js +89 -0
  228. data/core/admin/assets/js/vendor/codemirror/mode/mirc/index.html +161 -0
  229. data/core/admin/assets/js/vendor/codemirror/mode/mirc/mirc.js +177 -0
  230. data/core/admin/assets/js/vendor/codemirror/mode/nginx/index.html +181 -0
  231. data/core/admin/assets/js/vendor/codemirror/mode/nginx/nginx.js +163 -0
  232. data/core/admin/assets/js/vendor/codemirror/mode/ntriples/index.html +45 -0
  233. data/core/admin/assets/js/vendor/codemirror/mode/ntriples/ntriples.js +170 -0
  234. data/core/admin/assets/js/vendor/codemirror/mode/ocaml/index.html +146 -0
  235. data/core/admin/assets/js/vendor/codemirror/mode/ocaml/ocaml.js +116 -0
  236. data/core/admin/assets/js/vendor/codemirror/mode/octave/index.html +95 -0
  237. data/core/admin/assets/js/vendor/codemirror/mode/octave/octave.js +118 -0
  238. data/core/admin/assets/js/vendor/codemirror/mode/pascal/index.html +61 -0
  239. data/core/admin/assets/js/vendor/codemirror/mode/pascal/pascal.js +94 -0
  240. data/core/admin/assets/js/vendor/codemirror/mode/perl/index.html +75 -0
  241. data/core/admin/assets/js/vendor/codemirror/mode/perl/perl.js +816 -0
  242. data/core/admin/assets/js/vendor/codemirror/mode/php/index.html +62 -0
  243. data/core/admin/assets/js/vendor/codemirror/mode/php/php.js +132 -0
  244. data/core/admin/assets/js/vendor/codemirror/mode/pig/index.html +55 -0
  245. data/core/admin/assets/js/vendor/codemirror/mode/pig/pig.js +171 -0
  246. data/core/admin/assets/js/vendor/codemirror/mode/properties/index.html +53 -0
  247. data/core/admin/assets/js/vendor/codemirror/mode/properties/properties.js +63 -0
  248. data/core/admin/assets/js/vendor/codemirror/mode/python/index.html +187 -0
  249. data/core/admin/assets/js/vendor/codemirror/mode/python/python.js +368 -0
  250. data/core/admin/assets/js/vendor/codemirror/mode/q/index.html +144 -0
  251. data/core/admin/assets/js/vendor/codemirror/mode/q/q.js +124 -0
  252. data/core/admin/assets/js/vendor/codemirror/mode/r/index.html +86 -0
  253. data/core/admin/assets/js/vendor/codemirror/mode/r/r.js +141 -0
  254. data/core/admin/assets/js/vendor/codemirror/mode/rpm/changes/changes.js +19 -0
  255. data/core/admin/assets/js/vendor/codemirror/mode/rpm/changes/index.html +67 -0
  256. data/core/admin/assets/js/vendor/codemirror/mode/rpm/spec/index.html +114 -0
  257. data/core/admin/assets/js/vendor/codemirror/mode/rpm/spec/spec.css +5 -0
  258. data/core/admin/assets/js/vendor/codemirror/mode/rpm/spec/spec.js +66 -0
  259. data/core/admin/assets/js/vendor/codemirror/mode/rst/index.html +534 -0
  260. data/core/admin/assets/js/vendor/codemirror/mode/rst/rst.js +560 -0
  261. data/core/admin/assets/js/vendor/codemirror/mode/ruby/index.html +185 -0
  262. data/core/admin/assets/js/vendor/codemirror/mode/ruby/ruby.js +247 -0
  263. data/core/admin/assets/js/vendor/codemirror/mode/rust/index.html +61 -0
  264. data/core/admin/assets/js/vendor/codemirror/mode/rust/rust.js +436 -0
  265. data/core/admin/assets/js/vendor/codemirror/mode/sass/index.html +66 -0
  266. data/core/admin/assets/js/vendor/codemirror/mode/sass/sass.js +330 -0
  267. data/core/admin/assets/js/vendor/codemirror/mode/scheme/index.html +77 -0
  268. data/core/admin/assets/js/vendor/codemirror/mode/scheme/scheme.js +232 -0
  269. data/core/admin/assets/js/vendor/codemirror/mode/shell/index.html +66 -0
  270. data/core/admin/assets/js/vendor/codemirror/mode/shell/shell.js +118 -0
  271. data/core/admin/assets/js/vendor/codemirror/mode/sieve/index.html +93 -0
  272. data/core/admin/assets/js/vendor/codemirror/mode/sieve/sieve.js +183 -0
  273. data/core/admin/assets/js/vendor/codemirror/mode/smalltalk/index.html +68 -0
  274. data/core/admin/assets/js/vendor/codemirror/mode/smalltalk/smalltalk.js +151 -0
  275. data/core/admin/assets/js/vendor/codemirror/mode/smarty/index.html +136 -0
  276. data/core/admin/assets/js/vendor/codemirror/mode/smarty/smarty.js +205 -0
  277. data/core/admin/assets/js/vendor/codemirror/mode/smartymixed/index.html +114 -0
  278. data/core/admin/assets/js/vendor/codemirror/mode/smartymixed/smartymixed.js +175 -0
  279. data/core/admin/assets/js/vendor/codemirror/mode/sparql/index.html +54 -0
  280. data/core/admin/assets/js/vendor/codemirror/mode/sparql/sparql.js +145 -0
  281. data/core/admin/assets/js/vendor/codemirror/mode/sql/index.html +75 -0
  282. data/core/admin/assets/js/vendor/codemirror/mode/sql/sql.js +365 -0
  283. data/core/admin/assets/js/vendor/codemirror/mode/stex/index.html +110 -0
  284. data/core/admin/assets/js/vendor/codemirror/mode/stex/stex.js +246 -0
  285. data/core/admin/assets/js/vendor/codemirror/mode/stex/test.js +120 -0
  286. data/core/admin/assets/js/vendor/codemirror/mode/tcl/index.html +143 -0
  287. data/core/admin/assets/js/vendor/codemirror/mode/tcl/tcl.js +131 -0
  288. data/core/admin/assets/js/vendor/codemirror/mode/tiddlywiki/index.html +155 -0
  289. data/core/admin/assets/js/vendor/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
  290. data/core/admin/assets/js/vendor/codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
  291. data/core/admin/assets/js/vendor/codemirror/mode/tiki/index.html +95 -0
  292. data/core/admin/assets/js/vendor/codemirror/mode/tiki/tiki.css +26 -0
  293. data/core/admin/assets/js/vendor/codemirror/mode/tiki/tiki.js +308 -0
  294. data/core/admin/assets/js/vendor/codemirror/mode/toml/index.html +73 -0
  295. data/core/admin/assets/js/vendor/codemirror/mode/toml/toml.js +71 -0
  296. data/core/admin/assets/js/vendor/codemirror/mode/turtle/index.html +51 -0
  297. data/core/admin/assets/js/vendor/codemirror/mode/turtle/turtle.js +145 -0
  298. data/core/admin/assets/js/vendor/codemirror/mode/vb/index.html +103 -0
  299. data/core/admin/assets/js/vendor/codemirror/mode/vb/vb.js +259 -0
  300. data/core/admin/assets/js/vendor/codemirror/mode/vbscript/index.html +55 -0
  301. data/core/admin/assets/js/vendor/codemirror/mode/vbscript/vbscript.js +334 -0
  302. data/core/admin/assets/js/vendor/codemirror/mode/velocity/index.html +119 -0
  303. data/core/admin/assets/js/vendor/codemirror/mode/velocity/velocity.js +186 -0
  304. data/core/admin/assets/js/vendor/codemirror/mode/verilog/index.html +132 -0
  305. data/core/admin/assets/js/vendor/codemirror/mode/verilog/verilog.js +182 -0
  306. data/core/admin/assets/js/vendor/codemirror/mode/xml/index.html +57 -0
  307. data/core/admin/assets/js/vendor/codemirror/mode/xml/xml.js +345 -0
  308. data/core/admin/assets/js/vendor/codemirror/mode/xquery/index.html +210 -0
  309. data/core/admin/assets/js/vendor/codemirror/mode/xquery/test.js +64 -0
  310. data/core/admin/assets/js/vendor/codemirror/mode/xquery/xquery.js +432 -0
  311. data/core/admin/assets/js/vendor/codemirror/mode/yaml/index.html +80 -0
  312. data/core/admin/assets/js/vendor/codemirror/mode/yaml/yaml.js +97 -0
  313. data/core/admin/assets/js/vendor/codemirror/mode/z80/index.html +52 -0
  314. data/core/admin/assets/js/vendor/codemirror/mode/z80/z80.js +85 -0
  315. data/core/admin/assets/js/vendor/codemirror/package.json +19 -0
  316. data/core/admin/assets/js/vendor/codemirror/test/comment_test.js +51 -0
  317. data/core/admin/assets/js/vendor/codemirror/test/doc_test.js +329 -0
  318. data/core/admin/assets/js/vendor/codemirror/test/driver.js +139 -0
  319. data/core/admin/assets/js/vendor/codemirror/test/emacs_test.js +135 -0
  320. data/core/admin/assets/js/vendor/codemirror/test/index.html +209 -0
  321. data/core/admin/assets/js/vendor/codemirror/test/lint/acorn.js +1593 -0
  322. data/core/admin/assets/js/vendor/codemirror/test/lint/lint.js +139 -0
  323. data/core/admin/assets/js/vendor/codemirror/test/lint/walk.js +216 -0
  324. data/core/admin/assets/js/vendor/codemirror/test/mode_test.css +10 -0
  325. data/core/admin/assets/js/vendor/codemirror/test/mode_test.js +200 -0
  326. data/core/admin/assets/js/vendor/codemirror/test/phantom_driver.js +31 -0
  327. data/core/admin/assets/js/vendor/codemirror/test/run.js +34 -0
  328. data/core/admin/assets/js/vendor/codemirror/test/test.js +1562 -0
  329. data/core/admin/assets/js/vendor/codemirror/test/vim_test.js +2391 -0
  330. data/core/admin/assets/js/vendor/codemirror/theme/3024-day.css +34 -0
  331. data/core/admin/assets/js/vendor/codemirror/theme/3024-night.css +34 -0
  332. data/core/admin/assets/js/vendor/codemirror/theme/ambiance-mobile.css +5 -0
  333. data/core/admin/assets/js/vendor/codemirror/theme/ambiance.css +75 -0
  334. data/core/admin/assets/js/vendor/codemirror/theme/base16-dark.css +34 -0
  335. data/core/admin/assets/js/vendor/codemirror/theme/base16-light.css +34 -0
  336. data/core/admin/assets/js/vendor/codemirror/theme/blackboard.css +28 -0
  337. data/core/admin/assets/js/vendor/codemirror/theme/cobalt.css +21 -0
  338. data/core/admin/assets/js/vendor/codemirror/theme/eclipse.css +23 -0
  339. data/core/admin/assets/js/vendor/codemirror/theme/elegant.css +13 -0
  340. data/core/admin/assets/js/vendor/codemirror/theme/erlang-dark.css +30 -0
  341. data/core/admin/assets/js/vendor/codemirror/theme/lesser-dark.css +47 -0
  342. data/core/admin/assets/js/vendor/codemirror/theme/mbo.css +35 -0
  343. data/core/admin/assets/js/vendor/codemirror/theme/midnight.css +43 -0
  344. data/core/admin/assets/js/vendor/codemirror/theme/monokai.css +29 -0
  345. data/core/admin/assets/js/vendor/codemirror/theme/neat.css +12 -0
  346. data/core/admin/assets/js/vendor/codemirror/theme/night.css +24 -0
  347. data/core/admin/assets/js/vendor/codemirror/theme/paraiso-dark.css +34 -0
  348. data/core/admin/assets/js/vendor/codemirror/theme/paraiso-light.css +34 -0
  349. data/core/admin/assets/js/vendor/codemirror/theme/rubyblue.css +23 -0
  350. data/core/admin/assets/js/vendor/codemirror/theme/solarized-mod.css +181 -0
  351. data/core/admin/assets/js/vendor/codemirror/theme/solarized.css +180 -0
  352. data/core/admin/assets/js/vendor/codemirror/theme/the-matrix.css +26 -0
  353. data/core/admin/assets/js/vendor/codemirror/theme/tomorrow-night-eighties.css +34 -0
  354. data/core/admin/assets/js/vendor/codemirror/theme/twilight.css +28 -0
  355. data/core/admin/assets/js/vendor/codemirror/theme/vibrant-ink.css +30 -0
  356. data/core/admin/assets/js/vendor/codemirror/theme/xq-dark.css +49 -0
  357. data/core/admin/assets/js/vendor/codemirror/theme/xq-light.css +43 -0
  358. data/core/admin/assets/js/vendor/fastclick.js +777 -0
  359. data/core/admin/assets/js/vendor/jquery.js +6 -0
  360. data/core/admin/assets/js/vendor/lodash.underscore.js +38 -0
  361. data/core/admin/assets/js/vendor/require.js +36 -0
  362. data/core/admin/assets/scss/bootstrap.scss +18 -0
  363. data/core/admin/assets/scss/modules/_all.scss +7 -0
  364. data/core/admin/assets/scss/modules/_colors.scss +7 -0
  365. data/core/admin/assets/scss/modules/_extensions.scss +24 -0
  366. data/core/admin/assets/scss/modules/_mixins.scss +18 -0
  367. data/core/admin/assets/scss/modules/_susy.scss +7 -0
  368. data/core/admin/assets/scss/partials/_base.scss +33 -0
  369. data/core/admin/assets/scss/partials/_buttons.scss +9 -0
  370. data/core/admin/assets/scss/partials/_links.scss +15 -0
  371. data/core/admin/assets/scss/partials/_main.scss +14 -0
  372. data/core/admin/assets/scss/partials/_typography.scss +15 -0
  373. data/core/admin/assets/scss/sections/_editor.scss +274 -0
  374. data/core/admin/assets/scss/sections/_login.scss +34 -0
  375. data/core/admin/assets/scss/vendor/_normalize.scss +406 -0
  376. data/core/admin/layouts/admin.haml +67 -0
  377. data/core/admin/partials/_head.haml +23 -0
  378. data/core/admin/partials/_tree.haml +3 -0
  379. data/core/admin/partials/_treeitem.haml +4 -0
  380. data/core/admin/settings.yml +4 -0
  381. data/core/app.rb +21 -0
  382. data/core/classes/cached.rb +35 -0
  383. data/core/classes/checker.rb +37 -0
  384. data/core/classes/commit.rb +62 -0
  385. data/core/classes/error.rb +9 -0
  386. data/core/classes/page.rb +165 -0
  387. data/core/classes/partial.rb +13 -0
  388. data/core/classes/path.rb +30 -0
  389. data/core/classes/persona.rb +55 -0
  390. data/core/classes/sassfile.rb +95 -0
  391. data/core/classes/settings.rb +19 -0
  392. data/core/classes/theme.rb +55 -0
  393. data/core/helpers/base.rb +46 -0
  394. data/core/helpers/render.rb +26 -0
  395. data/core/helpers/truncate.rb +17 -0
  396. data/core/routes/admin.rb +139 -0
  397. data/core/routes/assetcompiler.rb +23 -0
  398. data/core/routes/base.rb +22 -0
  399. data/core/routes/bootstrap.rb +35 -0
  400. data/core/routes/cache.rb +52 -0
  401. data/core/routes/deploy.rb +16 -0
  402. data/core/routes/git.rb +23 -0
  403. data/poly.gemspec +29 -0
  404. data/sample/.cabi-data +0 -0
  405. data/sample/data/home/index.haml +22 -0
  406. data/sample/data/other/nav/links.yml +4 -0
  407. data/sample/data/page/about/index.haml +12 -0
  408. data/sample/data/page/contact-us/index.haml +11 -0
  409. data/sample/data/page/dynamic-page/index.haml +14 -0
  410. data/sample/data/page/error/index.haml +8 -0
  411. data/sample/data/page/html/index.html +4 -0
  412. data/sample/data/page/no-front-matter/index.haml +7 -0
  413. data/sample/data/page/not-found/index.haml +8 -0
  414. data/sample/data/page/static-page/index.haml +14 -0
  415. data/sample/data/post/about-life/index.md +12 -0
  416. data/sample/data/post/sample-post/index.haml +12 -0
  417. data/sample/data/post/technology/index.haml +12 -0
  418. data/sample/data/post/the-40-hour-workweek/index.haml +9 -0
  419. data/sample/data/post/things-are-changing/index.haml +9 -0
  420. data/sample/data/post/yet-another-post/index.haml +11 -0
  421. data/sample/plugins/my-plugin/plugin.rb +15 -0
  422. data/sample/settings.yml +21 -0
  423. data/sample/themes/base/assets/css/readme.txt +6 -0
  424. data/sample/themes/base/assets/images/poly.svg +36 -0
  425. data/sample/themes/base/assets/js/app/views/main.js +13 -0
  426. data/sample/themes/base/assets/js/main.js +31 -0
  427. data/sample/themes/base/assets/js/vendor/backbone.js +4 -0
  428. data/sample/themes/base/assets/js/vendor/jquery.js +6 -0
  429. data/sample/themes/base/assets/js/vendor/lodash.underscore.js +38 -0
  430. data/sample/themes/base/assets/js/vendor/require.js +36 -0
  431. data/sample/themes/base/assets/scss/bootstrap.scss +20 -0
  432. data/sample/themes/base/assets/scss/modules/_all.scss +7 -0
  433. data/sample/themes/base/assets/scss/modules/_colors.scss +7 -0
  434. data/sample/themes/base/assets/scss/modules/_extensions.scss +13 -0
  435. data/sample/themes/base/assets/scss/modules/_mixins.scss +11 -0
  436. data/sample/themes/base/assets/scss/modules/_susy.scss +7 -0
  437. data/sample/themes/base/assets/scss/partials/_base.scss +33 -0
  438. data/sample/themes/base/assets/scss/partials/_buttons.scss +0 -0
  439. data/sample/themes/base/assets/scss/partials/_links.scss +15 -0
  440. data/sample/themes/base/assets/scss/partials/_main.scss +39 -0
  441. data/sample/themes/base/assets/scss/partials/_typography.scss +15 -0
  442. data/sample/themes/base/assets/scss/sections/_footer.scss +22 -0
  443. data/sample/themes/base/assets/scss/sections/_header.scss +23 -0
  444. data/sample/themes/base/assets/scss/sections/_home.scss +13 -0
  445. data/sample/themes/base/assets/scss/sections/_pages.scss +11 -0
  446. data/sample/themes/base/assets/scss/vendor/_normalize.scss +406 -0
  447. data/sample/themes/base/layouts/default.haml +14 -0
  448. data/sample/themes/base/layouts/post.haml +15 -0
  449. data/sample/themes/base/partials/_footer.haml +9 -0
  450. data/sample/themes/base/partials/_ga.haml +10 -0
  451. data/sample/themes/base/partials/_head.haml +20 -0
  452. data/sample/themes/base/partials/_header.haml +5 -0
  453. data/sample/themes/base/settings.yml +4 -0
  454. data/test/data/post-receive-hook.json +146 -0
  455. data/test/test_basics.rb +50 -0
  456. data/test/test_data.rb +14 -0
  457. data/test/test_deploy.rb +23 -0
  458. data/test/test_includes.rb +43 -0
  459. data/test/test_page.rb +47 -0
  460. metadata +1049 -0
@@ -0,0 +1,19 @@
1
+ CodeMirror.defineMode("changes", function() {
2
+ var headerSeperator = /^-+$/;
3
+ var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /;
4
+ var simpleEmail = /^[\w+.-]+@[\w.-]+/;
5
+
6
+ return {
7
+ token: function(stream) {
8
+ if (stream.sol()) {
9
+ if (stream.match(headerSeperator)) { return 'tag'; }
10
+ if (stream.match(headerLine)) { return 'tag'; }
11
+ }
12
+ if (stream.match(simpleEmail)) { return 'string'; }
13
+ stream.next();
14
+ return null;
15
+ }
16
+ };
17
+ });
18
+
19
+ CodeMirror.defineMIME("text/x-rpm-changes", "changes");
@@ -0,0 +1,67 @@
1
+ <!doctype html>
2
+
3
+ <title>CodeMirror: RPM changes mode</title>
4
+ <meta charset="utf-8"/>
5
+ <link rel=stylesheet href="../../doc/docs.css">
6
+
7
+ <link rel="stylesheet" href="../../../lib/codemirror.css">
8
+ <script src="../../../lib/codemirror.js"></script>
9
+ <script src="changes.js"></script>
10
+ <link rel="stylesheet" href="../../../doc/docs.css">
11
+ <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
12
+
13
+ <div id=nav>
14
+ <a href="http://codemirror.net"><img id=logo src="../../../doc/logo.png"></a>
15
+
16
+ <ul>
17
+ <li><a href="../../../index.html">Home</a>
18
+ <li><a href="../../../doc/manual.html">Manual</a>
19
+ <li><a href="https://github.com/marijnh/codemirror">Code</a>
20
+ </ul>
21
+ <ul>
22
+ <li><a href="../../index.html">Language modes</a>
23
+ <li><a class=active href="#">RPM changes</a>
24
+ </ul>
25
+ </div>
26
+
27
+ <article>
28
+ <h2>RPM changes mode</h2>
29
+
30
+ <div><textarea id="code" name="code">
31
+ -------------------------------------------------------------------
32
+ Tue Oct 18 13:58:40 UTC 2011 - misterx@example.com
33
+
34
+ - Update to r60.3
35
+ - Fixes bug in the reflect package
36
+ * disallow Interface method on Value obtained via unexported name
37
+
38
+ -------------------------------------------------------------------
39
+ Thu Oct 6 08:14:24 UTC 2011 - misterx@example.com
40
+
41
+ - Update to r60.2
42
+ - Fixes memory leak in certain map types
43
+
44
+ -------------------------------------------------------------------
45
+ Wed Oct 5 14:34:10 UTC 2011 - misterx@example.com
46
+
47
+ - Tweaks for gdb debugging
48
+ - go.spec changes:
49
+ - move %go_arch definition to %prep section
50
+ - pass correct location of go specific gdb pretty printer and
51
+ functions to cpp as HOST_EXTRA_CFLAGS macro
52
+ - install go gdb functions & printer
53
+ - gdb-printer.patch
54
+ - patch linker (src/cmd/ld/dwarf.c) to emit correct location of go
55
+ gdb functions and pretty printer
56
+ </textarea></div>
57
+ <script>
58
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
59
+ mode: {name: "changes"},
60
+ lineNumbers: true,
61
+ indentUnit: 4,
62
+ tabMode: "shift"
63
+ });
64
+ </script>
65
+
66
+ <p><strong>MIME types defined:</strong> <code>text/x-rpm-changes</code>.</p>
67
+ </article>
@@ -0,0 +1,114 @@
1
+ <!doctype html>
2
+
3
+ <title>CodeMirror: RPM spec mode</title>
4
+ <meta charset="utf-8"/>
5
+ <link rel=stylesheet href="../../doc/docs.css">
6
+
7
+ <link rel="stylesheet" href="../../../lib/codemirror.css">
8
+ <script src="../../../lib/codemirror.js"></script>
9
+ <script src="spec.js"></script>
10
+ <link rel="stylesheet" href="spec.css">
11
+ <link rel="stylesheet" href="../../../doc/docs.css">
12
+ <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
13
+
14
+ <div id=nav>
15
+ <a href="http://codemirror.net"><img id=logo src="../../../doc/logo.png"></a>
16
+
17
+ <ul>
18
+ <li><a href="../../../index.html">Home</a>
19
+ <li><a href="../../../doc/manual.html">Manual</a>
20
+ <li><a href="https://github.com/marijnh/codemirror">Code</a>
21
+ </ul>
22
+ <ul>
23
+ <li><a href="../../index.html">Language modes</a>
24
+ <li><a class=active href="#">RPM spec</a>
25
+ </ul>
26
+ </div>
27
+
28
+ <article>
29
+ <h2>RPM spec mode</h2>
30
+
31
+ <div><textarea id="code" name="code">
32
+ #
33
+ # spec file for package minidlna
34
+ #
35
+ # Copyright (c) 2011, Sascha Peilicke <saschpe@gmx.de>
36
+ #
37
+ # All modifications and additions to the file contributed by third parties
38
+ # remain the property of their copyright owners, unless otherwise agreed
39
+ # upon. The license for this file, and modifications and additions to the
40
+ # file, is the same license as for the pristine package itself (unless the
41
+ # license for the pristine package is not an Open Source License, in which
42
+ # case the license is the MIT License). An "Open Source License" is a
43
+ # license that conforms to the Open Source Definition (Version 1.9)
44
+ # published by the Open Source Initiative.
45
+
46
+
47
+ Name: libupnp6
48
+ Version: 1.6.13
49
+ Release: 0
50
+ Summary: Portable Universal Plug and Play (UPnP) SDK
51
+ Group: System/Libraries
52
+ License: BSD-3-Clause
53
+ Url: http://sourceforge.net/projects/pupnp/
54
+ Source0: http://downloads.sourceforge.net/pupnp/libupnp-%{version}.tar.bz2
55
+ BuildRoot: %{_tmppath}/%{name}-%{version}-build
56
+
57
+ %description
58
+ The portable Universal Plug and Play (UPnP) SDK provides support for building
59
+ UPnP-compliant control points, devices, and bridges on several operating
60
+ systems.
61
+
62
+ %package -n libupnp-devel
63
+ Summary: Portable Universal Plug and Play (UPnP) SDK
64
+ Group: Development/Libraries/C and C++
65
+ Provides: pkgconfig(libupnp)
66
+ Requires: %{name} = %{version}
67
+
68
+ %description -n libupnp-devel
69
+ The portable Universal Plug and Play (UPnP) SDK provides support for building
70
+ UPnP-compliant control points, devices, and bridges on several operating
71
+ systems.
72
+
73
+ %prep
74
+ %setup -n libupnp-%{version}
75
+
76
+ %build
77
+ %configure --disable-static
78
+ make %{?_smp_mflags}
79
+
80
+ %install
81
+ %makeinstall
82
+ find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
83
+
84
+ %post -p /sbin/ldconfig
85
+
86
+ %postun -p /sbin/ldconfig
87
+
88
+ %files
89
+ %defattr(-,root,root,-)
90
+ %doc ChangeLog NEWS README TODO
91
+ %{_libdir}/libixml.so.*
92
+ %{_libdir}/libthreadutil.so.*
93
+ %{_libdir}/libupnp.so.*
94
+
95
+ %files -n libupnp-devel
96
+ %defattr(-,root,root,-)
97
+ %{_libdir}/pkgconfig/libupnp.pc
98
+ %{_libdir}/libixml.so
99
+ %{_libdir}/libthreadutil.so
100
+ %{_libdir}/libupnp.so
101
+ %{_includedir}/upnp/
102
+
103
+ %changelog</textarea></div>
104
+ <script>
105
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
106
+ mode: {name: "spec"},
107
+ lineNumbers: true,
108
+ indentUnit: 4
109
+ });
110
+ </script>
111
+
112
+ <p><strong>MIME types defined:</strong> <code>text/x-rpm-spec</code>.</p>
113
+
114
+ </article>
@@ -0,0 +1,5 @@
1
+ .cm-s-default span.cm-preamble {color: #b26818; font-weight: bold;}
2
+ .cm-s-default span.cm-macro {color: #b218b2;}
3
+ .cm-s-default span.cm-section {color: green; font-weight: bold;}
4
+ .cm-s-default span.cm-script {color: red;}
5
+ .cm-s-default span.cm-issue {color: yellow;}
@@ -0,0 +1,66 @@
1
+ // Quick and dirty spec file highlighting
2
+
3
+ CodeMirror.defineMode("spec", function() {
4
+ var arch = /^(i386|i586|i686|x86_64|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/;
5
+
6
+ var preamble = /^(Name|Version|Release|License|Summary|Url|Group|Source|BuildArch|BuildRequires|BuildRoot|AutoReqProv|Provides|Requires(\(\w+\))?|Obsoletes|Conflicts|Recommends|Source\d*|Patch\d*|ExclusiveArch|NoSource|Supplements):/;
7
+ var section = /^%(debug_package|package|description|prep|build|install|files|clean|changelog|preun|postun|pre|post|triggerin|triggerun|pretrans|posttrans|verifyscript|check|triggerpostun|triggerprein|trigger)/;
8
+ var control_flow_complex = /^%(ifnarch|ifarch|if)/; // rpm control flow macros
9
+ var control_flow_simple = /^%(else|endif)/; // rpm control flow macros
10
+ var operators = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/; // operators in control flow macros
11
+
12
+ return {
13
+ startState: function () {
14
+ return {
15
+ controlFlow: false,
16
+ macroParameters: false,
17
+ section: false
18
+ };
19
+ },
20
+ token: function (stream, state) {
21
+ var ch = stream.peek();
22
+ if (ch == "#") { stream.skipToEnd(); return "comment"; }
23
+
24
+ if (stream.sol()) {
25
+ if (stream.match(preamble)) { return "preamble"; }
26
+ if (stream.match(section)) { return "section"; }
27
+ }
28
+
29
+ if (stream.match(/^\$\w+/)) { return "def"; } // Variables like '$RPM_BUILD_ROOT'
30
+ if (stream.match(/^\$\{\w+\}/)) { return "def"; } // Variables like '${RPM_BUILD_ROOT}'
31
+
32
+ if (stream.match(control_flow_simple)) { return "keyword"; }
33
+ if (stream.match(control_flow_complex)) {
34
+ state.controlFlow = true;
35
+ return "keyword";
36
+ }
37
+ if (state.controlFlow) {
38
+ if (stream.match(operators)) { return "operator"; }
39
+ if (stream.match(/^(\d+)/)) { return "number"; }
40
+ if (stream.eol()) { state.controlFlow = false; }
41
+ }
42
+
43
+ if (stream.match(arch)) { return "number"; }
44
+
45
+ // Macros like '%make_install' or '%attr(0775,root,root)'
46
+ if (stream.match(/^%[\w]+/)) {
47
+ if (stream.match(/^\(/)) { state.macroParameters = true; }
48
+ return "macro";
49
+ }
50
+ if (state.macroParameters) {
51
+ if (stream.match(/^\d+/)) { return "number";}
52
+ if (stream.match(/^\)/)) {
53
+ state.macroParameters = false;
54
+ return "macro";
55
+ }
56
+ }
57
+ if (stream.match(/^%\{\??[\w \-]+\}/)) { return "macro"; } // Macros like '%{defined fedora}'
58
+
59
+ //TODO: Include bash script sub-parser (CodeMirror supports that)
60
+ stream.next();
61
+ return null;
62
+ }
63
+ };
64
+ });
65
+
66
+ CodeMirror.defineMIME("text/x-rpm-spec", "spec");
@@ -0,0 +1,534 @@
1
+ <!doctype html>
2
+
3
+ <title>CodeMirror: reStructuredText mode</title>
4
+ <meta charset="utf-8"/>
5
+ <link rel=stylesheet href="../../doc/docs.css">
6
+
7
+ <link rel="stylesheet" href="../../lib/codemirror.css">
8
+ <script src="../../lib/codemirror.js"></script>
9
+ <script src="rst.js"></script>
10
+ <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
11
+ <div id=nav>
12
+ <a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
13
+
14
+ <ul>
15
+ <li><a href="../../index.html">Home</a>
16
+ <li><a href="../../doc/manual.html">Manual</a>
17
+ <li><a href="https://github.com/marijnh/codemirror">Code</a>
18
+ </ul>
19
+ <ul>
20
+ <li><a href="../index.html">Language modes</a>
21
+ <li><a class=active href="#">reStructuredText</a>
22
+ </ul>
23
+ </div>
24
+
25
+ <article>
26
+ <h2>reStructuredText mode</h2>
27
+ <form><textarea id="code" name="code">
28
+ .. This is an excerpt from Sphinx documentation: http://sphinx.pocoo.org/_sources/rest.txt
29
+
30
+ .. highlightlang:: rest
31
+
32
+ .. _rst-primer:
33
+
34
+ reStructuredText Primer
35
+ =======================
36
+
37
+ This section is a brief introduction to reStructuredText (reST) concepts and
38
+ syntax, intended to provide authors with enough information to author documents
39
+ productively. Since reST was designed to be a simple, unobtrusive markup
40
+ language, this will not take too long.
41
+
42
+ .. seealso::
43
+
44
+ The authoritative `reStructuredText User Documentation
45
+ &lt;http://docutils.sourceforge.net/rst.html&gt;`_. The "ref" links in this
46
+ document link to the description of the individual constructs in the reST
47
+ reference.
48
+
49
+
50
+ Paragraphs
51
+ ----------
52
+
53
+ The paragraph (:duref:`ref &lt;paragraphs&gt;`) is the most basic block in a reST
54
+ document. Paragraphs are simply chunks of text separated by one or more blank
55
+ lines. As in Python, indentation is significant in reST, so all lines of the
56
+ same paragraph must be left-aligned to the same level of indentation.
57
+
58
+
59
+ .. _inlinemarkup:
60
+
61
+ Inline markup
62
+ -------------
63
+
64
+ The standard reST inline markup is quite simple: use
65
+
66
+ * one asterisk: ``*text*`` for emphasis (italics),
67
+ * two asterisks: ``**text**`` for strong emphasis (boldface), and
68
+ * backquotes: ````text```` for code samples.
69
+
70
+ If asterisks or backquotes appear in running text and could be confused with
71
+ inline markup delimiters, they have to be escaped with a backslash.
72
+
73
+ Be aware of some restrictions of this markup:
74
+
75
+ * it may not be nested,
76
+ * content may not start or end with whitespace: ``* text*`` is wrong,
77
+ * it must be separated from surrounding text by non-word characters. Use a
78
+ backslash escaped space to work around that: ``thisis\ *one*\ word``.
79
+
80
+ These restrictions may be lifted in future versions of the docutils.
81
+
82
+ reST also allows for custom "interpreted text roles"', which signify that the
83
+ enclosed text should be interpreted in a specific way. Sphinx uses this to
84
+ provide semantic markup and cross-referencing of identifiers, as described in
85
+ the appropriate section. The general syntax is ``:rolename:`content```.
86
+
87
+ Standard reST provides the following roles:
88
+
89
+ * :durole:`emphasis` -- alternate spelling for ``*emphasis*``
90
+ * :durole:`strong` -- alternate spelling for ``**strong**``
91
+ * :durole:`literal` -- alternate spelling for ````literal````
92
+ * :durole:`subscript` -- subscript text
93
+ * :durole:`superscript` -- superscript text
94
+ * :durole:`title-reference` -- for titles of books, periodicals, and other
95
+ materials
96
+
97
+ See :ref:`inline-markup` for roles added by Sphinx.
98
+
99
+
100
+ Lists and Quote-like blocks
101
+ ---------------------------
102
+
103
+ List markup (:duref:`ref &lt;bullet-lists&gt;`) is natural: just place an asterisk at
104
+ the start of a paragraph and indent properly. The same goes for numbered lists;
105
+ they can also be autonumbered using a ``#`` sign::
106
+
107
+ * This is a bulleted list.
108
+ * It has two items, the second
109
+ item uses two lines.
110
+
111
+ 1. This is a numbered list.
112
+ 2. It has two items too.
113
+
114
+ #. This is a numbered list.
115
+ #. It has two items too.
116
+
117
+
118
+ Nested lists are possible, but be aware that they must be separated from the
119
+ parent list items by blank lines::
120
+
121
+ * this is
122
+ * a list
123
+
124
+ * with a nested list
125
+ * and some subitems
126
+
127
+ * and here the parent list continues
128
+
129
+ Definition lists (:duref:`ref &lt;definition-lists&gt;`) are created as follows::
130
+
131
+ term (up to a line of text)
132
+ Definition of the term, which must be indented
133
+
134
+ and can even consist of multiple paragraphs
135
+
136
+ next term
137
+ Description.
138
+
139
+ Note that the term cannot have more than one line of text.
140
+
141
+ Quoted paragraphs (:duref:`ref &lt;block-quotes&gt;`) are created by just indenting
142
+ them more than the surrounding paragraphs.
143
+
144
+ Line blocks (:duref:`ref &lt;line-blocks&gt;`) are a way of preserving line breaks::
145
+
146
+ | These lines are
147
+ | broken exactly like in
148
+ | the source file.
149
+
150
+ There are also several more special blocks available:
151
+
152
+ * field lists (:duref:`ref &lt;field-lists&gt;`)
153
+ * option lists (:duref:`ref &lt;option-lists&gt;`)
154
+ * quoted literal blocks (:duref:`ref &lt;quoted-literal-blocks&gt;`)
155
+ * doctest blocks (:duref:`ref &lt;doctest-blocks&gt;`)
156
+
157
+
158
+ Source Code
159
+ -----------
160
+
161
+ Literal code blocks (:duref:`ref &lt;literal-blocks&gt;`) are introduced by ending a
162
+ paragraph with the special marker ``::``. The literal block must be indented
163
+ (and, like all paragraphs, separated from the surrounding ones by blank lines)::
164
+
165
+ This is a normal text paragraph. The next paragraph is a code sample::
166
+
167
+ It is not processed in any way, except
168
+ that the indentation is removed.
169
+
170
+ It can span multiple lines.
171
+
172
+ This is a normal text paragraph again.
173
+
174
+ The handling of the ``::`` marker is smart:
175
+
176
+ * If it occurs as a paragraph of its own, that paragraph is completely left
177
+ out of the document.
178
+ * If it is preceded by whitespace, the marker is removed.
179
+ * If it is preceded by non-whitespace, the marker is replaced by a single
180
+ colon.
181
+
182
+ That way, the second sentence in the above example's first paragraph would be
183
+ rendered as "The next paragraph is a code sample:".
184
+
185
+
186
+ .. _rst-tables:
187
+
188
+ Tables
189
+ ------
190
+
191
+ Two forms of tables are supported. For *grid tables* (:duref:`ref
192
+ &lt;grid-tables&gt;`), you have to "paint" the cell grid yourself. They look like
193
+ this::
194
+
195
+ +------------------------+------------+----------+----------+
196
+ | Header row, column 1 | Header 2 | Header 3 | Header 4 |
197
+ | (header rows optional) | | | |
198
+ +========================+============+==========+==========+
199
+ | body row 1, column 1 | column 2 | column 3 | column 4 |
200
+ +------------------------+------------+----------+----------+
201
+ | body row 2 | ... | ... | |
202
+ +------------------------+------------+----------+----------+
203
+
204
+ *Simple tables* (:duref:`ref &lt;simple-tables&gt;`) are easier to write, but
205
+ limited: they must contain more than one row, and the first column cannot
206
+ contain multiple lines. They look like this::
207
+
208
+ ===== ===== =======
209
+ A B A and B
210
+ ===== ===== =======
211
+ False False False
212
+ True False False
213
+ False True False
214
+ True True True
215
+ ===== ===== =======
216
+
217
+
218
+ Hyperlinks
219
+ ----------
220
+
221
+ External links
222
+ ^^^^^^^^^^^^^^
223
+
224
+ Use ```Link text &lt;http://example.com/&gt;`_`` for inline web links. If the link
225
+ text should be the web address, you don't need special markup at all, the parser
226
+ finds links and mail addresses in ordinary text.
227
+
228
+ You can also separate the link and the target definition (:duref:`ref
229
+ &lt;hyperlink-targets&gt;`), like this::
230
+
231
+ This is a paragraph that contains `a link`_.
232
+
233
+ .. _a link: http://example.com/
234
+
235
+
236
+ Internal links
237
+ ^^^^^^^^^^^^^^
238
+
239
+ Internal linking is done via a special reST role provided by Sphinx, see the
240
+ section on specific markup, :ref:`ref-role`.
241
+
242
+
243
+ Sections
244
+ --------
245
+
246
+ Section headers (:duref:`ref &lt;sections&gt;`) are created by underlining (and
247
+ optionally overlining) the section title with a punctuation character, at least
248
+ as long as the text::
249
+
250
+ =================
251
+ This is a heading
252
+ =================
253
+
254
+ Normally, there are no heading levels assigned to certain characters as the
255
+ structure is determined from the succession of headings. However, for the
256
+ Python documentation, this convention is used which you may follow:
257
+
258
+ * ``#`` with overline, for parts
259
+ * ``*`` with overline, for chapters
260
+ * ``=``, for sections
261
+ * ``-``, for subsections
262
+ * ``^``, for subsubsections
263
+ * ``"``, for paragraphs
264
+
265
+ Of course, you are free to use your own marker characters (see the reST
266
+ documentation), and use a deeper nesting level, but keep in mind that most
267
+ target formats (HTML, LaTeX) have a limited supported nesting depth.
268
+
269
+
270
+ Explicit Markup
271
+ ---------------
272
+
273
+ "Explicit markup" (:duref:`ref &lt;explicit-markup-blocks&gt;`) is used in reST for
274
+ most constructs that need special handling, such as footnotes,
275
+ specially-highlighted paragraphs, comments, and generic directives.
276
+
277
+ An explicit markup block begins with a line starting with ``..`` followed by
278
+ whitespace and is terminated by the next paragraph at the same level of
279
+ indentation. (There needs to be a blank line between explicit markup and normal
280
+ paragraphs. This may all sound a bit complicated, but it is intuitive enough
281
+ when you write it.)
282
+
283
+
284
+ .. _directives:
285
+
286
+ Directives
287
+ ----------
288
+
289
+ A directive (:duref:`ref &lt;directives&gt;`) is a generic block of explicit markup.
290
+ Besides roles, it is one of the extension mechanisms of reST, and Sphinx makes
291
+ heavy use of it.
292
+
293
+ Docutils supports the following directives:
294
+
295
+ * Admonitions: :dudir:`attention`, :dudir:`caution`, :dudir:`danger`,
296
+ :dudir:`error`, :dudir:`hint`, :dudir:`important`, :dudir:`note`,
297
+ :dudir:`tip`, :dudir:`warning` and the generic :dudir:`admonition`.
298
+ (Most themes style only "note" and "warning" specially.)
299
+
300
+ * Images:
301
+
302
+ - :dudir:`image` (see also Images_ below)
303
+ - :dudir:`figure` (an image with caption and optional legend)
304
+
305
+ * Additional body elements:
306
+
307
+ - :dudir:`contents` (a local, i.e. for the current file only, table of
308
+ contents)
309
+ - :dudir:`container` (a container with a custom class, useful to generate an
310
+ outer ``&lt;div&gt;`` in HTML)
311
+ - :dudir:`rubric` (a heading without relation to the document sectioning)
312
+ - :dudir:`topic`, :dudir:`sidebar` (special highlighted body elements)
313
+ - :dudir:`parsed-literal` (literal block that supports inline markup)
314
+ - :dudir:`epigraph` (a block quote with optional attribution line)
315
+ - :dudir:`highlights`, :dudir:`pull-quote` (block quotes with their own
316
+ class attribute)
317
+ - :dudir:`compound` (a compound paragraph)
318
+
319
+ * Special tables:
320
+
321
+ - :dudir:`table` (a table with title)
322
+ - :dudir:`csv-table` (a table generated from comma-separated values)
323
+ - :dudir:`list-table` (a table generated from a list of lists)
324
+
325
+ * Special directives:
326
+
327
+ - :dudir:`raw` (include raw target-format markup)
328
+ - :dudir:`include` (include reStructuredText from another file)
329
+ -- in Sphinx, when given an absolute include file path, this directive takes
330
+ it as relative to the source directory
331
+ - :dudir:`class` (assign a class attribute to the next element) [1]_
332
+
333
+ * HTML specifics:
334
+
335
+ - :dudir:`meta` (generation of HTML ``&lt;meta&gt;`` tags)
336
+ - :dudir:`title` (override document title)
337
+
338
+ * Influencing markup:
339
+
340
+ - :dudir:`default-role` (set a new default role)
341
+ - :dudir:`role` (create a new role)
342
+
343
+ Since these are only per-file, better use Sphinx' facilities for setting the
344
+ :confval:`default_role`.
345
+
346
+ Do *not* use the directives :dudir:`sectnum`, :dudir:`header` and
347
+ :dudir:`footer`.
348
+
349
+ Directives added by Sphinx are described in :ref:`sphinxmarkup`.
350
+
351
+ Basically, a directive consists of a name, arguments, options and content. (Keep
352
+ this terminology in mind, it is used in the next chapter describing custom
353
+ directives.) Looking at this example, ::
354
+
355
+ .. function:: foo(x)
356
+ foo(y, z)
357
+ :module: some.module.name
358
+
359
+ Return a line of text input from the user.
360
+
361
+ ``function`` is the directive name. It is given two arguments here, the
362
+ remainder of the first line and the second line, as well as one option
363
+ ``module`` (as you can see, options are given in the lines immediately following
364
+ the arguments and indicated by the colons). Options must be indented to the
365
+ same level as the directive content.
366
+
367
+ The directive content follows after a blank line and is indented relative to the
368
+ directive start.
369
+
370
+
371
+ Images
372
+ ------
373
+
374
+ reST supports an image directive (:dudir:`ref &lt;image&gt;`), used like so::
375
+
376
+ .. image:: gnu.png
377
+ (options)
378
+
379
+ When used within Sphinx, the file name given (here ``gnu.png``) must either be
380
+ relative to the source file, or absolute which means that they are relative to
381
+ the top source directory. For example, the file ``sketch/spam.rst`` could refer
382
+ to the image ``images/spam.png`` as ``../images/spam.png`` or
383
+ ``/images/spam.png``.
384
+
385
+ Sphinx will automatically copy image files over to a subdirectory of the output
386
+ directory on building (e.g. the ``_static`` directory for HTML output.)
387
+
388
+ Interpretation of image size options (``width`` and ``height``) is as follows:
389
+ if the size has no unit or the unit is pixels, the given size will only be
390
+ respected for output channels that support pixels (i.e. not in LaTeX output).
391
+ Other units (like ``pt`` for points) will be used for HTML and LaTeX output.
392
+
393
+ Sphinx extends the standard docutils behavior by allowing an asterisk for the
394
+ extension::
395
+
396
+ .. image:: gnu.*
397
+
398
+ Sphinx then searches for all images matching the provided pattern and determines
399
+ their type. Each builder then chooses the best image out of these candidates.
400
+ For instance, if the file name ``gnu.*`` was given and two files :file:`gnu.pdf`
401
+ and :file:`gnu.png` existed in the source tree, the LaTeX builder would choose
402
+ the former, while the HTML builder would prefer the latter.
403
+
404
+ .. versionchanged:: 0.4
405
+ Added the support for file names ending in an asterisk.
406
+
407
+ .. versionchanged:: 0.6
408
+ Image paths can now be absolute.
409
+
410
+
411
+ Footnotes
412
+ ---------
413
+
414
+ For footnotes (:duref:`ref &lt;footnotes&gt;`), use ``[#name]_`` to mark the footnote
415
+ location, and add the footnote body at the bottom of the document after a
416
+ "Footnotes" rubric heading, like so::
417
+
418
+ Lorem ipsum [#f1]_ dolor sit amet ... [#f2]_
419
+
420
+ .. rubric:: Footnotes
421
+
422
+ .. [#f1] Text of the first footnote.
423
+ .. [#f2] Text of the second footnote.
424
+
425
+ You can also explicitly number the footnotes (``[1]_``) or use auto-numbered
426
+ footnotes without names (``[#]_``).
427
+
428
+
429
+ Citations
430
+ ---------
431
+
432
+ Standard reST citations (:duref:`ref &lt;citations&gt;`) are supported, with the
433
+ additional feature that they are "global", i.e. all citations can be referenced
434
+ from all files. Use them like so::
435
+
436
+ Lorem ipsum [Ref]_ dolor sit amet.
437
+
438
+ .. [Ref] Book or article reference, URL or whatever.
439
+
440
+ Citation usage is similar to footnote usage, but with a label that is not
441
+ numeric or begins with ``#``.
442
+
443
+
444
+ Substitutions
445
+ -------------
446
+
447
+ reST supports "substitutions" (:duref:`ref &lt;substitution-definitions&gt;`), which
448
+ are pieces of text and/or markup referred to in the text by ``|name|``. They
449
+ are defined like footnotes with explicit markup blocks, like this::
450
+
451
+ .. |name| replace:: replacement *text*
452
+
453
+ or this::
454
+
455
+ .. |caution| image:: warning.png
456
+ :alt: Warning!
457
+
458
+ See the :duref:`reST reference for substitutions &lt;substitution-definitions&gt;`
459
+ for details.
460
+
461
+ If you want to use some substitutions for all documents, put them into
462
+ :confval:`rst_prolog` or put them into a separate file and include it into all
463
+ documents you want to use them in, using the :rst:dir:`include` directive. (Be
464
+ sure to give the include file a file name extension differing from that of other
465
+ source files, to avoid Sphinx finding it as a standalone document.)
466
+
467
+ Sphinx defines some default substitutions, see :ref:`default-substitutions`.
468
+
469
+
470
+ Comments
471
+ --------
472
+
473
+ Every explicit markup block which isn't a valid markup construct (like the
474
+ footnotes above) is regarded as a comment (:duref:`ref &lt;comments&gt;`). For
475
+ example::
476
+
477
+ .. This is a comment.
478
+
479
+ You can indent text after a comment start to form multiline comments::
480
+
481
+ ..
482
+ This whole indented block
483
+ is a comment.
484
+
485
+ Still in the comment.
486
+
487
+
488
+ Source encoding
489
+ ---------------
490
+
491
+ Since the easiest way to include special characters like em dashes or copyright
492
+ signs in reST is to directly write them as Unicode characters, one has to
493
+ specify an encoding. Sphinx assumes source files to be encoded in UTF-8 by
494
+ default; you can change this with the :confval:`source_encoding` config value.
495
+
496
+
497
+ Gotchas
498
+ -------
499
+
500
+ There are some problems one commonly runs into while authoring reST documents:
501
+
502
+ * **Separation of inline markup:** As said above, inline markup spans must be
503
+ separated from the surrounding text by non-word characters, you have to use a
504
+ backslash-escaped space to get around that. See `the reference
505
+ &lt;http://docutils.sf.net/docs/ref/rst/restructuredtext.html#inline-markup&gt;`_
506
+ for the details.
507
+
508
+ * **No nested inline markup:** Something like ``*see :func:`foo`*`` is not
509
+ possible.
510
+
511
+
512
+ .. rubric:: Footnotes
513
+
514
+ .. [1] When the default domain contains a :rst:dir:`class` directive, this directive
515
+ will be shadowed. Therefore, Sphinx re-exports it as :rst:dir:`rst-class`.
516
+ </textarea></form>
517
+
518
+ <script>
519
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
520
+ lineNumbers: true,
521
+ });
522
+ </script>
523
+ <p>
524
+ The <code>python</code> mode will be used for highlighting blocks
525
+ containing Python/IPython terminal sessions: blocks starting with
526
+ <code>&gt;&gt;&gt;</code> (for Python) or <code>In [num]:</code> (for
527
+ IPython).
528
+
529
+ Further, the <code>stex</code> mode will be used for highlighting
530
+ blocks containing LaTex code.
531
+ </p>
532
+
533
+ <p><strong>MIME types defined:</strong> <code>text/x-rst</code>.</p>
534
+ </article>