datagram 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.env.sample +7 -0
- data/.gitignore +20 -0
- data/.rbenv-version +1 -0
- data/Gemfile +12 -0
- data/LICENSE.txt +22 -0
- data/Procfile +1 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/config.ru +5 -0
- data/datagram.gemspec +23 -0
- data/db/migrate/1_create_queries.rb +9 -0
- data/db/migrate/2_add_name_to_queries.rb +5 -0
- data/lib/datagram/version.rb +3 -0
- data/lib/datagram.rb +135 -0
- data/lib/views/application.coffee +222 -0
- data/lib/views/index.haml +47 -0
- data/lib/views/layout.haml +17 -0
- data/lib/views/style.sass +179 -0
- data/public/ace/ace.js +15209 -0
- data/public/ace/ext-elastic_tabstops_lite.js +301 -0
- data/public/ace/ext-emmet.js +253 -0
- data/public/ace/ext-searchbox.js +441 -0
- data/public/ace/ext-spellcheck.js +67 -0
- data/public/ace/ext-static_highlight.js +96 -0
- data/public/ace/ext-textarea.js +492 -0
- data/public/ace/ext-whitespace.js +204 -0
- data/public/ace/keybinding-emacs.js +962 -0
- data/public/ace/keybinding-vim.js +1704 -0
- data/public/ace/mode-abap.js +260 -0
- data/public/ace/mode-asciidoc.js +372 -0
- data/public/ace/mode-c9search.js +182 -0
- data/public/ace/mode-c_cpp.js +737 -0
- data/public/ace/mode-clojure.js +299 -0
- data/public/ace/mode-coffee.js +426 -0
- data/public/ace/mode-coldfusion.js +1753 -0
- data/public/ace/mode-csharp.js +612 -0
- data/public/ace/mode-css.js +773 -0
- data/public/ace/mode-curly.js +1950 -0
- data/public/ace/mode-dart.js +945 -0
- data/public/ace/mode-diff.js +166 -0
- data/public/ace/mode-django.js +1969 -0
- data/public/ace/mode-dot.js +320 -0
- data/public/ace/mode-ftl.js +907 -0
- data/public/ace/mode-glsl.js +810 -0
- data/public/ace/mode-golang.js +632 -0
- data/public/ace/mode-groovy.js +1037 -0
- data/public/ace/mode-haml.js +487 -0
- data/public/ace/mode-haxe.js +609 -0
- data/public/ace/mode-html.js +1881 -0
- data/public/ace/mode-jade.js +1951 -0
- data/public/ace/mode-java.js +996 -0
- data/public/ace/mode-javascript.js +876 -0
- data/public/ace/mode-json.js +578 -0
- data/public/ace/mode-jsp.js +1351 -0
- data/public/ace/mode-jsx.js +635 -0
- data/public/ace/mode-latex.js +189 -0
- data/public/ace/mode-less.js +807 -0
- data/public/ace/mode-liquid.js +862 -0
- data/public/ace/mode-lisp.js +138 -0
- data/public/ace/mode-livescript.js +288 -0
- data/public/ace/mode-logiql.js +664 -0
- data/public/ace/mode-lsl.js +828 -0
- data/public/ace/mode-lua.js +455 -0
- data/public/ace/mode-luapage.js +2340 -0
- data/public/ace/mode-lucene.js +64 -0
- data/public/ace/mode-makefile.js +313 -0
- data/public/ace/mode-markdown.js +2280 -0
- data/public/ace/mode-mushcode.js +704 -0
- data/public/ace/mode-mushcode_high_rules.js +569 -0
- data/public/ace/mode-objectivec.js +659 -0
- data/public/ace/mode-ocaml.js +443 -0
- data/public/ace/mode-pascal.js +233 -0
- data/public/ace/mode-perl.js +316 -0
- data/public/ace/mode-pgsql.js +908 -0
- data/public/ace/mode-php.js +2291 -0
- data/public/ace/mode-powershell.js +618 -0
- data/public/ace/mode-python.js +264 -0
- data/public/ace/mode-r.js +404 -0
- data/public/ace/mode-rdoc.js +184 -0
- data/public/ace/mode-rhtml.js +2168 -0
- data/public/ace/mode-ruby.js +431 -0
- data/public/ace/mode-sass.js +442 -0
- data/public/ace/mode-scad.js +670 -0
- data/public/ace/mode-scala.js +1025 -0
- data/public/ace/mode-scheme.js +144 -0
- data/public/ace/mode-scss.js +832 -0
- data/public/ace/mode-sh.js +204 -0
- data/public/ace/mode-sql.js +118 -0
- data/public/ace/mode-stylus.js +483 -0
- data/public/ace/mode-svg.js +1442 -0
- data/public/ace/mode-tcl.js +319 -0
- data/public/ace/mode-tex.js +166 -0
- data/public/ace/mode-text.js +0 -0
- data/public/ace/mode-textile.js +170 -0
- data/public/ace/mode-tmsnippet.js +200 -0
- data/public/ace/mode-toml.js +180 -0
- data/public/ace/mode-typescript.js +961 -0
- data/public/ace/mode-vbscript.js +281 -0
- data/public/ace/mode-velocity.js +962 -0
- data/public/ace/mode-xml.js +789 -0
- data/public/ace/mode-xquery.js +2750 -0
- data/public/ace/mode-yaml.js +289 -0
- data/public/ace/theme-ambiance.js +202 -0
- data/public/ace/theme-chaos.js +182 -0
- data/public/ace/theme-chrome.js +161 -0
- data/public/ace/theme-clouds.js +135 -0
- data/public/ace/theme-clouds_midnight.js +136 -0
- data/public/ace/theme-cobalt.js +150 -0
- data/public/ace/theme-crimson_editor.js +154 -0
- data/public/ace/theme-dawn.js +146 -0
- data/public/ace/theme-dreamweaver.js +173 -0
- data/public/ace/theme-eclipse.js +122 -0
- data/public/ace/theme-github.js +136 -0
- data/public/ace/theme-idle_fingers.js +136 -0
- data/public/ace/theme-kr.js +143 -0
- data/public/ace/theme-merbivore.js +135 -0
- data/public/ace/theme-merbivore_soft.js +136 -0
- data/public/ace/theme-mono_industrial.js +148 -0
- data/public/ace/theme-monokai.js +140 -0
- data/public/ace/theme-pastel_on_dark.js +148 -0
- data/public/ace/theme-solarized_dark.js +128 -0
- data/public/ace/theme-solarized_light.js +131 -0
- data/public/ace/theme-terminal.js +154 -0
- data/public/ace/theme-textmate.js +0 -0
- data/public/ace/theme-tomorrow.js +147 -0
- data/public/ace/theme-tomorrow_night.js +147 -0
- data/public/ace/theme-tomorrow_night_blue.js +145 -0
- data/public/ace/theme-tomorrow_night_bright.js +147 -0
- data/public/ace/theme-tomorrow_night_eighties.js +144 -0
- data/public/ace/theme-twilight.js +147 -0
- data/public/ace/theme-vibrant_ink.js +131 -0
- data/public/ace/theme-xcode.js +125 -0
- data/public/ace/worker-coffee.js +7091 -0
- data/public/ace/worker-css.js +8289 -0
- data/public/ace/worker-javascript.js +6496 -0
- data/public/ace/worker-json.js +2305 -0
- data/public/ace/worker-lua.js +3313 -0
- data/public/ace/worker-php.js +6743 -0
- data/public/ace/worker-xquery.js +21897 -0
- data/public/font/FontAwesome.otf +0 -0
- data/public/font/fontawesome-webfont.eot +0 -0
- data/public/font/fontawesome-webfont.svg +284 -0
- data/public/font/fontawesome-webfont.ttf +0 -0
- data/public/font/fontawesome-webfont.woff +0 -0
- data/public/font-awesome.css +540 -0
- data/public/jquery.js +9597 -0
- data/script/migrate.sh +2 -0
- metadata +242 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* rdoc.js
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2009-11 by RStudio, Inc.
|
|
5
|
+
*
|
|
6
|
+
* This program is licensed to you under the terms of version 3 of the
|
|
7
|
+
* GNU Affero General Public License. This program is distributed WITHOUT
|
|
8
|
+
* ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
|
|
9
|
+
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
|
|
10
|
+
* AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
define('ace/mode/rdoc', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/rdoc_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var oop = require("../lib/oop");
|
|
17
|
+
var TextMode = require("./text").Mode;
|
|
18
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
|
19
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
20
|
+
var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules;
|
|
21
|
+
var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
|
|
22
|
+
|
|
23
|
+
var Mode = function(suppressHighlighting) {
|
|
24
|
+
this.$tokenizer = new Tokenizer(new RDocHighlightRules().getRules());
|
|
25
|
+
this.$outdent = new MatchingBraceOutdent();
|
|
26
|
+
};
|
|
27
|
+
oop.inherits(Mode, TextMode);
|
|
28
|
+
|
|
29
|
+
(function() {
|
|
30
|
+
this.getNextLineIndent = function(state, line, tab) {
|
|
31
|
+
return this.$getIndent(line);
|
|
32
|
+
};
|
|
33
|
+
}).call(Mode.prototype);
|
|
34
|
+
|
|
35
|
+
exports.Mode = Mode;
|
|
36
|
+
});
|
|
37
|
+
define('ace/mode/rdoc_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/latex_highlight_rules'], function(require, exports, module) {
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
var oop = require("../lib/oop");
|
|
41
|
+
var lang = require("../lib/lang");
|
|
42
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
43
|
+
var LaTeXHighlightRules = require("./latex_highlight_rules");
|
|
44
|
+
|
|
45
|
+
var RDocHighlightRules = function() {
|
|
46
|
+
|
|
47
|
+
this.$rules = {
|
|
48
|
+
"start" : [
|
|
49
|
+
{
|
|
50
|
+
token : "comment",
|
|
51
|
+
regex : "%.*$"
|
|
52
|
+
}, {
|
|
53
|
+
token : "text", // non-command
|
|
54
|
+
regex : "\\\\[$&%#\\{\\}]"
|
|
55
|
+
}, {
|
|
56
|
+
token : "keyword", // command
|
|
57
|
+
regex : "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b",
|
|
58
|
+
next : "nospell"
|
|
59
|
+
}, {
|
|
60
|
+
token : "keyword", // command
|
|
61
|
+
regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"
|
|
62
|
+
}, {
|
|
63
|
+
token : "paren.keyword.operator",
|
|
64
|
+
regex : "[[({]"
|
|
65
|
+
}, {
|
|
66
|
+
token : "paren.keyword.operator",
|
|
67
|
+
regex : "[\\])}]"
|
|
68
|
+
}, {
|
|
69
|
+
token : "text",
|
|
70
|
+
regex : "\\s+"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"nospell" : [
|
|
74
|
+
{
|
|
75
|
+
token : "comment",
|
|
76
|
+
regex : "%.*$",
|
|
77
|
+
next : "start"
|
|
78
|
+
}, {
|
|
79
|
+
token : "nospell.text", // non-command
|
|
80
|
+
regex : "\\\\[$&%#\\{\\}]"
|
|
81
|
+
}, {
|
|
82
|
+
token : "keyword", // command
|
|
83
|
+
regex : "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b"
|
|
84
|
+
}, {
|
|
85
|
+
token : "keyword", // command
|
|
86
|
+
regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",
|
|
87
|
+
next : "start"
|
|
88
|
+
}, {
|
|
89
|
+
token : "paren.keyword.operator",
|
|
90
|
+
regex : "[[({]"
|
|
91
|
+
}, {
|
|
92
|
+
token : "paren.keyword.operator",
|
|
93
|
+
regex : "[\\])]"
|
|
94
|
+
}, {
|
|
95
|
+
token : "paren.keyword.operator",
|
|
96
|
+
regex : "}",
|
|
97
|
+
next : "start"
|
|
98
|
+
}, {
|
|
99
|
+
token : "nospell.text",
|
|
100
|
+
regex : "\\s+"
|
|
101
|
+
}, {
|
|
102
|
+
token : "nospell.text",
|
|
103
|
+
regex : "\\w+"
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
oop.inherits(RDocHighlightRules, TextHighlightRules);
|
|
110
|
+
|
|
111
|
+
exports.RDocHighlightRules = RDocHighlightRules;
|
|
112
|
+
});
|
|
113
|
+
define('ace/mode/latex_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
var oop = require("../lib/oop");
|
|
117
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
|
118
|
+
|
|
119
|
+
var LatexHighlightRules = function() {
|
|
120
|
+
this.$rules = {
|
|
121
|
+
"start" : [{
|
|
122
|
+
token : "keyword",
|
|
123
|
+
regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
|
|
124
|
+
}, {
|
|
125
|
+
token : "lparen",
|
|
126
|
+
regex : "[[({]"
|
|
127
|
+
}, {
|
|
128
|
+
token : "rparen",
|
|
129
|
+
regex : "[\\])}]"
|
|
130
|
+
}, {
|
|
131
|
+
token : "string",
|
|
132
|
+
regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$"
|
|
133
|
+
}, {
|
|
134
|
+
token : "comment",
|
|
135
|
+
regex : "%.*$"
|
|
136
|
+
}]
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
oop.inherits(LatexHighlightRules, TextHighlightRules);
|
|
141
|
+
|
|
142
|
+
exports.LatexHighlightRules = LatexHighlightRules;
|
|
143
|
+
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
var Range = require("../range").Range;
|
|
150
|
+
|
|
151
|
+
var MatchingBraceOutdent = function() {};
|
|
152
|
+
|
|
153
|
+
(function() {
|
|
154
|
+
|
|
155
|
+
this.checkOutdent = function(line, input) {
|
|
156
|
+
if (! /^\s+$/.test(line))
|
|
157
|
+
return false;
|
|
158
|
+
|
|
159
|
+
return /^\s*\}/.test(input);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
this.autoOutdent = function(doc, row) {
|
|
163
|
+
var line = doc.getLine(row);
|
|
164
|
+
var match = line.match(/^(\s*\})/);
|
|
165
|
+
|
|
166
|
+
if (!match) return 0;
|
|
167
|
+
|
|
168
|
+
var column = match[1].length;
|
|
169
|
+
var openBracePos = doc.findMatchingBracket({row: row, column: column});
|
|
170
|
+
|
|
171
|
+
if (!openBracePos || openBracePos.row == row) return 0;
|
|
172
|
+
|
|
173
|
+
var indent = this.$getIndent(doc.getLine(openBracePos.row));
|
|
174
|
+
doc.replace(new Range(row, 0, row, column-1), indent);
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
this.$getIndent = function(line) {
|
|
178
|
+
return line.match(/^\s*/)[0];
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
}).call(MatchingBraceOutdent.prototype);
|
|
182
|
+
|
|
183
|
+
exports.MatchingBraceOutdent = MatchingBraceOutdent;
|
|
184
|
+
});
|