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,81 @@
1
+ <html xmlns="http://www.w3.org/1999/xhtml">
2
+ <head>
3
+ <meta charset="utf-8">
4
+ <title>CodeMirror: Tiki wiki mode</title>
5
+ <link rel="stylesheet" href="../../lib/codemirror.css">
6
+ <script src="../../lib/codemirror.js"></script>
7
+ <script src="tiki.js"></script>
8
+ <link rel="stylesheet" href="tiki.css">
9
+ <link rel="stylesheet" href="../../doc/docs.css">
10
+ <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
11
+ </head>
12
+ <body style="padding: 20px;">
13
+ <h1>CodeMirror: Tiki wiki mode</h1>
14
+
15
+ <div><textarea id="code" name="code">
16
+ Headings
17
+ !Header 1
18
+ !!Header 2
19
+ !!!Header 3
20
+ !!!!Header 4
21
+ !!!!!Header 5
22
+ !!!!!!Header 6
23
+
24
+ Styling
25
+ -=titlebar=-
26
+ ^^ Box on multi
27
+ lines
28
+ of content^^
29
+ __bold__
30
+ ''italic''
31
+ ===underline===
32
+ ::center::
33
+ --Line Through--
34
+
35
+ Operators
36
+ ~np~No parse~/np~
37
+
38
+ Link
39
+ [link|desc|nocache]
40
+
41
+ Wiki
42
+ ((Wiki))
43
+ ((Wiki|desc))
44
+ ((Wiki|desc|timeout))
45
+
46
+ Table
47
+ ||row1 col1|row1 col2|row1 col3
48
+ row2 col1|row2 col2|row2 col3
49
+ row3 col1|row3 col2|row3 col3||
50
+
51
+ Lists:
52
+ *bla
53
+ **bla-1
54
+ ++continue-bla-1
55
+ ***bla-2
56
+ ++continue-bla-1
57
+ *bla
58
+ +continue-bla
59
+ #bla
60
+ ** tra-la-la
61
+ +continue-bla
62
+ #bla
63
+
64
+ Plugin (standard):
65
+ {PLUGIN(attr="my attr")}
66
+ Plugin Body
67
+ {PLUGIN}
68
+
69
+ Plugin (inline):
70
+ {plugin attr="my attr"}
71
+ </textarea></div>
72
+
73
+ <script type="text/javascript">
74
+ var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
75
+ mode: 'tiki',
76
+ lineNumbers: true
77
+ });
78
+ </script>
79
+
80
+ </body>
81
+ </html>
@@ -0,0 +1,26 @@
1
+ .cm-tw-syntaxerror {
2
+ color: #FFFFFF;
3
+ background-color: #990000;
4
+ }
5
+
6
+ .cm-tw-deleted {
7
+ text-decoration: line-through;
8
+ }
9
+
10
+ .cm-tw-header5 {
11
+ font-weight: bold;
12
+ }
13
+ .cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/
14
+ padding-left: 10px;
15
+ }
16
+
17
+ .cm-tw-box {
18
+ border-top-width: 0px ! important;
19
+ border-style: solid;
20
+ border-width: 1px;
21
+ border-color: inherit;
22
+ }
23
+
24
+ .cm-tw-underline {
25
+ text-decoration: underline;
26
+ }
@@ -0,0 +1,309 @@
1
+ CodeMirror.defineMode('tiki', function(config) {
2
+ function inBlock(style, terminator, returnTokenizer) {
3
+ return function(stream, state) {
4
+ while (!stream.eol()) {
5
+ if (stream.match(terminator)) {
6
+ state.tokenize = inText;
7
+ break;
8
+ }
9
+ stream.next();
10
+ }
11
+
12
+ if (returnTokenizer) state.tokenize = returnTokenizer;
13
+
14
+ return style;
15
+ };
16
+ }
17
+
18
+ function inLine(style) {
19
+ return function(stream, state) {
20
+ while(!stream.eol()) {
21
+ stream.next();
22
+ }
23
+ state.tokenize = inText;
24
+ return style;
25
+ };
26
+ }
27
+
28
+ function inText(stream, state) {
29
+ function chain(parser) {
30
+ state.tokenize = parser;
31
+ return parser(stream, state);
32
+ }
33
+
34
+ var sol = stream.sol();
35
+ var ch = stream.next();
36
+
37
+ //non start of line
38
+ switch (ch) { //switch is generally much faster than if, so it is used here
39
+ case "{": //plugin
40
+ stream.eat("/");
41
+ stream.eatSpace();
42
+ var tagName = "";
43
+ var c;
44
+ while ((c = stream.eat(/[^\s\u00a0=\"\'\/?(}]/))) tagName += c;
45
+ state.tokenize = inPlugin;
46
+ return "tag";
47
+ break;
48
+ case "_": //bold
49
+ if (stream.eat("_")) {
50
+ return chain(inBlock("strong", "__", inText));
51
+ }
52
+ break;
53
+ case "'": //italics
54
+ if (stream.eat("'")) {
55
+ // Italic text
56
+ return chain(inBlock("em", "''", inText));
57
+ }
58
+ break;
59
+ case "(":// Wiki Link
60
+ if (stream.eat("(")) {
61
+ return chain(inBlock("variable-2", "))", inText));
62
+ }
63
+ break;
64
+ case "[":// Weblink
65
+ return chain(inBlock("variable-3", "]", inText));
66
+ break;
67
+ case "|": //table
68
+ if (stream.eat("|")) {
69
+ return chain(inBlock("comment", "||"));
70
+ }
71
+ break;
72
+ case "-":
73
+ if (stream.eat("=")) {//titleBar
74
+ return chain(inBlock("header string", "=-", inText));
75
+ } else if (stream.eat("-")) {//deleted
76
+ return chain(inBlock("error tw-deleted", "--", inText));
77
+ }
78
+ break;
79
+ case "=": //underline
80
+ if (stream.match("==")) {
81
+ return chain(inBlock("tw-underline", "===", inText));
82
+ }
83
+ break;
84
+ case ":":
85
+ if (stream.eat(":")) {
86
+ return chain(inBlock("comment", "::"));
87
+ }
88
+ break;
89
+ case "^": //box
90
+ return chain(inBlock("tw-box", "^"));
91
+ break;
92
+ case "~": //np
93
+ if (stream.match("np~")) {
94
+ return chain(inBlock("meta", "~/np~"));
95
+ }
96
+ break;
97
+ }
98
+
99
+ //start of line types
100
+ if (sol) {
101
+ switch (ch) {
102
+ case "!": //header at start of line
103
+ if (stream.match('!!!!!')) {
104
+ return chain(inLine("header string"));
105
+ } else if (stream.match('!!!!')) {
106
+ return chain(inLine("header string"));
107
+ } else if (stream.match('!!!')) {
108
+ return chain(inLine("header string"));
109
+ } else if (stream.match('!!')) {
110
+ return chain(inLine("header string"));
111
+ } else {
112
+ return chain(inLine("header string"));
113
+ }
114
+ break;
115
+ case "*": //unordered list line item, or <li /> at start of line
116
+ case "#": //ordered list line item, or <li /> at start of line
117
+ case "+": //ordered list line item, or <li /> at start of line
118
+ return chain(inLine("tw-listitem bracket"));
119
+ break;
120
+ }
121
+ }
122
+
123
+ //stream.eatWhile(/[&{]/); was eating up plugins, turned off to act less like html and more like tiki
124
+ return null;
125
+ }
126
+
127
+ var indentUnit = config.indentUnit;
128
+
129
+ // Return variables for tokenizers
130
+ var pluginName, type;
131
+ function inPlugin(stream, state) {
132
+ var ch = stream.next();
133
+ var peek = stream.peek();
134
+
135
+ if (ch == "}") {
136
+ state.tokenize = inText;
137
+ //type = ch == ")" ? "endPlugin" : "selfclosePlugin"; inPlugin
138
+ return "tag";
139
+ } else if (ch == "(" || ch == ")") {
140
+ return "bracket";
141
+ } else if (ch == "=") {
142
+ type = "equals";
143
+
144
+ if (peek == ">") {
145
+ ch = stream.next();
146
+ peek = stream.peek();
147
+ }
148
+
149
+ //here we detect values directly after equal character with no quotes
150
+ if (!/[\'\"]/.test(peek)) {
151
+ state.tokenize = inAttributeNoQuote();
152
+ }
153
+ //end detect values
154
+
155
+ return "operator";
156
+ } else if (/[\'\"]/.test(ch)) {
157
+ state.tokenize = inAttribute(ch);
158
+ return state.tokenize(stream, state);
159
+ } else {
160
+ stream.eatWhile(/[^\s\u00a0=\"\'\/?]/);
161
+ return "keyword";
162
+ }
163
+ }
164
+
165
+ function inAttribute(quote) {
166
+ return function(stream, state) {
167
+ while (!stream.eol()) {
168
+ if (stream.next() == quote) {
169
+ state.tokenize = inPlugin;
170
+ break;
171
+ }
172
+ }
173
+ return "string";
174
+ };
175
+ }
176
+
177
+ function inAttributeNoQuote() {
178
+ return function(stream, state) {
179
+ while (!stream.eol()) {
180
+ var ch = stream.next();
181
+ var peek = stream.peek();
182
+ if (ch == " " || ch == "," || /[ )}]/.test(peek)) {
183
+ state.tokenize = inPlugin;
184
+ break;
185
+ }
186
+ }
187
+ return "string";
188
+ };
189
+ }
190
+
191
+ var curState, setStyle;
192
+ function pass() {
193
+ for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]);
194
+ }
195
+
196
+ function cont() {
197
+ pass.apply(null, arguments);
198
+ return true;
199
+ }
200
+
201
+ function pushContext(pluginName, startOfLine) {
202
+ var noIndent = curState.context && curState.context.noIndent;
203
+ curState.context = {
204
+ prev: curState.context,
205
+ pluginName: pluginName,
206
+ indent: curState.indented,
207
+ startOfLine: startOfLine,
208
+ noIndent: noIndent
209
+ };
210
+ }
211
+
212
+ function popContext() {
213
+ if (curState.context) curState.context = curState.context.prev;
214
+ }
215
+
216
+ function element(type) {
217
+ if (type == "openPlugin") {curState.pluginName = pluginName; return cont(attributes, endplugin(curState.startOfLine));}
218
+ else if (type == "closePlugin") {
219
+ var err = false;
220
+ if (curState.context) {
221
+ err = curState.context.pluginName != pluginName;
222
+ popContext();
223
+ } else {
224
+ err = true;
225
+ }
226
+ if (err) setStyle = "error";
227
+ return cont(endcloseplugin(err));
228
+ }
229
+ else if (type == "string") {
230
+ if (!curState.context || curState.context.name != "!cdata") pushContext("!cdata");
231
+ if (curState.tokenize == inText) popContext();
232
+ return cont();
233
+ }
234
+ else return cont();
235
+ }
236
+
237
+ function endplugin(startOfLine) {
238
+ return function(type) {
239
+ if (
240
+ type == "selfclosePlugin" ||
241
+ type == "endPlugin"
242
+ )
243
+ return cont();
244
+ if (type == "endPlugin") {pushContext(curState.pluginName, startOfLine); return cont();}
245
+ return cont();
246
+ };
247
+ }
248
+
249
+ function endcloseplugin(err) {
250
+ return function(type) {
251
+ if (err) setStyle = "error";
252
+ if (type == "endPlugin") return cont();
253
+ return pass();
254
+ };
255
+ }
256
+
257
+ function attributes(type) {
258
+ if (type == "keyword") {setStyle = "attribute"; return cont(attributes);}
259
+ if (type == "equals") return cont(attvalue, attributes);
260
+ return pass();
261
+ }
262
+ function attvalue(type) {
263
+ if (type == "keyword") {setStyle = "string"; return cont();}
264
+ if (type == "string") return cont(attvaluemaybe);
265
+ return pass();
266
+ }
267
+ function attvaluemaybe(type) {
268
+ if (type == "string") return cont(attvaluemaybe);
269
+ else return pass();
270
+ }
271
+ return {
272
+ startState: function() {
273
+ return {tokenize: inText, cc: [], indented: 0, startOfLine: true, pluginName: null, context: null};
274
+ },
275
+ token: function(stream, state) {
276
+ if (stream.sol()) {
277
+ state.startOfLine = true;
278
+ state.indented = stream.indentation();
279
+ }
280
+ if (stream.eatSpace()) return null;
281
+
282
+ setStyle = type = pluginName = null;
283
+ var style = state.tokenize(stream, state);
284
+ if ((style || type) && style != "comment") {
285
+ curState = state;
286
+ while (true) {
287
+ var comb = state.cc.pop() || element;
288
+ if (comb(type || style)) break;
289
+ }
290
+ }
291
+ state.startOfLine = false;
292
+ return setStyle || style;
293
+ },
294
+ indent: function(state, textAfter) {
295
+ var context = state.context;
296
+ if (context && context.noIndent) return 0;
297
+ if (context && /^{\//.test(textAfter))
298
+ context = context.prev;
299
+ while (context && !context.startOfLine)
300
+ context = context.prev;
301
+ if (context) return context.indent + indentUnit;
302
+ else return 0;
303
+ },
304
+ electricChars: "/"
305
+ };
306
+ });
307
+
308
+ //I figure, why not
309
+ CodeMirror.defineMIME("text/tiki", "tiki");
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2012 Codility Limited, 107 Cheapside, London EC2V 6DN, UK
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,88 @@
1
+ <html>
2
+ <head>
3
+ <meta charset="utf-8">
4
+ <title>CodeMirror: VB.NET mode</title>
5
+ <link rel="stylesheet" href="../../lib/codemirror.css">
6
+ <script src="../../lib/codemirror.js"></script>
7
+ <script src="vb.js"></script>
8
+ <link rel="stylesheet" href="../../doc/docs.css">
9
+ <link href="http://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet" type="text/css">
10
+ <style>
11
+ .CodeMirror {border: 1px solid #aaa; height:210px; height: auto;}
12
+ .CodeMirror-scroll { overflow-x: auto; overflow-y: hidden;}
13
+ .CodeMirror pre { font-family: Inconsolata; font-size: 14px}
14
+ </style>
15
+ <script type="text/javascript" src="../../lib/util/runmode.js"></script>
16
+ </head>
17
+ <body onload="init()">
18
+ <h1>CodeMirror: VB.NET mode</h1>
19
+ <script type="text/javascript">
20
+ function test(golden, text) {
21
+ var ok = true;
22
+ var i = 0;
23
+ function callback(token, style, lineNo, pos){
24
+ //console.log(String(token) + " " + String(style) + " " + String(lineNo) + " " + String(pos));
25
+ var result = [String(token), String(style)];
26
+ if (golden[i][0] != result[0] || golden[i][1] != result[1]){
27
+ return "Error, expected: " + String(golden[i]) + ", got: " + String(result);
28
+ ok = false;
29
+ }
30
+ i++;
31
+ }
32
+ CodeMirror.runMode(text, "text/x-vb",callback);
33
+
34
+ if (ok) return "Tests OK";
35
+ }
36
+ function testTypes() {
37
+ var golden = [['Integer','keyword'],[' ','null'],['Float','keyword']]
38
+ var text = "Integer Float";
39
+ return test(golden,text);
40
+ }
41
+ function testIf(){
42
+ var golden = [['If','keyword'],[' ','null'],['True','keyword'],[' ','null'],['End','keyword'],[' ','null'],['If','keyword']];
43
+ var text = 'If True End If';
44
+ return test(golden, text);
45
+ }
46
+ function testDecl(){
47
+ var golden = [['Dim','keyword'],[' ','null'],['x','variable'],[' ','null'],['as','keyword'],[' ','null'],['Integer','keyword']];
48
+ var text = 'Dim x as Integer';
49
+ return test(golden, text);
50
+ }
51
+ function testAll(){
52
+ var result = "";
53
+
54
+ result += testTypes() + "\n";
55
+ result += testIf() + "\n";
56
+ result += testDecl() + "\n";
57
+ return result;
58
+
59
+ }
60
+ function initText(editor) {
61
+ var content = 'Class rocket\nPrivate quality as Double\nPublic Sub launch() as String\nif quality > 0.8\nlaunch = "Successful"\nElse\nlaunch = "Failed"\nEnd If\nEnd sub\nEnd class\n';
62
+ editor.setValue(content);
63
+ for (var i =0; i< editor.lineCount(); i++) editor.indentLine(i);
64
+ }
65
+ function init() {
66
+ editor = CodeMirror.fromTextArea(document.getElementById("solution"), {
67
+ lineNumbers: true,
68
+ mode: "text/x-vb",
69
+ readOnly: false,
70
+ tabMode: "shift"
71
+ });
72
+ runTest();
73
+ }
74
+ function runTest() {
75
+ document.getElementById('testresult').innerHTML = testAll();
76
+ initText(editor);
77
+
78
+ }
79
+ </script>
80
+
81
+
82
+ <div id="edit">
83
+ <textarea style="width:95%;height:200px;padding:5px;" name="solution" id="solution" ></textarea>
84
+ </div>
85
+ <pre id="testresult"></pre>
86
+ <p>MIME type defined: <code>text/x-vb</code>.</p>
87
+
88
+ </body></html>