swagr 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (359) hide show
  1. data/bin/swagr +15 -0
  2. data/examples/examples01/app.rb +6 -2
  3. data/examples/examples01/coffee/data_port.coffee +2 -0
  4. data/examples/examples01/static/css/codemirror.css +1247 -0
  5. data/examples/examples01/static/js/codemirror-compressed-3-0.js +5 -0
  6. data/examples/examples01/static/js/codemirror/keymap/emacs.js +30 -0
  7. data/examples/examples01/static/js/codemirror/keymap/vim.js +2298 -0
  8. data/examples/examples01/static/js/codemirror/lib/codemirror.css +239 -0
  9. data/examples/examples01/static/js/codemirror/lib/codemirror.js +4553 -0
  10. data/examples/examples01/static/js/codemirror/lib/util/closetag.js +85 -0
  11. data/examples/examples01/static/js/codemirror/lib/util/colorize.js +29 -0
  12. data/examples/examples01/static/js/codemirror/lib/util/continuecomment.js +36 -0
  13. data/examples/examples01/static/js/codemirror/lib/util/continuelist.js +28 -0
  14. data/examples/examples01/static/js/codemirror/lib/util/dialog.css +32 -0
  15. data/examples/examples01/static/js/codemirror/lib/util/dialog.js +75 -0
  16. data/examples/examples01/static/js/codemirror/lib/util/foldcode.js +182 -0
  17. data/examples/examples01/static/js/codemirror/lib/util/formatting.js +108 -0
  18. data/examples/examples01/static/js/codemirror/lib/util/javascript-hint.js +137 -0
  19. data/examples/examples01/static/js/codemirror/lib/util/loadmode.js +51 -0
  20. data/examples/examples01/static/js/codemirror/lib/util/match-highlighter.js +46 -0
  21. data/examples/examples01/static/js/codemirror/lib/util/matchbrackets.js +63 -0
  22. data/examples/examples01/static/js/codemirror/lib/util/multiplex.js +95 -0
  23. data/examples/examples01/static/js/codemirror/lib/util/overlay.js +59 -0
  24. data/examples/examples01/static/js/codemirror/lib/util/pig-hint.js +117 -0
  25. data/examples/examples01/static/js/codemirror/lib/util/runmode-standalone.js +90 -0
  26. data/examples/examples01/static/js/codemirror/lib/util/runmode.js +52 -0
  27. data/examples/examples01/static/js/codemirror/lib/util/search.js +119 -0
  28. data/examples/examples01/static/js/codemirror/lib/util/searchcursor.js +119 -0
  29. data/examples/examples01/static/js/codemirror/lib/util/simple-hint.css +16 -0
  30. data/examples/examples01/static/js/codemirror/lib/util/simple-hint.js +102 -0
  31. data/examples/examples01/static/js/codemirror/lib/util/xml-hint.js +131 -0
  32. data/examples/examples01/static/js/codemirror/mode/clike/clike.js +300 -0
  33. data/examples/examples01/static/js/codemirror/mode/clike/index.html +103 -0
  34. data/examples/examples01/static/js/codemirror/mode/clike/scala.html +767 -0
  35. data/examples/examples01/static/js/codemirror/mode/clojure/clojure.js +206 -0
  36. data/examples/examples01/static/js/codemirror/mode/clojure/index.html +67 -0
  37. data/examples/examples01/static/js/codemirror/mode/coffeescript/LICENSE +22 -0
  38. data/examples/examples01/static/js/codemirror/mode/coffeescript/coffeescript.js +346 -0
  39. data/examples/examples01/static/js/codemirror/mode/coffeescript/index.html +728 -0
  40. data/examples/examples01/static/js/codemirror/mode/commonlisp/commonlisp.js +101 -0
  41. data/examples/examples01/static/js/codemirror/mode/commonlisp/index.html +165 -0
  42. data/examples/examples01/static/js/codemirror/mode/css/css.js +465 -0
  43. data/examples/examples01/static/js/codemirror/mode/css/index.html +58 -0
  44. data/examples/examples01/static/js/codemirror/mode/css/test.js +501 -0
  45. data/examples/examples01/static/js/codemirror/mode/diff/diff.js +32 -0
  46. data/examples/examples01/static/js/codemirror/mode/diff/index.html +105 -0
  47. data/examples/examples01/static/js/codemirror/mode/ecl/ecl.js +192 -0
  48. data/examples/examples01/static/js/codemirror/mode/ecl/index.html +39 -0
  49. data/examples/examples01/static/js/codemirror/mode/erlang/erlang.js +463 -0
  50. data/examples/examples01/static/js/codemirror/mode/erlang/index.html +64 -0
  51. data/examples/examples01/static/js/codemirror/mode/gfm/gfm.js +94 -0
  52. data/examples/examples01/static/js/codemirror/mode/gfm/index.html +70 -0
  53. data/examples/examples01/static/js/codemirror/mode/gfm/test.js +225 -0
  54. data/examples/examples01/static/js/codemirror/mode/go/go.js +165 -0
  55. data/examples/examples01/static/js/codemirror/mode/go/index.html +74 -0
  56. data/examples/examples01/static/js/codemirror/mode/groovy/groovy.js +210 -0
  57. data/examples/examples01/static/js/codemirror/mode/groovy/index.html +73 -0
  58. data/examples/examples01/static/js/codemirror/mode/haskell/haskell.js +242 -0
  59. data/examples/examples01/static/js/codemirror/mode/haskell/index.html +62 -0
  60. data/examples/examples01/static/js/codemirror/mode/haxe/haxe.js +429 -0
  61. data/examples/examples01/static/js/codemirror/mode/haxe/index.html +90 -0
  62. data/examples/examples01/static/js/codemirror/mode/htmlembedded/htmlembedded.js +73 -0
  63. data/examples/examples01/static/js/codemirror/mode/htmlembedded/index.html +49 -0
  64. data/examples/examples01/static/js/codemirror/mode/htmlmixed/htmlmixed.js +84 -0
  65. data/examples/examples01/static/js/codemirror/mode/htmlmixed/index.html +52 -0
  66. data/examples/examples01/static/js/codemirror/mode/http/http.js +98 -0
  67. data/examples/examples01/static/js/codemirror/mode/http/index.html +32 -0
  68. data/examples/examples01/static/js/codemirror/mode/javascript/index.html +88 -0
  69. data/examples/examples01/static/js/codemirror/mode/javascript/javascript.js +411 -0
  70. data/examples/examples01/static/js/codemirror/mode/javascript/typescript.html +48 -0
  71. data/examples/examples01/static/js/codemirror/mode/jinja2/index.html +38 -0
  72. data/examples/examples01/static/js/codemirror/mode/jinja2/jinja2.js +42 -0
  73. data/examples/examples01/static/js/codemirror/mode/less/index.html +741 -0
  74. data/examples/examples01/static/js/codemirror/mode/less/less.js +266 -0
  75. data/examples/examples01/static/js/codemirror/mode/lua/index.html +74 -0
  76. data/examples/examples01/static/js/codemirror/mode/lua/lua.js +140 -0
  77. data/examples/examples01/static/js/codemirror/mode/markdown/index.html +344 -0
  78. data/examples/examples01/static/js/codemirror/mode/markdown/markdown.js +474 -0
  79. data/examples/examples01/static/js/codemirror/mode/markdown/test.js +1266 -0
  80. data/examples/examples01/static/js/codemirror/mode/mysql/index.html +41 -0
  81. data/examples/examples01/static/js/codemirror/mode/mysql/mysql.js +203 -0
  82. data/examples/examples01/static/js/codemirror/mode/ntriples/index.html +33 -0
  83. data/examples/examples01/static/js/codemirror/mode/ntriples/ntriples.js +170 -0
  84. data/examples/examples01/static/js/codemirror/mode/ocaml/index.html +131 -0
  85. data/examples/examples01/static/js/codemirror/mode/ocaml/ocaml.js +113 -0
  86. data/examples/examples01/static/js/codemirror/mode/pascal/LICENSE +7 -0
  87. data/examples/examples01/static/js/codemirror/mode/pascal/index.html +48 -0
  88. data/examples/examples01/static/js/codemirror/mode/pascal/pascal.js +94 -0
  89. data/examples/examples01/static/js/codemirror/mode/perl/LICENSE +19 -0
  90. data/examples/examples01/static/js/codemirror/mode/perl/index.html +62 -0
  91. data/examples/examples01/static/js/codemirror/mode/perl/perl.js +816 -0
  92. data/examples/examples01/static/js/codemirror/mode/php/index.html +51 -0
  93. data/examples/examples01/static/js/codemirror/mode/php/php.js +129 -0
  94. data/examples/examples01/static/js/codemirror/mode/pig/index.html +42 -0
  95. data/examples/examples01/static/js/codemirror/mode/pig/pig.js +171 -0
  96. data/examples/examples01/static/js/codemirror/mode/plsql/index.html +62 -0
  97. data/examples/examples01/static/js/codemirror/mode/plsql/plsql.js +216 -0
  98. data/examples/examples01/static/js/codemirror/mode/properties/index.html +41 -0
  99. data/examples/examples01/static/js/codemirror/mode/properties/properties.js +63 -0
  100. data/examples/examples01/static/js/codemirror/mode/python/LICENSE.txt +21 -0
  101. data/examples/examples01/static/js/codemirror/mode/python/index.html +124 -0
  102. data/examples/examples01/static/js/codemirror/mode/python/python.js +340 -0
  103. data/examples/examples01/static/js/codemirror/mode/r/LICENSE +24 -0
  104. data/examples/examples01/static/js/codemirror/mode/r/index.html +74 -0
  105. data/examples/examples01/static/js/codemirror/mode/r/r.js +141 -0
  106. data/examples/examples01/static/js/codemirror/mode/rpm/changes/changes.js +19 -0
  107. data/examples/examples01/static/js/codemirror/mode/rpm/changes/index.html +53 -0
  108. data/examples/examples01/static/js/codemirror/mode/rpm/spec/index.html +99 -0
  109. data/examples/examples01/static/js/codemirror/mode/rpm/spec/spec.css +5 -0
  110. data/examples/examples01/static/js/codemirror/mode/rpm/spec/spec.js +66 -0
  111. data/examples/examples01/static/js/codemirror/mode/rst/index.html +526 -0
  112. data/examples/examples01/static/js/codemirror/mode/rst/rst.js +314 -0
  113. data/examples/examples01/static/js/codemirror/mode/ruby/LICENSE +24 -0
  114. data/examples/examples01/static/js/codemirror/mode/ruby/index.html +173 -0
  115. data/examples/examples01/static/js/codemirror/mode/ruby/ruby.js +195 -0
  116. data/examples/examples01/static/js/codemirror/mode/rust/index.html +48 -0
  117. data/examples/examples01/static/js/codemirror/mode/rust/rust.js +432 -0
  118. data/examples/examples01/static/js/codemirror/mode/scheme/index.html +65 -0
  119. data/examples/examples01/static/js/codemirror/mode/scheme/scheme.js +230 -0
  120. data/examples/examples01/static/js/codemirror/mode/shell/index.html +51 -0
  121. data/examples/examples01/static/js/codemirror/mode/shell/shell.js +118 -0
  122. data/examples/examples01/static/js/codemirror/mode/sieve/LICENSE +23 -0
  123. data/examples/examples01/static/js/codemirror/mode/sieve/index.html +81 -0
  124. data/examples/examples01/static/js/codemirror/mode/sieve/sieve.js +156 -0
  125. data/examples/examples01/static/js/codemirror/mode/smalltalk/index.html +57 -0
  126. data/examples/examples01/static/js/codemirror/mode/smalltalk/smalltalk.js +139 -0
  127. data/examples/examples01/static/js/codemirror/mode/smarty/index.html +83 -0
  128. data/examples/examples01/static/js/codemirror/mode/smarty/smarty.js +148 -0
  129. data/examples/examples01/static/js/codemirror/mode/sparql/index.html +42 -0
  130. data/examples/examples01/static/js/codemirror/mode/sparql/sparql.js +143 -0
  131. data/examples/examples01/static/js/codemirror/mode/stex/index.html +98 -0
  132. data/examples/examples01/static/js/codemirror/mode/stex/stex.js +175 -0
  133. data/examples/examples01/static/js/codemirror/mode/stex/test.js +343 -0
  134. data/examples/examples01/static/js/codemirror/mode/tiddlywiki/index.html +142 -0
  135. data/examples/examples01/static/js/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
  136. data/examples/examples01/static/js/codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
  137. data/examples/examples01/static/js/codemirror/mode/tiki/index.html +81 -0
  138. data/examples/examples01/static/js/codemirror/mode/tiki/tiki.css +26 -0
  139. data/examples/examples01/static/js/codemirror/mode/tiki/tiki.js +309 -0
  140. data/examples/examples01/static/js/codemirror/mode/vb/LICENSE.txt +21 -0
  141. data/examples/examples01/static/js/codemirror/mode/vb/index.html +88 -0
  142. data/examples/examples01/static/js/codemirror/mode/vb/vb.js +260 -0
  143. data/examples/examples01/static/js/codemirror/mode/vbscript/index.html +42 -0
  144. data/examples/examples01/static/js/codemirror/mode/vbscript/vbscript.js +26 -0
  145. data/examples/examples01/static/js/codemirror/mode/velocity/index.html +103 -0
  146. data/examples/examples01/static/js/codemirror/mode/velocity/velocity.js +144 -0
  147. data/examples/examples01/static/js/codemirror/mode/verilog/index.html +210 -0
  148. data/examples/examples01/static/js/codemirror/mode/verilog/verilog.js +182 -0
  149. data/examples/examples01/static/js/codemirror/mode/xml/index.html +45 -0
  150. data/examples/examples01/static/js/codemirror/mode/xml/xml.js +324 -0
  151. data/examples/examples01/static/js/codemirror/mode/xquery/LICENSE +20 -0
  152. data/examples/examples01/static/js/codemirror/mode/xquery/index.html +221 -0
  153. data/examples/examples01/static/js/codemirror/mode/xquery/test.js +77 -0
  154. data/examples/examples01/static/js/codemirror/mode/xquery/xquery.js +450 -0
  155. data/examples/examples01/static/js/codemirror/mode/yaml/index.html +68 -0
  156. data/examples/examples01/static/js/codemirror/mode/yaml/yaml.js +95 -0
  157. data/examples/examples01/static/js/codemirror/mode/z80/index.html +39 -0
  158. data/examples/examples01/static/js/codemirror/mode/z80/z80.js +113 -0
  159. data/examples/examples01/static/js/codemirror/theme/ambiance-mobile.css +6 -0
  160. data/examples/examples01/static/js/codemirror/theme/ambiance.css +76 -0
  161. data/examples/examples01/static/js/codemirror/theme/blackboard.css +25 -0
  162. data/examples/examples01/static/js/codemirror/theme/cobalt.css +18 -0
  163. data/examples/examples01/static/js/codemirror/theme/eclipse.css +25 -0
  164. data/examples/examples01/static/js/codemirror/theme/elegant.css +10 -0
  165. data/examples/examples01/static/js/codemirror/theme/erlang-dark.css +21 -0
  166. data/examples/examples01/static/js/codemirror/theme/lesser-dark.css +44 -0
  167. data/examples/examples01/static/js/codemirror/theme/monokai.css +28 -0
  168. data/examples/examples01/static/js/codemirror/theme/neat.css +9 -0
  169. data/examples/examples01/static/js/codemirror/theme/night.css +21 -0
  170. data/examples/examples01/static/js/codemirror/theme/rubyblue.css +21 -0
  171. data/examples/examples01/static/js/codemirror/theme/solarized.css +207 -0
  172. data/examples/examples01/static/js/codemirror/theme/twilight.css +26 -0
  173. data/examples/examples01/static/js/codemirror/theme/vibrant-ink.css +27 -0
  174. data/examples/examples01/static/js/codemirror/theme/xq-dark.css +46 -0
  175. data/examples/examples01/static/js/d3.v3.min.js +2 -2
  176. data/examples/examples01/static/test/cm.html +33 -0
  177. data/examples/examples01/views/about.slim +15 -0
  178. data/examples/examples01/views/index.slim +1 -1
  179. data/examples/examples01/views/layout.slim +1 -0
  180. data/examples/examples01/views/layout_cm.slim +17 -0
  181. data/examples/examples01/views/navbar.slim +4 -4
  182. data/lib/swagr/version.rb +1 -1
  183. data/templates/app.rb +4 -0
  184. data/templates/static/js/codemirror/keymap/emacs.js +30 -0
  185. data/templates/static/js/codemirror/keymap/vim.js +2298 -0
  186. data/templates/static/js/codemirror/lib/codemirror.css +239 -0
  187. data/templates/static/js/codemirror/lib/codemirror.js +4553 -0
  188. data/templates/static/js/codemirror/lib/util/closetag.js +85 -0
  189. data/templates/static/js/codemirror/lib/util/colorize.js +29 -0
  190. data/templates/static/js/codemirror/lib/util/continuecomment.js +36 -0
  191. data/templates/static/js/codemirror/lib/util/continuelist.js +28 -0
  192. data/templates/static/js/codemirror/lib/util/dialog.css +32 -0
  193. data/templates/static/js/codemirror/lib/util/dialog.js +75 -0
  194. data/templates/static/js/codemirror/lib/util/foldcode.js +182 -0
  195. data/templates/static/js/codemirror/lib/util/formatting.js +108 -0
  196. data/templates/static/js/codemirror/lib/util/javascript-hint.js +137 -0
  197. data/templates/static/js/codemirror/lib/util/loadmode.js +51 -0
  198. data/templates/static/js/codemirror/lib/util/match-highlighter.js +46 -0
  199. data/templates/static/js/codemirror/lib/util/matchbrackets.js +63 -0
  200. data/templates/static/js/codemirror/lib/util/multiplex.js +95 -0
  201. data/templates/static/js/codemirror/lib/util/overlay.js +59 -0
  202. data/templates/static/js/codemirror/lib/util/pig-hint.js +117 -0
  203. data/templates/static/js/codemirror/lib/util/runmode-standalone.js +90 -0
  204. data/templates/static/js/codemirror/lib/util/runmode.js +52 -0
  205. data/templates/static/js/codemirror/lib/util/search.js +119 -0
  206. data/templates/static/js/codemirror/lib/util/searchcursor.js +119 -0
  207. data/templates/static/js/codemirror/lib/util/simple-hint.css +16 -0
  208. data/templates/static/js/codemirror/lib/util/simple-hint.js +102 -0
  209. data/templates/static/js/codemirror/lib/util/xml-hint.js +131 -0
  210. data/templates/static/js/codemirror/mode/clike/clike.js +300 -0
  211. data/templates/static/js/codemirror/mode/clike/index.html +103 -0
  212. data/templates/static/js/codemirror/mode/clike/scala.html +767 -0
  213. data/templates/static/js/codemirror/mode/clojure/clojure.js +206 -0
  214. data/templates/static/js/codemirror/mode/clojure/index.html +67 -0
  215. data/templates/static/js/codemirror/mode/coffeescript/LICENSE +22 -0
  216. data/templates/static/js/codemirror/mode/coffeescript/coffeescript.js +346 -0
  217. data/templates/static/js/codemirror/mode/coffeescript/index.html +728 -0
  218. data/templates/static/js/codemirror/mode/commonlisp/commonlisp.js +101 -0
  219. data/templates/static/js/codemirror/mode/commonlisp/index.html +165 -0
  220. data/templates/static/js/codemirror/mode/css/css.js +465 -0
  221. data/templates/static/js/codemirror/mode/css/index.html +58 -0
  222. data/templates/static/js/codemirror/mode/css/test.js +501 -0
  223. data/templates/static/js/codemirror/mode/diff/diff.js +32 -0
  224. data/templates/static/js/codemirror/mode/diff/index.html +105 -0
  225. data/templates/static/js/codemirror/mode/ecl/ecl.js +192 -0
  226. data/templates/static/js/codemirror/mode/ecl/index.html +39 -0
  227. data/templates/static/js/codemirror/mode/erlang/erlang.js +463 -0
  228. data/templates/static/js/codemirror/mode/erlang/index.html +64 -0
  229. data/templates/static/js/codemirror/mode/gfm/gfm.js +94 -0
  230. data/templates/static/js/codemirror/mode/gfm/index.html +70 -0
  231. data/templates/static/js/codemirror/mode/gfm/test.js +225 -0
  232. data/templates/static/js/codemirror/mode/go/go.js +165 -0
  233. data/templates/static/js/codemirror/mode/go/index.html +74 -0
  234. data/templates/static/js/codemirror/mode/groovy/groovy.js +210 -0
  235. data/templates/static/js/codemirror/mode/groovy/index.html +73 -0
  236. data/templates/static/js/codemirror/mode/haskell/haskell.js +242 -0
  237. data/templates/static/js/codemirror/mode/haskell/index.html +62 -0
  238. data/templates/static/js/codemirror/mode/haxe/haxe.js +429 -0
  239. data/templates/static/js/codemirror/mode/haxe/index.html +90 -0
  240. data/templates/static/js/codemirror/mode/htmlembedded/htmlembedded.js +73 -0
  241. data/templates/static/js/codemirror/mode/htmlembedded/index.html +49 -0
  242. data/templates/static/js/codemirror/mode/htmlmixed/htmlmixed.js +84 -0
  243. data/templates/static/js/codemirror/mode/htmlmixed/index.html +52 -0
  244. data/templates/static/js/codemirror/mode/http/http.js +98 -0
  245. data/templates/static/js/codemirror/mode/http/index.html +32 -0
  246. data/templates/static/js/codemirror/mode/javascript/index.html +88 -0
  247. data/templates/static/js/codemirror/mode/javascript/javascript.js +411 -0
  248. data/templates/static/js/codemirror/mode/javascript/typescript.html +48 -0
  249. data/templates/static/js/codemirror/mode/jinja2/index.html +38 -0
  250. data/templates/static/js/codemirror/mode/jinja2/jinja2.js +42 -0
  251. data/templates/static/js/codemirror/mode/less/index.html +741 -0
  252. data/templates/static/js/codemirror/mode/less/less.js +266 -0
  253. data/templates/static/js/codemirror/mode/lua/index.html +74 -0
  254. data/templates/static/js/codemirror/mode/lua/lua.js +140 -0
  255. data/templates/static/js/codemirror/mode/markdown/index.html +344 -0
  256. data/templates/static/js/codemirror/mode/markdown/markdown.js +474 -0
  257. data/templates/static/js/codemirror/mode/markdown/test.js +1266 -0
  258. data/templates/static/js/codemirror/mode/mysql/index.html +41 -0
  259. data/templates/static/js/codemirror/mode/mysql/mysql.js +203 -0
  260. data/templates/static/js/codemirror/mode/ntriples/index.html +33 -0
  261. data/templates/static/js/codemirror/mode/ntriples/ntriples.js +170 -0
  262. data/templates/static/js/codemirror/mode/ocaml/index.html +131 -0
  263. data/templates/static/js/codemirror/mode/ocaml/ocaml.js +113 -0
  264. data/templates/static/js/codemirror/mode/pascal/LICENSE +7 -0
  265. data/templates/static/js/codemirror/mode/pascal/index.html +48 -0
  266. data/templates/static/js/codemirror/mode/pascal/pascal.js +94 -0
  267. data/templates/static/js/codemirror/mode/perl/LICENSE +19 -0
  268. data/templates/static/js/codemirror/mode/perl/index.html +62 -0
  269. data/templates/static/js/codemirror/mode/perl/perl.js +816 -0
  270. data/templates/static/js/codemirror/mode/php/index.html +51 -0
  271. data/templates/static/js/codemirror/mode/php/php.js +129 -0
  272. data/templates/static/js/codemirror/mode/pig/index.html +42 -0
  273. data/templates/static/js/codemirror/mode/pig/pig.js +171 -0
  274. data/templates/static/js/codemirror/mode/plsql/index.html +62 -0
  275. data/templates/static/js/codemirror/mode/plsql/plsql.js +216 -0
  276. data/templates/static/js/codemirror/mode/properties/index.html +41 -0
  277. data/templates/static/js/codemirror/mode/properties/properties.js +63 -0
  278. data/templates/static/js/codemirror/mode/python/LICENSE.txt +21 -0
  279. data/templates/static/js/codemirror/mode/python/index.html +124 -0
  280. data/templates/static/js/codemirror/mode/python/python.js +340 -0
  281. data/templates/static/js/codemirror/mode/r/LICENSE +24 -0
  282. data/templates/static/js/codemirror/mode/r/index.html +74 -0
  283. data/templates/static/js/codemirror/mode/r/r.js +141 -0
  284. data/templates/static/js/codemirror/mode/rpm/changes/changes.js +19 -0
  285. data/templates/static/js/codemirror/mode/rpm/changes/index.html +53 -0
  286. data/templates/static/js/codemirror/mode/rpm/spec/index.html +99 -0
  287. data/templates/static/js/codemirror/mode/rpm/spec/spec.css +5 -0
  288. data/templates/static/js/codemirror/mode/rpm/spec/spec.js +66 -0
  289. data/templates/static/js/codemirror/mode/rst/index.html +526 -0
  290. data/templates/static/js/codemirror/mode/rst/rst.js +314 -0
  291. data/templates/static/js/codemirror/mode/ruby/LICENSE +24 -0
  292. data/templates/static/js/codemirror/mode/ruby/index.html +173 -0
  293. data/templates/static/js/codemirror/mode/ruby/ruby.js +195 -0
  294. data/templates/static/js/codemirror/mode/rust/index.html +48 -0
  295. data/templates/static/js/codemirror/mode/rust/rust.js +432 -0
  296. data/templates/static/js/codemirror/mode/scheme/index.html +65 -0
  297. data/templates/static/js/codemirror/mode/scheme/scheme.js +230 -0
  298. data/templates/static/js/codemirror/mode/shell/index.html +51 -0
  299. data/templates/static/js/codemirror/mode/shell/shell.js +118 -0
  300. data/templates/static/js/codemirror/mode/sieve/LICENSE +23 -0
  301. data/templates/static/js/codemirror/mode/sieve/index.html +81 -0
  302. data/templates/static/js/codemirror/mode/sieve/sieve.js +156 -0
  303. data/templates/static/js/codemirror/mode/smalltalk/index.html +57 -0
  304. data/templates/static/js/codemirror/mode/smalltalk/smalltalk.js +139 -0
  305. data/templates/static/js/codemirror/mode/smarty/index.html +83 -0
  306. data/templates/static/js/codemirror/mode/smarty/smarty.js +148 -0
  307. data/templates/static/js/codemirror/mode/sparql/index.html +42 -0
  308. data/templates/static/js/codemirror/mode/sparql/sparql.js +143 -0
  309. data/templates/static/js/codemirror/mode/stex/index.html +98 -0
  310. data/templates/static/js/codemirror/mode/stex/stex.js +175 -0
  311. data/templates/static/js/codemirror/mode/stex/test.js +343 -0
  312. data/templates/static/js/codemirror/mode/tiddlywiki/index.html +142 -0
  313. data/templates/static/js/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
  314. data/templates/static/js/codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
  315. data/templates/static/js/codemirror/mode/tiki/index.html +81 -0
  316. data/templates/static/js/codemirror/mode/tiki/tiki.css +26 -0
  317. data/templates/static/js/codemirror/mode/tiki/tiki.js +309 -0
  318. data/templates/static/js/codemirror/mode/vb/LICENSE.txt +21 -0
  319. data/templates/static/js/codemirror/mode/vb/index.html +88 -0
  320. data/templates/static/js/codemirror/mode/vb/vb.js +260 -0
  321. data/templates/static/js/codemirror/mode/vbscript/index.html +42 -0
  322. data/templates/static/js/codemirror/mode/vbscript/vbscript.js +26 -0
  323. data/templates/static/js/codemirror/mode/velocity/index.html +103 -0
  324. data/templates/static/js/codemirror/mode/velocity/velocity.js +144 -0
  325. data/templates/static/js/codemirror/mode/verilog/index.html +210 -0
  326. data/templates/static/js/codemirror/mode/verilog/verilog.js +182 -0
  327. data/templates/static/js/codemirror/mode/xml/index.html +45 -0
  328. data/templates/static/js/codemirror/mode/xml/xml.js +324 -0
  329. data/templates/static/js/codemirror/mode/xquery/LICENSE +20 -0
  330. data/templates/static/js/codemirror/mode/xquery/index.html +221 -0
  331. data/templates/static/js/codemirror/mode/xquery/test.js +77 -0
  332. data/templates/static/js/codemirror/mode/xquery/xquery.js +450 -0
  333. data/templates/static/js/codemirror/mode/yaml/index.html +68 -0
  334. data/templates/static/js/codemirror/mode/yaml/yaml.js +95 -0
  335. data/templates/static/js/codemirror/mode/z80/index.html +39 -0
  336. data/templates/static/js/codemirror/mode/z80/z80.js +113 -0
  337. data/templates/static/js/codemirror/theme/ambiance-mobile.css +6 -0
  338. data/templates/static/js/codemirror/theme/ambiance.css +76 -0
  339. data/templates/static/js/codemirror/theme/blackboard.css +25 -0
  340. data/templates/static/js/codemirror/theme/cobalt.css +18 -0
  341. data/templates/static/js/codemirror/theme/eclipse.css +25 -0
  342. data/templates/static/js/codemirror/theme/elegant.css +10 -0
  343. data/templates/static/js/codemirror/theme/erlang-dark.css +21 -0
  344. data/templates/static/js/codemirror/theme/lesser-dark.css +44 -0
  345. data/templates/static/js/codemirror/theme/monokai.css +28 -0
  346. data/templates/static/js/codemirror/theme/neat.css +9 -0
  347. data/templates/static/js/codemirror/theme/night.css +21 -0
  348. data/templates/static/js/codemirror/theme/rubyblue.css +21 -0
  349. data/templates/static/js/codemirror/theme/solarized.css +207 -0
  350. data/templates/static/js/codemirror/theme/twilight.css +26 -0
  351. data/templates/static/js/codemirror/theme/vibrant-ink.css +27 -0
  352. data/templates/static/js/codemirror/theme/xq-dark.css +46 -0
  353. data/templates/static/js/d3.v3.min.js +2 -2
  354. data/templates/static/test/cm.html +33 -0
  355. data/templates/views/about.slim +15 -0
  356. data/templates/views/index.slim +1 -1
  357. data/templates/views/layout.slim +1 -0
  358. data/templates/views/navbar.slim +4 -4
  359. metadata +347 -2
@@ -0,0 +1,314 @@
1
+ CodeMirror.defineMode('rst', function(config, options) {
2
+ function setState(state, fn, ctx) {
3
+ state.fn = fn;
4
+ setCtx(state, ctx);
5
+ }
6
+
7
+ function setCtx(state, ctx) {
8
+ state.ctx = ctx || {};
9
+ }
10
+
11
+ function setNormal(state, ch) {
12
+ if (ch && (typeof ch !== 'string')) {
13
+ var str = ch.current();
14
+ ch = str[str.length-1];
15
+ }
16
+
17
+ setState(state, normal, {back: ch});
18
+ }
19
+
20
+ function hasMode(mode) {
21
+ return mode && CodeMirror.modes.hasOwnProperty(mode);
22
+ }
23
+
24
+ function getMode(mode) {
25
+ if (hasMode(mode)) {
26
+ return CodeMirror.getMode(config, mode);
27
+ } else {
28
+ return null;
29
+ }
30
+ }
31
+
32
+ var verbatimMode = getMode(options.verbatim);
33
+ var pythonMode = getMode('python');
34
+
35
+ var reSection = /^[!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~]/;
36
+ var reDirective = /^\s*\w([-:.\w]*\w)?::(\s|$)/;
37
+ var reHyperlink = /^\s*_[\w-]+:(\s|$)/;
38
+ var reFootnote = /^\s*\[(\d+|#)\](\s|$)/;
39
+ var reCitation = /^\s*\[[A-Za-z][\w-]*\](\s|$)/;
40
+ var reFootnoteRef = /^\[(\d+|#)\]_/;
41
+ var reCitationRef = /^\[[A-Za-z][\w-]*\]_/;
42
+ var reDirectiveMarker = /^\.\.(\s|$)/;
43
+ var reVerbatimMarker = /^::\s*$/;
44
+ var rePreInline = /^[-\s"([{</:]/;
45
+ var rePostInline = /^[-\s`'")\]}>/:.,;!?\\_]/;
46
+ var reExamples = /^\s+(>>>|In \[\d+\]:)\s/;
47
+
48
+ function normal(stream, state) {
49
+ var ch, sol, i;
50
+
51
+ if (stream.eat(/\\/)) {
52
+ ch = stream.next();
53
+ setNormal(state, ch);
54
+ return null;
55
+ }
56
+
57
+ sol = stream.sol();
58
+
59
+ if (sol && (ch = stream.eat(reSection))) {
60
+ for (i = 0; stream.eat(ch); i++);
61
+
62
+ if (i >= 3 && stream.match(/^\s*$/)) {
63
+ setNormal(state, null);
64
+ return 'header';
65
+ } else {
66
+ stream.backUp(i + 1);
67
+ }
68
+ }
69
+
70
+ if (sol && stream.match(reDirectiveMarker)) {
71
+ if (!stream.eol()) {
72
+ setState(state, directive);
73
+ }
74
+ return 'meta';
75
+ }
76
+
77
+ if (stream.match(reVerbatimMarker)) {
78
+ if (!verbatimMode) {
79
+ setState(state, verbatim);
80
+ } else {
81
+ var mode = verbatimMode;
82
+
83
+ setState(state, verbatim, {
84
+ mode: mode,
85
+ local: mode.startState()
86
+ });
87
+ }
88
+ return 'meta';
89
+ }
90
+
91
+ if (sol && stream.match(reExamples, false)) {
92
+ if (!pythonMode) {
93
+ setState(state, verbatim);
94
+ return 'meta';
95
+ } else {
96
+ var mode = pythonMode;
97
+
98
+ setState(state, verbatim, {
99
+ mode: mode,
100
+ local: mode.startState()
101
+ });
102
+
103
+ return null;
104
+ }
105
+ }
106
+
107
+ function testBackward(re) {
108
+ return sol || !state.ctx.back || re.test(state.ctx.back);
109
+ }
110
+
111
+ function testForward(re) {
112
+ return stream.eol() || stream.match(re, false);
113
+ }
114
+
115
+ function testInline(re) {
116
+ return stream.match(re) && testBackward(/\W/) && testForward(/\W/);
117
+ }
118
+
119
+ if (testInline(reFootnoteRef)) {
120
+ setNormal(state, stream);
121
+ return 'footnote';
122
+ }
123
+
124
+ if (testInline(reCitationRef)) {
125
+ setNormal(state, stream);
126
+ return 'citation';
127
+ }
128
+
129
+ ch = stream.next();
130
+
131
+ if (testBackward(rePreInline)) {
132
+ if ((ch === ':' || ch === '|') && stream.eat(/\S/)) {
133
+ var token;
134
+
135
+ if (ch === ':') {
136
+ token = 'builtin';
137
+ } else {
138
+ token = 'atom';
139
+ }
140
+
141
+ setState(state, inline, {
142
+ ch: ch,
143
+ wide: false,
144
+ prev: null,
145
+ token: token
146
+ });
147
+
148
+ return token;
149
+ }
150
+
151
+ if (ch === '*' || ch === '`') {
152
+ var orig = ch,
153
+ wide = false;
154
+
155
+ ch = stream.next();
156
+
157
+ if (ch == orig) {
158
+ wide = true;
159
+ ch = stream.next();
160
+ }
161
+
162
+ if (ch && !/\s/.test(ch)) {
163
+ var token;
164
+
165
+ if (orig === '*') {
166
+ token = wide ? 'strong' : 'em';
167
+ } else {
168
+ token = wide ? 'string' : 'string-2';
169
+ }
170
+
171
+ setState(state, inline, {
172
+ ch: orig, // inline() has to know what to search for
173
+ wide: wide, // are we looking for `ch` or `chch`
174
+ prev: null, // terminator must not be preceeded with whitespace
175
+ token: token // I don't want to recompute this all the time
176
+ });
177
+
178
+ return token;
179
+ }
180
+ }
181
+ }
182
+
183
+ setNormal(state, ch);
184
+ return null;
185
+ }
186
+
187
+ function inline(stream, state) {
188
+ var ch = stream.next(),
189
+ token = state.ctx.token;
190
+
191
+ function finish(ch) {
192
+ state.ctx.prev = ch;
193
+ return token;
194
+ }
195
+
196
+ if (ch != state.ctx.ch) {
197
+ return finish(ch);
198
+ }
199
+
200
+ if (/\s/.test(state.ctx.prev)) {
201
+ return finish(ch);
202
+ }
203
+
204
+ if (state.ctx.wide) {
205
+ ch = stream.next();
206
+
207
+ if (ch != state.ctx.ch) {
208
+ return finish(ch);
209
+ }
210
+ }
211
+
212
+ if (!stream.eol() && !rePostInline.test(stream.peek())) {
213
+ if (state.ctx.wide) {
214
+ stream.backUp(1);
215
+ }
216
+
217
+ return finish(ch);
218
+ }
219
+
220
+ setState(state, normal);
221
+ setNormal(state, ch);
222
+
223
+ return token;
224
+ }
225
+
226
+ function directive(stream, state) {
227
+ var token = null;
228
+
229
+ if (stream.match(reDirective)) {
230
+ token = 'attribute';
231
+ } else if (stream.match(reHyperlink)) {
232
+ token = 'link';
233
+ } else if (stream.match(reFootnote)) {
234
+ token = 'quote';
235
+ } else if (stream.match(reCitation)) {
236
+ token = 'quote';
237
+ } else {
238
+ stream.eatSpace();
239
+
240
+ if (stream.eol()) {
241
+ setNormal(state, stream);
242
+ return null;
243
+ } else {
244
+ stream.skipToEnd();
245
+ setState(state, comment);
246
+ return 'comment';
247
+ }
248
+ }
249
+
250
+ // FIXME this is unreachable
251
+ setState(state, body, {start: true});
252
+ return token;
253
+ }
254
+
255
+ function body(stream, state) {
256
+ var token = 'body';
257
+
258
+ if (!state.ctx.start || stream.sol()) {
259
+ return block(stream, state, token);
260
+ }
261
+
262
+ stream.skipToEnd();
263
+ setCtx(state);
264
+
265
+ return token;
266
+ }
267
+
268
+ function comment(stream, state) {
269
+ return block(stream, state, 'comment');
270
+ }
271
+
272
+ function verbatim(stream, state) {
273
+ if (!verbatimMode) {
274
+ return block(stream, state, 'meta');
275
+ } else {
276
+ if (stream.sol()) {
277
+ if (!stream.eatSpace()) {
278
+ setNormal(state, stream);
279
+ }
280
+
281
+ return null;
282
+ }
283
+
284
+ return verbatimMode.token(stream, state.ctx.local);
285
+ }
286
+ }
287
+
288
+ function block(stream, state, token) {
289
+ if (stream.eol() || stream.eatSpace()) {
290
+ stream.skipToEnd();
291
+ return token;
292
+ } else {
293
+ setNormal(state, stream);
294
+ return null;
295
+ }
296
+ }
297
+
298
+ return {
299
+ startState: function() {
300
+ return {fn: normal, ctx: {}};
301
+ },
302
+
303
+ copyState: function(state) {
304
+ return {fn: state.fn, ctx: state.ctx};
305
+ },
306
+
307
+ token: function(stream, state) {
308
+ var token = state.fn(stream, state);
309
+ return token;
310
+ }
311
+ };
312
+ }, "python");
313
+
314
+ CodeMirror.defineMIME("text/x-rst", "rst");
@@ -0,0 +1,24 @@
1
+ Copyright (c) 2011, Ubalo, Inc.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without
5
+ modification, are permitted provided that the following conditions are met:
6
+ * Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ * Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+ * Neither the name of the Ubalo, Inc. nor the names of its
12
+ contributors may be used to endorse or promote products derived
13
+ from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
+ DISCLAIMED. IN NO EVENT SHALL UBALO, INC BE LIABLE FOR ANY
19
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,173 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>CodeMirror: Ruby mode</title>
6
+ <link rel="stylesheet" href="../../lib/codemirror.css">
7
+ <script src="../../lib/codemirror.js"></script>
8
+ <script src="../../lib/util/matchbrackets.js"></script>
9
+ <script src="ruby.js"></script>
10
+ <style>
11
+ .CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
12
+ .cm-s-default span.cm-arrow { color: red; }
13
+ </style>
14
+ <link rel="stylesheet" href="../../doc/docs.css">
15
+ </head>
16
+ <body>
17
+ <h1>CodeMirror: Ruby mode</h1>
18
+ <form><textarea id="code" name="code">
19
+ # Code from http://sandbox.mc.edu/~bennet/ruby/code/poly_rb.html
20
+ #
21
+ # This program evaluates polynomials. It first asks for the coefficients
22
+ # of a polynomial, which must be entered on one line, highest-order first.
23
+ # It then requests values of x and will compute the value of the poly for
24
+ # each x. It will repeatly ask for x values, unless you the user enters
25
+ # a blank line. It that case, it will ask for another polynomial. If the
26
+ # user types quit for either input, the program immediately exits.
27
+ #
28
+
29
+ #
30
+ # Function to evaluate a polynomial at x. The polynomial is given
31
+ # as a list of coefficients, from the greatest to the least.
32
+ def polyval(x, coef)
33
+ sum = 0
34
+ coef = coef.clone # Don't want to destroy the original
35
+ while true
36
+ sum += coef.shift # Add and remove the next coef
37
+ break if coef.empty? # If no more, done entirely.
38
+ sum *= x # This happens the right number of times.
39
+ end
40
+ return sum
41
+ end
42
+
43
+ #
44
+ # Function to read a line containing a list of integers and return
45
+ # them as an array of integers. If the string conversion fails, it
46
+ # throws TypeError. If the input line is the word 'quit', then it
47
+ # converts it to an end-of-file exception
48
+ def readints(prompt)
49
+ # Read a line
50
+ print prompt
51
+ line = readline.chomp
52
+ raise EOFError.new if line == 'quit' # You can also use a real EOF.
53
+
54
+ # Go through each item on the line, converting each one and adding it
55
+ # to retval.
56
+ retval = [ ]
57
+ for str in line.split(/\s+/)
58
+ if str =~ /^\-?\d+$/
59
+ retval.push(str.to_i)
60
+ else
61
+ raise TypeError.new
62
+ end
63
+ end
64
+
65
+ return retval
66
+ end
67
+
68
+ #
69
+ # Take a coeff and an exponent and return the string representation, ignoring
70
+ # the sign of the coefficient.
71
+ def term_to_str(coef, exp)
72
+ ret = ""
73
+
74
+ # Show coeff, unless it's 1 or at the right
75
+ coef = coef.abs
76
+ ret = coef.to_s unless coef == 1 && exp > 0
77
+ ret += "x" if exp > 0 # x if exponent not 0
78
+ ret += "^" + exp.to_s if exp > 1 # ^exponent, if > 1.
79
+
80
+ return ret
81
+ end
82
+
83
+ #
84
+ # Create a string of the polynomial in sort-of-readable form.
85
+ def polystr(p)
86
+ # Get the exponent of first coefficient, plus 1.
87
+ exp = p.length
88
+
89
+ # Assign exponents to each term, making pairs of coeff and exponent,
90
+ # Then get rid of the zero terms.
91
+ p = (p.map { |c| exp -= 1; [ c, exp ] }).select { |p| p[0] != 0 }
92
+
93
+ # If there's nothing left, it's a zero
94
+ return "0" if p.empty?
95
+
96
+ # *** Now p is a non-empty list of [ coef, exponent ] pairs. ***
97
+
98
+ # Convert the first term, preceded by a "-" if it's negative.
99
+ result = (if p[0][0] < 0 then "-" else "" end) + term_to_str(*p[0])
100
+
101
+ # Convert the rest of the terms, in each case adding the appropriate
102
+ # + or - separating them.
103
+ for term in p[1...p.length]
104
+ # Add the separator then the rep. of the term.
105
+ result += (if term[0] < 0 then " - " else " + " end) +
106
+ term_to_str(*term)
107
+ end
108
+
109
+ return result
110
+ end
111
+
112
+ #
113
+ # Run until some kind of endfile.
114
+ begin
115
+ # Repeat until an exception or quit gets us out.
116
+ while true
117
+ # Read a poly until it works. An EOF will except out of the
118
+ # program.
119
+ print "\n"
120
+ begin
121
+ poly = readints("Enter a polynomial coefficients: ")
122
+ rescue TypeError
123
+ print "Try again.\n"
124
+ retry
125
+ end
126
+ break if poly.empty?
127
+
128
+ # Read and evaluate x values until the user types a blank line.
129
+ # Again, an EOF will except out of the pgm.
130
+ while true
131
+ # Request an integer.
132
+ print "Enter x value or blank line: "
133
+ x = readline.chomp
134
+ break if x == ''
135
+ raise EOFError.new if x == 'quit'
136
+
137
+ # If it looks bad, let's try again.
138
+ if x !~ /^\-?\d+$/
139
+ print "That doesn't look like an integer. Please try again.\n"
140
+ next
141
+ end
142
+
143
+ # Convert to an integer and print the result.
144
+ x = x.to_i
145
+ print "p(x) = ", polystr(poly), "\n"
146
+ print "p(", x, ") = ", polyval(x, poly), "\n"
147
+ end
148
+ end
149
+ rescue EOFError
150
+ print "\n=== EOF ===\n"
151
+ rescue Interrupt, SignalException
152
+ print "\n=== Interrupted ===\n"
153
+ else
154
+ print "--- Bye ---\n"
155
+ end
156
+ </textarea></form>
157
+ <script>
158
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
159
+ mode: "text/x-ruby",
160
+ tabMode: "indent",
161
+ matchBrackets: true,
162
+ indentUnit: 4
163
+ });
164
+ </script>
165
+
166
+ <p><strong>MIME types defined:</strong> <code>text/x-ruby</code>.</p>
167
+
168
+ <p>Development of the CodeMirror Ruby mode was kindly sponsored
169
+ by <a href="http://ubalo.com/">Ubalo</a>, who hold
170
+ the <a href="LICENSE">license</a>.</p>
171
+
172
+ </body>
173
+ </html>