swagr 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/swagr +15 -0
- data/examples/examples01/app.rb +6 -2
- data/examples/examples01/coffee/data_port.coffee +2 -0
- data/examples/examples01/static/css/codemirror.css +1247 -0
- data/examples/examples01/static/js/codemirror-compressed-3-0.js +5 -0
- data/examples/examples01/static/js/codemirror/keymap/emacs.js +30 -0
- data/examples/examples01/static/js/codemirror/keymap/vim.js +2298 -0
- data/examples/examples01/static/js/codemirror/lib/codemirror.css +239 -0
- data/examples/examples01/static/js/codemirror/lib/codemirror.js +4553 -0
- data/examples/examples01/static/js/codemirror/lib/util/closetag.js +85 -0
- data/examples/examples01/static/js/codemirror/lib/util/colorize.js +29 -0
- data/examples/examples01/static/js/codemirror/lib/util/continuecomment.js +36 -0
- data/examples/examples01/static/js/codemirror/lib/util/continuelist.js +28 -0
- data/examples/examples01/static/js/codemirror/lib/util/dialog.css +32 -0
- data/examples/examples01/static/js/codemirror/lib/util/dialog.js +75 -0
- data/examples/examples01/static/js/codemirror/lib/util/foldcode.js +182 -0
- data/examples/examples01/static/js/codemirror/lib/util/formatting.js +108 -0
- data/examples/examples01/static/js/codemirror/lib/util/javascript-hint.js +137 -0
- data/examples/examples01/static/js/codemirror/lib/util/loadmode.js +51 -0
- data/examples/examples01/static/js/codemirror/lib/util/match-highlighter.js +46 -0
- data/examples/examples01/static/js/codemirror/lib/util/matchbrackets.js +63 -0
- data/examples/examples01/static/js/codemirror/lib/util/multiplex.js +95 -0
- data/examples/examples01/static/js/codemirror/lib/util/overlay.js +59 -0
- data/examples/examples01/static/js/codemirror/lib/util/pig-hint.js +117 -0
- data/examples/examples01/static/js/codemirror/lib/util/runmode-standalone.js +90 -0
- data/examples/examples01/static/js/codemirror/lib/util/runmode.js +52 -0
- data/examples/examples01/static/js/codemirror/lib/util/search.js +119 -0
- data/examples/examples01/static/js/codemirror/lib/util/searchcursor.js +119 -0
- data/examples/examples01/static/js/codemirror/lib/util/simple-hint.css +16 -0
- data/examples/examples01/static/js/codemirror/lib/util/simple-hint.js +102 -0
- data/examples/examples01/static/js/codemirror/lib/util/xml-hint.js +131 -0
- data/examples/examples01/static/js/codemirror/mode/clike/clike.js +300 -0
- data/examples/examples01/static/js/codemirror/mode/clike/index.html +103 -0
- data/examples/examples01/static/js/codemirror/mode/clike/scala.html +767 -0
- data/examples/examples01/static/js/codemirror/mode/clojure/clojure.js +206 -0
- data/examples/examples01/static/js/codemirror/mode/clojure/index.html +67 -0
- data/examples/examples01/static/js/codemirror/mode/coffeescript/LICENSE +22 -0
- data/examples/examples01/static/js/codemirror/mode/coffeescript/coffeescript.js +346 -0
- data/examples/examples01/static/js/codemirror/mode/coffeescript/index.html +728 -0
- data/examples/examples01/static/js/codemirror/mode/commonlisp/commonlisp.js +101 -0
- data/examples/examples01/static/js/codemirror/mode/commonlisp/index.html +165 -0
- data/examples/examples01/static/js/codemirror/mode/css/css.js +465 -0
- data/examples/examples01/static/js/codemirror/mode/css/index.html +58 -0
- data/examples/examples01/static/js/codemirror/mode/css/test.js +501 -0
- data/examples/examples01/static/js/codemirror/mode/diff/diff.js +32 -0
- data/examples/examples01/static/js/codemirror/mode/diff/index.html +105 -0
- data/examples/examples01/static/js/codemirror/mode/ecl/ecl.js +192 -0
- data/examples/examples01/static/js/codemirror/mode/ecl/index.html +39 -0
- data/examples/examples01/static/js/codemirror/mode/erlang/erlang.js +463 -0
- data/examples/examples01/static/js/codemirror/mode/erlang/index.html +64 -0
- data/examples/examples01/static/js/codemirror/mode/gfm/gfm.js +94 -0
- data/examples/examples01/static/js/codemirror/mode/gfm/index.html +70 -0
- data/examples/examples01/static/js/codemirror/mode/gfm/test.js +225 -0
- data/examples/examples01/static/js/codemirror/mode/go/go.js +165 -0
- data/examples/examples01/static/js/codemirror/mode/go/index.html +74 -0
- data/examples/examples01/static/js/codemirror/mode/groovy/groovy.js +210 -0
- data/examples/examples01/static/js/codemirror/mode/groovy/index.html +73 -0
- data/examples/examples01/static/js/codemirror/mode/haskell/haskell.js +242 -0
- data/examples/examples01/static/js/codemirror/mode/haskell/index.html +62 -0
- data/examples/examples01/static/js/codemirror/mode/haxe/haxe.js +429 -0
- data/examples/examples01/static/js/codemirror/mode/haxe/index.html +90 -0
- data/examples/examples01/static/js/codemirror/mode/htmlembedded/htmlembedded.js +73 -0
- data/examples/examples01/static/js/codemirror/mode/htmlembedded/index.html +49 -0
- data/examples/examples01/static/js/codemirror/mode/htmlmixed/htmlmixed.js +84 -0
- data/examples/examples01/static/js/codemirror/mode/htmlmixed/index.html +52 -0
- data/examples/examples01/static/js/codemirror/mode/http/http.js +98 -0
- data/examples/examples01/static/js/codemirror/mode/http/index.html +32 -0
- data/examples/examples01/static/js/codemirror/mode/javascript/index.html +88 -0
- data/examples/examples01/static/js/codemirror/mode/javascript/javascript.js +411 -0
- data/examples/examples01/static/js/codemirror/mode/javascript/typescript.html +48 -0
- data/examples/examples01/static/js/codemirror/mode/jinja2/index.html +38 -0
- data/examples/examples01/static/js/codemirror/mode/jinja2/jinja2.js +42 -0
- data/examples/examples01/static/js/codemirror/mode/less/index.html +741 -0
- data/examples/examples01/static/js/codemirror/mode/less/less.js +266 -0
- data/examples/examples01/static/js/codemirror/mode/lua/index.html +74 -0
- data/examples/examples01/static/js/codemirror/mode/lua/lua.js +140 -0
- data/examples/examples01/static/js/codemirror/mode/markdown/index.html +344 -0
- data/examples/examples01/static/js/codemirror/mode/markdown/markdown.js +474 -0
- data/examples/examples01/static/js/codemirror/mode/markdown/test.js +1266 -0
- data/examples/examples01/static/js/codemirror/mode/mysql/index.html +41 -0
- data/examples/examples01/static/js/codemirror/mode/mysql/mysql.js +203 -0
- data/examples/examples01/static/js/codemirror/mode/ntriples/index.html +33 -0
- data/examples/examples01/static/js/codemirror/mode/ntriples/ntriples.js +170 -0
- data/examples/examples01/static/js/codemirror/mode/ocaml/index.html +131 -0
- data/examples/examples01/static/js/codemirror/mode/ocaml/ocaml.js +113 -0
- data/examples/examples01/static/js/codemirror/mode/pascal/LICENSE +7 -0
- data/examples/examples01/static/js/codemirror/mode/pascal/index.html +48 -0
- data/examples/examples01/static/js/codemirror/mode/pascal/pascal.js +94 -0
- data/examples/examples01/static/js/codemirror/mode/perl/LICENSE +19 -0
- data/examples/examples01/static/js/codemirror/mode/perl/index.html +62 -0
- data/examples/examples01/static/js/codemirror/mode/perl/perl.js +816 -0
- data/examples/examples01/static/js/codemirror/mode/php/index.html +51 -0
- data/examples/examples01/static/js/codemirror/mode/php/php.js +129 -0
- data/examples/examples01/static/js/codemirror/mode/pig/index.html +42 -0
- data/examples/examples01/static/js/codemirror/mode/pig/pig.js +171 -0
- data/examples/examples01/static/js/codemirror/mode/plsql/index.html +62 -0
- data/examples/examples01/static/js/codemirror/mode/plsql/plsql.js +216 -0
- data/examples/examples01/static/js/codemirror/mode/properties/index.html +41 -0
- data/examples/examples01/static/js/codemirror/mode/properties/properties.js +63 -0
- data/examples/examples01/static/js/codemirror/mode/python/LICENSE.txt +21 -0
- data/examples/examples01/static/js/codemirror/mode/python/index.html +124 -0
- data/examples/examples01/static/js/codemirror/mode/python/python.js +340 -0
- data/examples/examples01/static/js/codemirror/mode/r/LICENSE +24 -0
- data/examples/examples01/static/js/codemirror/mode/r/index.html +74 -0
- data/examples/examples01/static/js/codemirror/mode/r/r.js +141 -0
- data/examples/examples01/static/js/codemirror/mode/rpm/changes/changes.js +19 -0
- data/examples/examples01/static/js/codemirror/mode/rpm/changes/index.html +53 -0
- data/examples/examples01/static/js/codemirror/mode/rpm/spec/index.html +99 -0
- data/examples/examples01/static/js/codemirror/mode/rpm/spec/spec.css +5 -0
- data/examples/examples01/static/js/codemirror/mode/rpm/spec/spec.js +66 -0
- data/examples/examples01/static/js/codemirror/mode/rst/index.html +526 -0
- data/examples/examples01/static/js/codemirror/mode/rst/rst.js +314 -0
- data/examples/examples01/static/js/codemirror/mode/ruby/LICENSE +24 -0
- data/examples/examples01/static/js/codemirror/mode/ruby/index.html +173 -0
- data/examples/examples01/static/js/codemirror/mode/ruby/ruby.js +195 -0
- data/examples/examples01/static/js/codemirror/mode/rust/index.html +48 -0
- data/examples/examples01/static/js/codemirror/mode/rust/rust.js +432 -0
- data/examples/examples01/static/js/codemirror/mode/scheme/index.html +65 -0
- data/examples/examples01/static/js/codemirror/mode/scheme/scheme.js +230 -0
- data/examples/examples01/static/js/codemirror/mode/shell/index.html +51 -0
- data/examples/examples01/static/js/codemirror/mode/shell/shell.js +118 -0
- data/examples/examples01/static/js/codemirror/mode/sieve/LICENSE +23 -0
- data/examples/examples01/static/js/codemirror/mode/sieve/index.html +81 -0
- data/examples/examples01/static/js/codemirror/mode/sieve/sieve.js +156 -0
- data/examples/examples01/static/js/codemirror/mode/smalltalk/index.html +57 -0
- data/examples/examples01/static/js/codemirror/mode/smalltalk/smalltalk.js +139 -0
- data/examples/examples01/static/js/codemirror/mode/smarty/index.html +83 -0
- data/examples/examples01/static/js/codemirror/mode/smarty/smarty.js +148 -0
- data/examples/examples01/static/js/codemirror/mode/sparql/index.html +42 -0
- data/examples/examples01/static/js/codemirror/mode/sparql/sparql.js +143 -0
- data/examples/examples01/static/js/codemirror/mode/stex/index.html +98 -0
- data/examples/examples01/static/js/codemirror/mode/stex/stex.js +175 -0
- data/examples/examples01/static/js/codemirror/mode/stex/test.js +343 -0
- data/examples/examples01/static/js/codemirror/mode/tiddlywiki/index.html +142 -0
- data/examples/examples01/static/js/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/examples/examples01/static/js/codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
- data/examples/examples01/static/js/codemirror/mode/tiki/index.html +81 -0
- data/examples/examples01/static/js/codemirror/mode/tiki/tiki.css +26 -0
- data/examples/examples01/static/js/codemirror/mode/tiki/tiki.js +309 -0
- data/examples/examples01/static/js/codemirror/mode/vb/LICENSE.txt +21 -0
- data/examples/examples01/static/js/codemirror/mode/vb/index.html +88 -0
- data/examples/examples01/static/js/codemirror/mode/vb/vb.js +260 -0
- data/examples/examples01/static/js/codemirror/mode/vbscript/index.html +42 -0
- data/examples/examples01/static/js/codemirror/mode/vbscript/vbscript.js +26 -0
- data/examples/examples01/static/js/codemirror/mode/velocity/index.html +103 -0
- data/examples/examples01/static/js/codemirror/mode/velocity/velocity.js +144 -0
- data/examples/examples01/static/js/codemirror/mode/verilog/index.html +210 -0
- data/examples/examples01/static/js/codemirror/mode/verilog/verilog.js +182 -0
- data/examples/examples01/static/js/codemirror/mode/xml/index.html +45 -0
- data/examples/examples01/static/js/codemirror/mode/xml/xml.js +324 -0
- data/examples/examples01/static/js/codemirror/mode/xquery/LICENSE +20 -0
- data/examples/examples01/static/js/codemirror/mode/xquery/index.html +221 -0
- data/examples/examples01/static/js/codemirror/mode/xquery/test.js +77 -0
- data/examples/examples01/static/js/codemirror/mode/xquery/xquery.js +450 -0
- data/examples/examples01/static/js/codemirror/mode/yaml/index.html +68 -0
- data/examples/examples01/static/js/codemirror/mode/yaml/yaml.js +95 -0
- data/examples/examples01/static/js/codemirror/mode/z80/index.html +39 -0
- data/examples/examples01/static/js/codemirror/mode/z80/z80.js +113 -0
- data/examples/examples01/static/js/codemirror/theme/ambiance-mobile.css +6 -0
- data/examples/examples01/static/js/codemirror/theme/ambiance.css +76 -0
- data/examples/examples01/static/js/codemirror/theme/blackboard.css +25 -0
- data/examples/examples01/static/js/codemirror/theme/cobalt.css +18 -0
- data/examples/examples01/static/js/codemirror/theme/eclipse.css +25 -0
- data/examples/examples01/static/js/codemirror/theme/elegant.css +10 -0
- data/examples/examples01/static/js/codemirror/theme/erlang-dark.css +21 -0
- data/examples/examples01/static/js/codemirror/theme/lesser-dark.css +44 -0
- data/examples/examples01/static/js/codemirror/theme/monokai.css +28 -0
- data/examples/examples01/static/js/codemirror/theme/neat.css +9 -0
- data/examples/examples01/static/js/codemirror/theme/night.css +21 -0
- data/examples/examples01/static/js/codemirror/theme/rubyblue.css +21 -0
- data/examples/examples01/static/js/codemirror/theme/solarized.css +207 -0
- data/examples/examples01/static/js/codemirror/theme/twilight.css +26 -0
- data/examples/examples01/static/js/codemirror/theme/vibrant-ink.css +27 -0
- data/examples/examples01/static/js/codemirror/theme/xq-dark.css +46 -0
- data/examples/examples01/static/js/d3.v3.min.js +2 -2
- data/examples/examples01/static/test/cm.html +33 -0
- data/examples/examples01/views/about.slim +15 -0
- data/examples/examples01/views/index.slim +1 -1
- data/examples/examples01/views/layout.slim +1 -0
- data/examples/examples01/views/layout_cm.slim +17 -0
- data/examples/examples01/views/navbar.slim +4 -4
- data/lib/swagr/version.rb +1 -1
- data/templates/app.rb +4 -0
- data/templates/static/js/codemirror/keymap/emacs.js +30 -0
- data/templates/static/js/codemirror/keymap/vim.js +2298 -0
- data/templates/static/js/codemirror/lib/codemirror.css +239 -0
- data/templates/static/js/codemirror/lib/codemirror.js +4553 -0
- data/templates/static/js/codemirror/lib/util/closetag.js +85 -0
- data/templates/static/js/codemirror/lib/util/colorize.js +29 -0
- data/templates/static/js/codemirror/lib/util/continuecomment.js +36 -0
- data/templates/static/js/codemirror/lib/util/continuelist.js +28 -0
- data/templates/static/js/codemirror/lib/util/dialog.css +32 -0
- data/templates/static/js/codemirror/lib/util/dialog.js +75 -0
- data/templates/static/js/codemirror/lib/util/foldcode.js +182 -0
- data/templates/static/js/codemirror/lib/util/formatting.js +108 -0
- data/templates/static/js/codemirror/lib/util/javascript-hint.js +137 -0
- data/templates/static/js/codemirror/lib/util/loadmode.js +51 -0
- data/templates/static/js/codemirror/lib/util/match-highlighter.js +46 -0
- data/templates/static/js/codemirror/lib/util/matchbrackets.js +63 -0
- data/templates/static/js/codemirror/lib/util/multiplex.js +95 -0
- data/templates/static/js/codemirror/lib/util/overlay.js +59 -0
- data/templates/static/js/codemirror/lib/util/pig-hint.js +117 -0
- data/templates/static/js/codemirror/lib/util/runmode-standalone.js +90 -0
- data/templates/static/js/codemirror/lib/util/runmode.js +52 -0
- data/templates/static/js/codemirror/lib/util/search.js +119 -0
- data/templates/static/js/codemirror/lib/util/searchcursor.js +119 -0
- data/templates/static/js/codemirror/lib/util/simple-hint.css +16 -0
- data/templates/static/js/codemirror/lib/util/simple-hint.js +102 -0
- data/templates/static/js/codemirror/lib/util/xml-hint.js +131 -0
- data/templates/static/js/codemirror/mode/clike/clike.js +300 -0
- data/templates/static/js/codemirror/mode/clike/index.html +103 -0
- data/templates/static/js/codemirror/mode/clike/scala.html +767 -0
- data/templates/static/js/codemirror/mode/clojure/clojure.js +206 -0
- data/templates/static/js/codemirror/mode/clojure/index.html +67 -0
- data/templates/static/js/codemirror/mode/coffeescript/LICENSE +22 -0
- data/templates/static/js/codemirror/mode/coffeescript/coffeescript.js +346 -0
- data/templates/static/js/codemirror/mode/coffeescript/index.html +728 -0
- data/templates/static/js/codemirror/mode/commonlisp/commonlisp.js +101 -0
- data/templates/static/js/codemirror/mode/commonlisp/index.html +165 -0
- data/templates/static/js/codemirror/mode/css/css.js +465 -0
- data/templates/static/js/codemirror/mode/css/index.html +58 -0
- data/templates/static/js/codemirror/mode/css/test.js +501 -0
- data/templates/static/js/codemirror/mode/diff/diff.js +32 -0
- data/templates/static/js/codemirror/mode/diff/index.html +105 -0
- data/templates/static/js/codemirror/mode/ecl/ecl.js +192 -0
- data/templates/static/js/codemirror/mode/ecl/index.html +39 -0
- data/templates/static/js/codemirror/mode/erlang/erlang.js +463 -0
- data/templates/static/js/codemirror/mode/erlang/index.html +64 -0
- data/templates/static/js/codemirror/mode/gfm/gfm.js +94 -0
- data/templates/static/js/codemirror/mode/gfm/index.html +70 -0
- data/templates/static/js/codemirror/mode/gfm/test.js +225 -0
- data/templates/static/js/codemirror/mode/go/go.js +165 -0
- data/templates/static/js/codemirror/mode/go/index.html +74 -0
- data/templates/static/js/codemirror/mode/groovy/groovy.js +210 -0
- data/templates/static/js/codemirror/mode/groovy/index.html +73 -0
- data/templates/static/js/codemirror/mode/haskell/haskell.js +242 -0
- data/templates/static/js/codemirror/mode/haskell/index.html +62 -0
- data/templates/static/js/codemirror/mode/haxe/haxe.js +429 -0
- data/templates/static/js/codemirror/mode/haxe/index.html +90 -0
- data/templates/static/js/codemirror/mode/htmlembedded/htmlembedded.js +73 -0
- data/templates/static/js/codemirror/mode/htmlembedded/index.html +49 -0
- data/templates/static/js/codemirror/mode/htmlmixed/htmlmixed.js +84 -0
- data/templates/static/js/codemirror/mode/htmlmixed/index.html +52 -0
- data/templates/static/js/codemirror/mode/http/http.js +98 -0
- data/templates/static/js/codemirror/mode/http/index.html +32 -0
- data/templates/static/js/codemirror/mode/javascript/index.html +88 -0
- data/templates/static/js/codemirror/mode/javascript/javascript.js +411 -0
- data/templates/static/js/codemirror/mode/javascript/typescript.html +48 -0
- data/templates/static/js/codemirror/mode/jinja2/index.html +38 -0
- data/templates/static/js/codemirror/mode/jinja2/jinja2.js +42 -0
- data/templates/static/js/codemirror/mode/less/index.html +741 -0
- data/templates/static/js/codemirror/mode/less/less.js +266 -0
- data/templates/static/js/codemirror/mode/lua/index.html +74 -0
- data/templates/static/js/codemirror/mode/lua/lua.js +140 -0
- data/templates/static/js/codemirror/mode/markdown/index.html +344 -0
- data/templates/static/js/codemirror/mode/markdown/markdown.js +474 -0
- data/templates/static/js/codemirror/mode/markdown/test.js +1266 -0
- data/templates/static/js/codemirror/mode/mysql/index.html +41 -0
- data/templates/static/js/codemirror/mode/mysql/mysql.js +203 -0
- data/templates/static/js/codemirror/mode/ntriples/index.html +33 -0
- data/templates/static/js/codemirror/mode/ntriples/ntriples.js +170 -0
- data/templates/static/js/codemirror/mode/ocaml/index.html +131 -0
- data/templates/static/js/codemirror/mode/ocaml/ocaml.js +113 -0
- data/templates/static/js/codemirror/mode/pascal/LICENSE +7 -0
- data/templates/static/js/codemirror/mode/pascal/index.html +48 -0
- data/templates/static/js/codemirror/mode/pascal/pascal.js +94 -0
- data/templates/static/js/codemirror/mode/perl/LICENSE +19 -0
- data/templates/static/js/codemirror/mode/perl/index.html +62 -0
- data/templates/static/js/codemirror/mode/perl/perl.js +816 -0
- data/templates/static/js/codemirror/mode/php/index.html +51 -0
- data/templates/static/js/codemirror/mode/php/php.js +129 -0
- data/templates/static/js/codemirror/mode/pig/index.html +42 -0
- data/templates/static/js/codemirror/mode/pig/pig.js +171 -0
- data/templates/static/js/codemirror/mode/plsql/index.html +62 -0
- data/templates/static/js/codemirror/mode/plsql/plsql.js +216 -0
- data/templates/static/js/codemirror/mode/properties/index.html +41 -0
- data/templates/static/js/codemirror/mode/properties/properties.js +63 -0
- data/templates/static/js/codemirror/mode/python/LICENSE.txt +21 -0
- data/templates/static/js/codemirror/mode/python/index.html +124 -0
- data/templates/static/js/codemirror/mode/python/python.js +340 -0
- data/templates/static/js/codemirror/mode/r/LICENSE +24 -0
- data/templates/static/js/codemirror/mode/r/index.html +74 -0
- data/templates/static/js/codemirror/mode/r/r.js +141 -0
- data/templates/static/js/codemirror/mode/rpm/changes/changes.js +19 -0
- data/templates/static/js/codemirror/mode/rpm/changes/index.html +53 -0
- data/templates/static/js/codemirror/mode/rpm/spec/index.html +99 -0
- data/templates/static/js/codemirror/mode/rpm/spec/spec.css +5 -0
- data/templates/static/js/codemirror/mode/rpm/spec/spec.js +66 -0
- data/templates/static/js/codemirror/mode/rst/index.html +526 -0
- data/templates/static/js/codemirror/mode/rst/rst.js +314 -0
- data/templates/static/js/codemirror/mode/ruby/LICENSE +24 -0
- data/templates/static/js/codemirror/mode/ruby/index.html +173 -0
- data/templates/static/js/codemirror/mode/ruby/ruby.js +195 -0
- data/templates/static/js/codemirror/mode/rust/index.html +48 -0
- data/templates/static/js/codemirror/mode/rust/rust.js +432 -0
- data/templates/static/js/codemirror/mode/scheme/index.html +65 -0
- data/templates/static/js/codemirror/mode/scheme/scheme.js +230 -0
- data/templates/static/js/codemirror/mode/shell/index.html +51 -0
- data/templates/static/js/codemirror/mode/shell/shell.js +118 -0
- data/templates/static/js/codemirror/mode/sieve/LICENSE +23 -0
- data/templates/static/js/codemirror/mode/sieve/index.html +81 -0
- data/templates/static/js/codemirror/mode/sieve/sieve.js +156 -0
- data/templates/static/js/codemirror/mode/smalltalk/index.html +57 -0
- data/templates/static/js/codemirror/mode/smalltalk/smalltalk.js +139 -0
- data/templates/static/js/codemirror/mode/smarty/index.html +83 -0
- data/templates/static/js/codemirror/mode/smarty/smarty.js +148 -0
- data/templates/static/js/codemirror/mode/sparql/index.html +42 -0
- data/templates/static/js/codemirror/mode/sparql/sparql.js +143 -0
- data/templates/static/js/codemirror/mode/stex/index.html +98 -0
- data/templates/static/js/codemirror/mode/stex/stex.js +175 -0
- data/templates/static/js/codemirror/mode/stex/test.js +343 -0
- data/templates/static/js/codemirror/mode/tiddlywiki/index.html +142 -0
- data/templates/static/js/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/templates/static/js/codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
- data/templates/static/js/codemirror/mode/tiki/index.html +81 -0
- data/templates/static/js/codemirror/mode/tiki/tiki.css +26 -0
- data/templates/static/js/codemirror/mode/tiki/tiki.js +309 -0
- data/templates/static/js/codemirror/mode/vb/LICENSE.txt +21 -0
- data/templates/static/js/codemirror/mode/vb/index.html +88 -0
- data/templates/static/js/codemirror/mode/vb/vb.js +260 -0
- data/templates/static/js/codemirror/mode/vbscript/index.html +42 -0
- data/templates/static/js/codemirror/mode/vbscript/vbscript.js +26 -0
- data/templates/static/js/codemirror/mode/velocity/index.html +103 -0
- data/templates/static/js/codemirror/mode/velocity/velocity.js +144 -0
- data/templates/static/js/codemirror/mode/verilog/index.html +210 -0
- data/templates/static/js/codemirror/mode/verilog/verilog.js +182 -0
- data/templates/static/js/codemirror/mode/xml/index.html +45 -0
- data/templates/static/js/codemirror/mode/xml/xml.js +324 -0
- data/templates/static/js/codemirror/mode/xquery/LICENSE +20 -0
- data/templates/static/js/codemirror/mode/xquery/index.html +221 -0
- data/templates/static/js/codemirror/mode/xquery/test.js +77 -0
- data/templates/static/js/codemirror/mode/xquery/xquery.js +450 -0
- data/templates/static/js/codemirror/mode/yaml/index.html +68 -0
- data/templates/static/js/codemirror/mode/yaml/yaml.js +95 -0
- data/templates/static/js/codemirror/mode/z80/index.html +39 -0
- data/templates/static/js/codemirror/mode/z80/z80.js +113 -0
- data/templates/static/js/codemirror/theme/ambiance-mobile.css +6 -0
- data/templates/static/js/codemirror/theme/ambiance.css +76 -0
- data/templates/static/js/codemirror/theme/blackboard.css +25 -0
- data/templates/static/js/codemirror/theme/cobalt.css +18 -0
- data/templates/static/js/codemirror/theme/eclipse.css +25 -0
- data/templates/static/js/codemirror/theme/elegant.css +10 -0
- data/templates/static/js/codemirror/theme/erlang-dark.css +21 -0
- data/templates/static/js/codemirror/theme/lesser-dark.css +44 -0
- data/templates/static/js/codemirror/theme/monokai.css +28 -0
- data/templates/static/js/codemirror/theme/neat.css +9 -0
- data/templates/static/js/codemirror/theme/night.css +21 -0
- data/templates/static/js/codemirror/theme/rubyblue.css +21 -0
- data/templates/static/js/codemirror/theme/solarized.css +207 -0
- data/templates/static/js/codemirror/theme/twilight.css +26 -0
- data/templates/static/js/codemirror/theme/vibrant-ink.css +27 -0
- data/templates/static/js/codemirror/theme/xq-dark.css +46 -0
- data/templates/static/js/d3.v3.min.js +2 -2
- data/templates/static/test/cm.html +33 -0
- data/templates/views/about.slim +15 -0
- data/templates/views/index.slim +1 -1
- data/templates/views/layout.slim +1 -0
- data/templates/views/navbar.slim +4 -4
- metadata +347 -2
@@ -0,0 +1,23 @@
|
|
1
|
+
Copyright (C) 2012 Thomas Schmid <schmid-thomas@gmx.net>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
20
|
+
|
21
|
+
Please note that some subdirectories of the CodeMirror distribution
|
22
|
+
include their own LICENSE files, and are released under different
|
23
|
+
licences.
|
@@ -0,0 +1,81 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>CodeMirror: Sieve (RFC5228) mode</title>
|
6
|
+
<link rel="stylesheet" href="../../doc/docs.css">
|
7
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
8
|
+
<script src="../../lib/codemirror.js"></script>
|
9
|
+
<script src="sieve.js"></script>
|
10
|
+
<style>.CodeMirror {background: #f8f8f8;}</style>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<h1>CodeMirror: Sieve (RFC5228) mode</h1>
|
14
|
+
<form><textarea id="code" name="code">
|
15
|
+
#
|
16
|
+
# Example Sieve Filter
|
17
|
+
# Declare any optional features or extension used by the script
|
18
|
+
#
|
19
|
+
|
20
|
+
require ["fileinto", "reject"];
|
21
|
+
|
22
|
+
#
|
23
|
+
# Reject any large messages (note that the four leading dots get
|
24
|
+
# "stuffed" to three)
|
25
|
+
#
|
26
|
+
if size :over 1M
|
27
|
+
{
|
28
|
+
reject text:
|
29
|
+
Please do not send me large attachments.
|
30
|
+
Put your file on a server and send me the URL.
|
31
|
+
Thank you.
|
32
|
+
.... Fred
|
33
|
+
.
|
34
|
+
;
|
35
|
+
stop;
|
36
|
+
}
|
37
|
+
|
38
|
+
#
|
39
|
+
# Handle messages from known mailing lists
|
40
|
+
# Move messages from IETF filter discussion list to filter folder
|
41
|
+
#
|
42
|
+
if header :is "Sender" "owner-ietf-mta-filters@imc.org"
|
43
|
+
{
|
44
|
+
fileinto "filter"; # move to "filter" folder
|
45
|
+
}
|
46
|
+
#
|
47
|
+
# Keep all messages to or from people in my company
|
48
|
+
#
|
49
|
+
elsif address :domain :is ["From", "To"] "example.com"
|
50
|
+
{
|
51
|
+
keep; # keep in "In" folder
|
52
|
+
}
|
53
|
+
|
54
|
+
#
|
55
|
+
# Try and catch unsolicited email. If a message is not to me,
|
56
|
+
# or it contains a subject known to be spam, file it away.
|
57
|
+
#
|
58
|
+
elsif anyof (not address :all :contains
|
59
|
+
["To", "Cc", "Bcc"] "me@example.com",
|
60
|
+
header :matches "subject"
|
61
|
+
["*make*money*fast*", "*university*dipl*mas*"])
|
62
|
+
{
|
63
|
+
# If message header does not contain my address,
|
64
|
+
# it's from a list.
|
65
|
+
fileinto "spam"; # move to "spam" folder
|
66
|
+
}
|
67
|
+
else
|
68
|
+
{
|
69
|
+
# Move all other (non-company) mail to "personal"
|
70
|
+
# folder.
|
71
|
+
fileinto "personal";
|
72
|
+
}
|
73
|
+
</textarea></form>
|
74
|
+
<script>
|
75
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {});
|
76
|
+
</script>
|
77
|
+
|
78
|
+
<p><strong>MIME types defined:</strong> <code>application/sieve</code>.</p>
|
79
|
+
|
80
|
+
</body>
|
81
|
+
</html>
|
@@ -0,0 +1,156 @@
|
|
1
|
+
/*
|
2
|
+
* See LICENSE in this directory for the license under which this code
|
3
|
+
* is released.
|
4
|
+
*/
|
5
|
+
|
6
|
+
CodeMirror.defineMode("sieve", function(config) {
|
7
|
+
function words(str) {
|
8
|
+
var obj = {}, words = str.split(" ");
|
9
|
+
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
10
|
+
return obj;
|
11
|
+
}
|
12
|
+
|
13
|
+
var keywords = words("if elsif else stop require");
|
14
|
+
var atoms = words("true false not");
|
15
|
+
var indentUnit = config.indentUnit;
|
16
|
+
|
17
|
+
function tokenBase(stream, state) {
|
18
|
+
|
19
|
+
var ch = stream.next();
|
20
|
+
if (ch == "/" && stream.eat("*")) {
|
21
|
+
state.tokenize = tokenCComment;
|
22
|
+
return tokenCComment(stream, state);
|
23
|
+
}
|
24
|
+
|
25
|
+
if (ch === '#') {
|
26
|
+
stream.skipToEnd();
|
27
|
+
return "comment";
|
28
|
+
}
|
29
|
+
|
30
|
+
if (ch == "\"") {
|
31
|
+
state.tokenize = tokenString(ch);
|
32
|
+
return state.tokenize(stream, state);
|
33
|
+
}
|
34
|
+
|
35
|
+
if (ch === "{")
|
36
|
+
{
|
37
|
+
state._indent++;
|
38
|
+
return null;
|
39
|
+
}
|
40
|
+
|
41
|
+
if (ch === "}")
|
42
|
+
{
|
43
|
+
state._indent--;
|
44
|
+
return null;
|
45
|
+
}
|
46
|
+
|
47
|
+
if (/[{}\(\),;]/.test(ch))
|
48
|
+
return null;
|
49
|
+
|
50
|
+
// 1*DIGIT "K" / "M" / "G"
|
51
|
+
if (/\d/.test(ch)) {
|
52
|
+
stream.eatWhile(/[\d]/);
|
53
|
+
stream.eat(/[KkMmGg]/);
|
54
|
+
return "number";
|
55
|
+
}
|
56
|
+
|
57
|
+
// ":" (ALPHA / "_") *(ALPHA / DIGIT / "_")
|
58
|
+
if (ch == ":") {
|
59
|
+
stream.eatWhile(/[a-zA-Z_]/);
|
60
|
+
stream.eatWhile(/[a-zA-Z0-9_]/);
|
61
|
+
|
62
|
+
return "operator";
|
63
|
+
}
|
64
|
+
|
65
|
+
stream.eatWhile(/[\w\$_]/);
|
66
|
+
var cur = stream.current();
|
67
|
+
|
68
|
+
// "text:" *(SP / HTAB) (hash-comment / CRLF)
|
69
|
+
// *(multiline-literal / multiline-dotstart)
|
70
|
+
// "." CRLF
|
71
|
+
if ((cur == "text") && stream.eat(":"))
|
72
|
+
{
|
73
|
+
state.tokenize = tokenMultiLineString;
|
74
|
+
return "string";
|
75
|
+
}
|
76
|
+
|
77
|
+
if (keywords.propertyIsEnumerable(cur))
|
78
|
+
return "keyword";
|
79
|
+
|
80
|
+
if (atoms.propertyIsEnumerable(cur))
|
81
|
+
return "atom";
|
82
|
+
}
|
83
|
+
|
84
|
+
function tokenMultiLineString(stream, state)
|
85
|
+
{
|
86
|
+
state._multiLineString = true;
|
87
|
+
// the first line is special it may contain a comment
|
88
|
+
if (!stream.sol()) {
|
89
|
+
stream.eatSpace();
|
90
|
+
|
91
|
+
if (stream.peek() == "#") {
|
92
|
+
stream.skipToEnd();
|
93
|
+
return "comment";
|
94
|
+
}
|
95
|
+
|
96
|
+
stream.skipToEnd();
|
97
|
+
return "string";
|
98
|
+
}
|
99
|
+
|
100
|
+
if ((stream.next() == ".") && (stream.eol()))
|
101
|
+
{
|
102
|
+
state._multiLineString = false;
|
103
|
+
state.tokenize = tokenBase;
|
104
|
+
}
|
105
|
+
|
106
|
+
return "string";
|
107
|
+
}
|
108
|
+
|
109
|
+
function tokenCComment(stream, state) {
|
110
|
+
var maybeEnd = false, ch;
|
111
|
+
while ((ch = stream.next()) != null) {
|
112
|
+
if (maybeEnd && ch == "/") {
|
113
|
+
state.tokenize = tokenBase;
|
114
|
+
break;
|
115
|
+
}
|
116
|
+
maybeEnd = (ch == "*");
|
117
|
+
}
|
118
|
+
return "comment";
|
119
|
+
}
|
120
|
+
|
121
|
+
function tokenString(quote) {
|
122
|
+
return function(stream, state) {
|
123
|
+
var escaped = false, ch;
|
124
|
+
while ((ch = stream.next()) != null) {
|
125
|
+
if (ch == quote && !escaped)
|
126
|
+
break;
|
127
|
+
escaped = !escaped && ch == "\\";
|
128
|
+
}
|
129
|
+
if (!escaped) state.tokenize = tokenBase;
|
130
|
+
return "string";
|
131
|
+
};
|
132
|
+
}
|
133
|
+
|
134
|
+
return {
|
135
|
+
startState: function(base) {
|
136
|
+
return {tokenize: tokenBase,
|
137
|
+
baseIndent: base || 0,
|
138
|
+
_indent: 0};
|
139
|
+
},
|
140
|
+
|
141
|
+
token: function(stream, state) {
|
142
|
+
if (stream.eatSpace())
|
143
|
+
return null;
|
144
|
+
|
145
|
+
return (state.tokenize || tokenBase)(stream, state);;
|
146
|
+
},
|
147
|
+
|
148
|
+
indent: function(state, _textAfter) {
|
149
|
+
return state.baseIndent + state._indent * indentUnit;
|
150
|
+
},
|
151
|
+
|
152
|
+
electricChars: "}"
|
153
|
+
};
|
154
|
+
});
|
155
|
+
|
156
|
+
CodeMirror.defineMIME("application/sieve", "sieve");
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>CodeMirror: Smalltalk 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="smalltalk.js"></script>
|
10
|
+
<link rel="stylesheet" href="../../doc/docs.css">
|
11
|
+
<style>
|
12
|
+
.CodeMirror {border: 2px solid #dee; border-right-width: 10px;}
|
13
|
+
.CodeMirror-gutter {border: none; background: #dee;}
|
14
|
+
.CodeMirror-gutter pre {color: white; font-weight: bold;}
|
15
|
+
</style>
|
16
|
+
</head>
|
17
|
+
<body>
|
18
|
+
<h1>CodeMirror: Smalltalk mode</h1>
|
19
|
+
|
20
|
+
<form><textarea id="code" name="code">
|
21
|
+
"
|
22
|
+
This is a test of the Smalltalk code
|
23
|
+
"
|
24
|
+
Seaside.WAComponent subclass: #MyCounter [
|
25
|
+
| count |
|
26
|
+
MyCounter class >> canBeRoot [ ^true ]
|
27
|
+
|
28
|
+
initialize [
|
29
|
+
super initialize.
|
30
|
+
count := 0.
|
31
|
+
]
|
32
|
+
states [ ^{ self } ]
|
33
|
+
renderContentOn: html [
|
34
|
+
html heading: count.
|
35
|
+
html anchor callback: [ count := count + 1 ]; with: '++'.
|
36
|
+
html space.
|
37
|
+
html anchor callback: [ count := count - 1 ]; with: '--'.
|
38
|
+
]
|
39
|
+
]
|
40
|
+
|
41
|
+
MyCounter registerAsApplication: 'mycounter'
|
42
|
+
</textarea></form>
|
43
|
+
|
44
|
+
<script>
|
45
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
46
|
+
lineNumbers: true,
|
47
|
+
matchBrackets: true,
|
48
|
+
mode: "text/x-stsrc",
|
49
|
+
indentUnit: 4
|
50
|
+
});
|
51
|
+
</script>
|
52
|
+
|
53
|
+
<p>Simple Smalltalk mode.</p>
|
54
|
+
|
55
|
+
<p><strong>MIME types defined:</strong> <code>text/x-stsrc</code>.</p>
|
56
|
+
</body>
|
57
|
+
</html>
|
@@ -0,0 +1,139 @@
|
|
1
|
+
CodeMirror.defineMode('smalltalk', function(config) {
|
2
|
+
|
3
|
+
var specialChars = /[+\-/\\*~<>=@%|&?!.:;^]/;
|
4
|
+
var keywords = /true|false|nil|self|super|thisContext/;
|
5
|
+
|
6
|
+
var Context = function(tokenizer, parent) {
|
7
|
+
this.next = tokenizer;
|
8
|
+
this.parent = parent;
|
9
|
+
};
|
10
|
+
|
11
|
+
var Token = function(name, context, eos) {
|
12
|
+
this.name = name;
|
13
|
+
this.context = context;
|
14
|
+
this.eos = eos;
|
15
|
+
};
|
16
|
+
|
17
|
+
var State = function() {
|
18
|
+
this.context = new Context(next, null);
|
19
|
+
this.expectVariable = true;
|
20
|
+
this.indentation = 0;
|
21
|
+
this.userIndentationDelta = 0;
|
22
|
+
};
|
23
|
+
|
24
|
+
State.prototype.userIndent = function(indentation) {
|
25
|
+
this.userIndentationDelta = indentation > 0 ? (indentation / config.indentUnit - this.indentation) : 0;
|
26
|
+
};
|
27
|
+
|
28
|
+
var next = function(stream, context, state) {
|
29
|
+
var token = new Token(null, context, false);
|
30
|
+
var aChar = stream.next();
|
31
|
+
|
32
|
+
if (aChar === '"') {
|
33
|
+
token = nextComment(stream, new Context(nextComment, context));
|
34
|
+
|
35
|
+
} else if (aChar === '\'') {
|
36
|
+
token = nextString(stream, new Context(nextString, context));
|
37
|
+
|
38
|
+
} else if (aChar === '#') {
|
39
|
+
stream.eatWhile(/[^ .]/);
|
40
|
+
token.name = 'string-2';
|
41
|
+
|
42
|
+
} else if (aChar === '$') {
|
43
|
+
stream.eatWhile(/[^ ]/);
|
44
|
+
token.name = 'string-2';
|
45
|
+
|
46
|
+
} else if (aChar === '|' && state.expectVariable) {
|
47
|
+
token.context = new Context(nextTemporaries, context);
|
48
|
+
|
49
|
+
} else if (/[\[\]{}()]/.test(aChar)) {
|
50
|
+
token.name = 'bracket';
|
51
|
+
token.eos = /[\[{(]/.test(aChar);
|
52
|
+
|
53
|
+
if (aChar === '[') {
|
54
|
+
state.indentation++;
|
55
|
+
} else if (aChar === ']') {
|
56
|
+
state.indentation = Math.max(0, state.indentation - 1);
|
57
|
+
}
|
58
|
+
|
59
|
+
} else if (specialChars.test(aChar)) {
|
60
|
+
stream.eatWhile(specialChars);
|
61
|
+
token.name = 'operator';
|
62
|
+
token.eos = aChar !== ';'; // ; cascaded message expression
|
63
|
+
|
64
|
+
} else if (/\d/.test(aChar)) {
|
65
|
+
stream.eatWhile(/[\w\d]/);
|
66
|
+
token.name = 'number';
|
67
|
+
|
68
|
+
} else if (/[\w_]/.test(aChar)) {
|
69
|
+
stream.eatWhile(/[\w\d_]/);
|
70
|
+
token.name = state.expectVariable ? (keywords.test(stream.current()) ? 'keyword' : 'variable') : null;
|
71
|
+
|
72
|
+
} else {
|
73
|
+
token.eos = state.expectVariable;
|
74
|
+
}
|
75
|
+
|
76
|
+
return token;
|
77
|
+
};
|
78
|
+
|
79
|
+
var nextComment = function(stream, context) {
|
80
|
+
stream.eatWhile(/[^"]/);
|
81
|
+
return new Token('comment', stream.eat('"') ? context.parent : context, true);
|
82
|
+
};
|
83
|
+
|
84
|
+
var nextString = function(stream, context) {
|
85
|
+
stream.eatWhile(/[^']/);
|
86
|
+
return new Token('string', stream.eat('\'') ? context.parent : context, false);
|
87
|
+
};
|
88
|
+
|
89
|
+
var nextTemporaries = function(stream, context) {
|
90
|
+
var token = new Token(null, context, false);
|
91
|
+
var aChar = stream.next();
|
92
|
+
|
93
|
+
if (aChar === '|') {
|
94
|
+
token.context = context.parent;
|
95
|
+
token.eos = true;
|
96
|
+
|
97
|
+
} else {
|
98
|
+
stream.eatWhile(/[^|]/);
|
99
|
+
token.name = 'variable';
|
100
|
+
}
|
101
|
+
|
102
|
+
return token;
|
103
|
+
};
|
104
|
+
|
105
|
+
return {
|
106
|
+
startState: function() {
|
107
|
+
return new State;
|
108
|
+
},
|
109
|
+
|
110
|
+
token: function(stream, state) {
|
111
|
+
state.userIndent(stream.indentation());
|
112
|
+
|
113
|
+
if (stream.eatSpace()) {
|
114
|
+
return null;
|
115
|
+
}
|
116
|
+
|
117
|
+
var token = state.context.next(stream, state.context, state);
|
118
|
+
state.context = token.context;
|
119
|
+
state.expectVariable = token.eos;
|
120
|
+
|
121
|
+
state.lastToken = token;
|
122
|
+
return token.name;
|
123
|
+
},
|
124
|
+
|
125
|
+
blankLine: function(state) {
|
126
|
+
state.userIndent(0);
|
127
|
+
},
|
128
|
+
|
129
|
+
indent: function(state, textAfter) {
|
130
|
+
var i = state.context.next === next && textAfter && textAfter.charAt(0) === ']' ? -1 : state.userIndentationDelta;
|
131
|
+
return (state.indentation + i) * config.indentUnit;
|
132
|
+
},
|
133
|
+
|
134
|
+
electricChars: ']'
|
135
|
+
};
|
136
|
+
|
137
|
+
});
|
138
|
+
|
139
|
+
CodeMirror.defineMIME('text/x-stsrc', {name: 'smalltalk'});
|