datagram 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- 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,281 @@
|
|
1
|
+
/* ***** BEGIN LICENSE BLOCK *****
|
2
|
+
* Distributed under the BSD license:
|
3
|
+
*
|
4
|
+
* Copyright (c) 2012, Ajax.org B.V.
|
5
|
+
* All rights reserved.
|
6
|
+
*
|
7
|
+
* Redistribution and use in source and binary forms, with or without
|
8
|
+
* modification, are permitted provided that the following conditions are met:
|
9
|
+
* * Redistributions of source code must retain the above copyright
|
10
|
+
* notice, this list of conditions and the following disclaimer.
|
11
|
+
* * Redistributions in binary form must reproduce the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer in the
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
14
|
+
* * Neither the name of Ajax.org B.V. nor the
|
15
|
+
* names of its contributors may be used to endorse or promote products
|
16
|
+
* derived from this software without specific prior written permission.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
19
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
22
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
24
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
25
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
27
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
|
+
*
|
29
|
+
*
|
30
|
+
* Contributor(s):
|
31
|
+
*
|
32
|
+
*
|
33
|
+
*
|
34
|
+
* ***** END LICENSE BLOCK ***** */
|
35
|
+
|
36
|
+
define('ace/mode/vbscript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/vbscript_highlight_rules'], function(require, exports, module) {
|
37
|
+
|
38
|
+
|
39
|
+
var oop = require("../lib/oop");
|
40
|
+
var TextMode = require("./text").Mode;
|
41
|
+
var Tokenizer = require("../tokenizer").Tokenizer;
|
42
|
+
var VBScriptHighlightRules = require("./vbscript_highlight_rules").VBScriptHighlightRules;
|
43
|
+
|
44
|
+
var Mode = function() {
|
45
|
+
var highlighter = new VBScriptHighlightRules();
|
46
|
+
|
47
|
+
this.$tokenizer = new Tokenizer(highlighter.getRules());
|
48
|
+
};
|
49
|
+
oop.inherits(Mode, TextMode);
|
50
|
+
|
51
|
+
(function() {
|
52
|
+
|
53
|
+
this.lineCommentStart = ["'", "REM"];
|
54
|
+
|
55
|
+
}).call(Mode.prototype);
|
56
|
+
|
57
|
+
exports.Mode = Mode;
|
58
|
+
});
|
59
|
+
|
60
|
+
|
61
|
+
define('ace/mode/vbscript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
|
62
|
+
|
63
|
+
|
64
|
+
var oop = require("../lib/oop");
|
65
|
+
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
|
66
|
+
|
67
|
+
var VBScriptHighlightRules = function() {
|
68
|
+
|
69
|
+
this.$rules = {
|
70
|
+
"start": [
|
71
|
+
{
|
72
|
+
token: [
|
73
|
+
"meta.ending-space"
|
74
|
+
],
|
75
|
+
regex: "$"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
token: [
|
79
|
+
null
|
80
|
+
],
|
81
|
+
regex: "^(?=\\t)",
|
82
|
+
next: "state_3"
|
83
|
+
},
|
84
|
+
{
|
85
|
+
token: [null],
|
86
|
+
regex: "^(?= )",
|
87
|
+
next: "state_4"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
token: [
|
91
|
+
"storage.type.function.asp",
|
92
|
+
"text",
|
93
|
+
"entity.name.function.asp",
|
94
|
+
"text",
|
95
|
+
"punctuation.definition.parameters.asp",
|
96
|
+
"variable.parameter.function.asp",
|
97
|
+
"punctuation.definition.parameters.asp"
|
98
|
+
],
|
99
|
+
regex: "^\\s*((?:Function|Sub))(\\s*)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\)).*\\n?"
|
100
|
+
},
|
101
|
+
{
|
102
|
+
token: "punctuation.definition.comment.asp",
|
103
|
+
regex: "'|REM",
|
104
|
+
next: "comment"
|
105
|
+
},
|
106
|
+
{
|
107
|
+
token: [
|
108
|
+
"keyword.control.asp"
|
109
|
+
],
|
110
|
+
regex: "(?:\\b(If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b)"
|
111
|
+
},
|
112
|
+
{
|
113
|
+
token: [
|
114
|
+
"keyword.operator.asp"
|
115
|
+
],
|
116
|
+
regex: "(?:\\b(Mod|And|Not|Or|Xor|as)\\b)"
|
117
|
+
},
|
118
|
+
{
|
119
|
+
token: [
|
120
|
+
"storage.type.asp"
|
121
|
+
],
|
122
|
+
regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo"
|
123
|
+
},
|
124
|
+
{
|
125
|
+
token: [
|
126
|
+
"storage.modifier.asp"
|
127
|
+
],
|
128
|
+
regex: "(?:\\b(Private|Public|Default)\\b)"
|
129
|
+
},
|
130
|
+
{
|
131
|
+
token: [
|
132
|
+
"constant.language.asp"
|
133
|
+
],
|
134
|
+
regex: "(?:\\s*\\b(Empty|False|Nothing|Null|True)\\b)"
|
135
|
+
},
|
136
|
+
{
|
137
|
+
token: [
|
138
|
+
"punctuation.definition.string.begin.asp"
|
139
|
+
],
|
140
|
+
regex: '"',
|
141
|
+
next: "string"
|
142
|
+
},
|
143
|
+
{
|
144
|
+
token: [
|
145
|
+
"punctuation.definition.variable.asp"
|
146
|
+
],
|
147
|
+
regex: "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*"
|
148
|
+
},
|
149
|
+
{
|
150
|
+
token: [
|
151
|
+
"support.class.asp"
|
152
|
+
],
|
153
|
+
regex: "(?:\\b(Application|ObjectContext|Request|Response|Server|Session)\\b)"
|
154
|
+
},
|
155
|
+
{
|
156
|
+
token: [
|
157
|
+
"support.class.collection.asp"
|
158
|
+
],
|
159
|
+
regex: "(?:\\b(Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b)"
|
160
|
+
},
|
161
|
+
{
|
162
|
+
token: [
|
163
|
+
"support.constant.asp"
|
164
|
+
],
|
165
|
+
regex: "(?:\\b(TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b)"
|
166
|
+
},
|
167
|
+
{
|
168
|
+
token: [
|
169
|
+
"support.function.asp"
|
170
|
+
],
|
171
|
+
regex: "(?:\\b(Lock|Unlock|SetAbort|SetComplete|BianryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b)"
|
172
|
+
},
|
173
|
+
{
|
174
|
+
token: [
|
175
|
+
"support.function.event.asp"
|
176
|
+
],
|
177
|
+
regex: "(?:\\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b)"
|
178
|
+
},
|
179
|
+
{
|
180
|
+
token: [
|
181
|
+
"support.function.vb.asp"
|
182
|
+
],
|
183
|
+
regex: "(?:\\b(Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b)"
|
184
|
+
},
|
185
|
+
{
|
186
|
+
token: [
|
187
|
+
"constant.numeric.asp"
|
188
|
+
],
|
189
|
+
regex: "-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b"
|
190
|
+
},
|
191
|
+
{
|
192
|
+
token: [
|
193
|
+
"support.type.vb.asp"
|
194
|
+
],
|
195
|
+
regex: "(?:\\b(vbtrue|fvbalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b)"
|
196
|
+
},
|
197
|
+
{
|
198
|
+
token: [
|
199
|
+
"entity.name.function.asp"
|
200
|
+
],
|
201
|
+
regex: "(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))"
|
202
|
+
},
|
203
|
+
{
|
204
|
+
token: [
|
205
|
+
"keyword.operator.asp"
|
206
|
+
],
|
207
|
+
regex: "\\-|\\+|\\*\\\/|\\>|\\<|\\=|\\&"
|
208
|
+
}
|
209
|
+
],
|
210
|
+
"state_3": [
|
211
|
+
{
|
212
|
+
token: [
|
213
|
+
"meta.odd-tab.tabs",
|
214
|
+
"meta.even-tab.tabs"
|
215
|
+
],
|
216
|
+
regex: "(\\t)(\\t)?"
|
217
|
+
},
|
218
|
+
{
|
219
|
+
token: "meta.leading-space",
|
220
|
+
regex: "(?=[^\\t])",
|
221
|
+
next: "start"
|
222
|
+
},
|
223
|
+
{
|
224
|
+
token: "meta.leading-space",
|
225
|
+
regex: ".",
|
226
|
+
next: "state_3"
|
227
|
+
}
|
228
|
+
],
|
229
|
+
"state_4": [
|
230
|
+
{
|
231
|
+
token: [
|
232
|
+
"meta.odd-tab.spaces",
|
233
|
+
"meta.even-tab.spaces"
|
234
|
+
],
|
235
|
+
regex: "( )( )?"
|
236
|
+
},
|
237
|
+
{
|
238
|
+
token: "meta.leading-space",
|
239
|
+
regex: "(?=[^ ])",
|
240
|
+
next: "start"
|
241
|
+
},
|
242
|
+
{
|
243
|
+
token: "meta.leading-space",
|
244
|
+
regex: ".",
|
245
|
+
next: "state_4"
|
246
|
+
}
|
247
|
+
],
|
248
|
+
"comment": [
|
249
|
+
{
|
250
|
+
token: "comment.line.apostrophe.asp",
|
251
|
+
regex: "$|(?=(?:%>))",
|
252
|
+
next: "start"
|
253
|
+
},
|
254
|
+
{
|
255
|
+
token: "comment.line.apostrophe.asp",
|
256
|
+
regex: "."
|
257
|
+
}
|
258
|
+
],
|
259
|
+
"string": [
|
260
|
+
{
|
261
|
+
token: "constant.character.escape.apostrophe.asp",
|
262
|
+
regex: '""'
|
263
|
+
},
|
264
|
+
{
|
265
|
+
token: "string.quoted.double.asp",
|
266
|
+
regex: '"',
|
267
|
+
next: "start"
|
268
|
+
},
|
269
|
+
{
|
270
|
+
token: "string.quoted.double.asp",
|
271
|
+
regex: "."
|
272
|
+
}
|
273
|
+
]
|
274
|
+
}
|
275
|
+
|
276
|
+
};
|
277
|
+
|
278
|
+
oop.inherits(VBScriptHighlightRules, TextHighlightRules);
|
279
|
+
|
280
|
+
exports.VBScriptHighlightRules = VBScriptHighlightRules;
|
281
|
+
});
|