gokart 0.0.6 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/assets/config.rb +1 -1
- data/assets/config/config-release.json +4 -4
- data/assets/src/www/app/sass/presentation.css.scss +11 -2
- data/assets/src/www/app/scripts/pages/presentation.js +11 -6
- data/assets/src/www/app/scripts/views/presentation_view.js +1 -0
- data/assets/src/www/app/templates/pages/home.gotmpl +2 -2
- data/assets/src/www/app/templates/pages/presentation.gotmpl +137 -16
- data/assets/src/www/spec/all-spec.js +0 -1
- data/assets/src/www/vendor/js/highlight-min.js +1 -1
- data/assets/tasks/www.rake +3 -1
- data/bin/gokart +1 -1
- data/lib/gokart/version.rb +1 -1
- metadata +32 -35
- data/assets/pkg/linux_amd64/server/config.a +0 -0
- data/assets/pkg/linux_amd64/server/controller.a +0 -0
- data/assets/pkg/linux_amd64/server/view.a +0 -0
data/assets/config.rb
CHANGED
@@ -3,14 +3,14 @@
|
|
3
3
|
"assets": "./bin/assets/www-min",
|
4
4
|
|
5
5
|
"urlAssets": "/assets/",
|
6
|
-
"urlRoot": "/",
|
6
|
+
"urlRoot": "/goapps/gokart/",
|
7
7
|
|
8
|
-
"static":
|
8
|
+
"static": false,
|
9
9
|
"debug": false,
|
10
10
|
|
11
11
|
"http": {
|
12
|
-
"port":
|
13
|
-
"address": ""
|
12
|
+
"port": 8020,
|
13
|
+
"address": "127.0.0.1"
|
14
14
|
},
|
15
15
|
|
16
16
|
"https": {
|
@@ -5,7 +5,7 @@ $slideWidth: 1000px;
|
|
5
5
|
.presentation {
|
6
6
|
font-size: 20px;
|
7
7
|
width: $slideWidth;
|
8
|
-
margin:
|
8
|
+
margin: 10px auto;
|
9
9
|
|
10
10
|
.pres-slides {
|
11
11
|
.presentation-slide {
|
@@ -35,6 +35,11 @@ $slideWidth: 1000px;
|
|
35
35
|
|
36
36
|
h1 {
|
37
37
|
font-size: 58px;
|
38
|
+
border-bottom: 2px solid;
|
39
|
+
}
|
40
|
+
|
41
|
+
pre {
|
42
|
+
font-size: 16px;
|
38
43
|
}
|
39
44
|
|
40
45
|
.bottom-right {
|
@@ -42,11 +47,15 @@ $slideWidth: 1000px;
|
|
42
47
|
right: 50px;
|
43
48
|
bottom: 50px;
|
44
49
|
}
|
50
|
+
|
51
|
+
.main-title {
|
52
|
+
font-size: 78px;
|
53
|
+
}
|
45
54
|
}
|
46
55
|
|
47
56
|
.pres-controls {
|
48
57
|
text-align: center;
|
49
|
-
display: none
|
58
|
+
/*display: none;*/
|
50
59
|
|
51
60
|
.pres-control{
|
52
61
|
display: inline-block;
|
@@ -11,12 +11,17 @@ define('pages/presentation_page', [
|
|
11
11
|
|
12
12
|
this.view = new PresentationView({
|
13
13
|
slides: [
|
14
|
-
'
|
15
|
-
'
|
16
|
-
'
|
17
|
-
'
|
18
|
-
'
|
19
|
-
'
|
14
|
+
'Intro',
|
15
|
+
'WhatIsGokart',
|
16
|
+
'WhyCreate',
|
17
|
+
'DevEnv',
|
18
|
+
'WebServer',
|
19
|
+
'HTML',
|
20
|
+
'HTMLGo',
|
21
|
+
'Client',
|
22
|
+
'ClientTesting',
|
23
|
+
'Improvements',
|
24
|
+
'Questions'
|
20
25
|
]
|
21
26
|
});
|
22
27
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{{define "home.contents"}}
|
2
2
|
<div class="info-block">
|
3
3
|
<h3>Go Kart</h3>
|
4
|
-
<p>Combination of tools which will make developing webapps using go easier. The gokart gem by default combines SASS, Javascript, Coffee Script, Rake, and
|
4
|
+
<p>Combination of tools which will make developing webapps using go easier. The gokart gem by default combines SASS, Javascript, Coffee Script, Rake, and Sprokets with Go to provide a great development environment. This environment supports test driven development (TDD) with ruby guard and jasmine.</p>
|
5
5
|
<p>There are no external dependencies other than Go and ruby (which I expect you already have...). All dependencies are installed via bundler after the project directory is created.</p>
|
6
6
|
<p>Example <a href="{{PathJoin .Common.RootURL "/presentation/" "show"}}">Presentation</a></p>
|
7
7
|
</div>
|
@@ -29,7 +29,7 @@
|
|
29
29
|
<li><strong>src/www/app/</strong> - All of you Coffee script, sass, and Go Template are found here</li>
|
30
30
|
<li><strong>src/www/spec/</strong> - All coffee script spec files which will be compiled into js and run using jasmine.</li>
|
31
31
|
<li><strong>src/www/vendor/</strong> - js/css/image files for third party tools and libraries</li>
|
32
|
-
<li><strong>tasks/</strong> - Rake tasks to build, run, and test the application. There are several tasks which you can run do 'rake --tasks' to see a complete list of them. 'rake app:test' to run test units, 'rake app:start' to build and run, use
|
32
|
+
<li><strong>tasks/</strong> - Rake tasks to build, run, and test the application. There are several tasks which you can run do 'rake --tasks' to see a complete list of them. 'rake app:test' to run test units, 'rake app:start' to build and run, use startdebug for a debug build. Note: when you do 'rake jasmine' or rake 'app:guard' you probably want to start these tasks in different tabs because they run until killed.</li>
|
33
33
|
</ul>
|
34
34
|
</div>
|
35
35
|
|
@@ -10,7 +10,7 @@
|
|
10
10
|
</div>
|
11
11
|
</script>
|
12
12
|
|
13
|
-
<script id="
|
13
|
+
<script id="IntroTemplate" type="text/html">
|
14
14
|
<div class="slide-content">
|
15
15
|
<h1 class="main-title">gokart</h1>
|
16
16
|
<div class="bottom-right">
|
@@ -20,16 +20,16 @@
|
|
20
20
|
</div>
|
21
21
|
</script>
|
22
22
|
|
23
|
-
<script id="
|
23
|
+
<script id="WhatIsGokartTemplate" type="text/html">
|
24
24
|
<div class="slide-content">
|
25
|
-
<h1>What is
|
25
|
+
<h1>What is gokart?</h1>
|
26
26
|
<ul>
|
27
27
|
<li><p>Ruby gem to create a development environment for Go web applications have structured client scripting</p></li>
|
28
28
|
<li>
|
29
29
|
<p>Self contained web server</p>
|
30
30
|
<ul>
|
31
31
|
<li><p>Serves static and dynamically rendered content</p></li>
|
32
|
-
<li><p>
|
32
|
+
<li><p>Supports SSL(soon)</p></li>
|
33
33
|
</ul>
|
34
34
|
</li>
|
35
35
|
<li><p>Integrates with existing Go workspaces without pollution</p></li>
|
@@ -39,7 +39,34 @@
|
|
39
39
|
</div>
|
40
40
|
</script>
|
41
41
|
|
42
|
-
<script id="
|
42
|
+
<script id="WhyCreateTemplate" type="text/html">
|
43
|
+
<div class="slide-content">
|
44
|
+
<h1>Why Create gokart?</h1>
|
45
|
+
<ul>
|
46
|
+
<li><p>Integration between go web app and web scripting</p></li>
|
47
|
+
<li><p>Single development environment</p></li>
|
48
|
+
<li><p>Simplified build/release commands, examples:</p></li>
|
49
|
+
</ul>
|
50
|
+
<pre><code class="Text">
|
51
|
+
rake app:build # To do a complete build of the web app
|
52
|
+
rake app:server:test # To run the go servers unit tests
|
53
|
+
rake app:guard # Start guard watching for local file changes
|
54
|
+
</code></pre>
|
55
|
+
</div>
|
56
|
+
</script>
|
57
|
+
|
58
|
+
<script id="Challenges" type="text/html">
|
59
|
+
<div class="slide-content">
|
60
|
+
<h1>Challenges</h1>
|
61
|
+
<ul>
|
62
|
+
<li><p>Creating environment from a gem</p></li>
|
63
|
+
<li><p>Using Sprockets in Rake tasks</p></li>
|
64
|
+
<li><p>Integration between </p></li>
|
65
|
+
</ul>
|
66
|
+
</div>
|
67
|
+
</script>
|
68
|
+
|
69
|
+
<script id="DevEnvTemplate" type="text/html">
|
43
70
|
<div class="slide-content">
|
44
71
|
<h1>Development Environment</h1>
|
45
72
|
<ul>
|
@@ -73,7 +100,7 @@
|
|
73
100
|
</div>
|
74
101
|
</script>
|
75
102
|
|
76
|
-
<script id="
|
103
|
+
<script id="WebServerTemplate" type="text/html">
|
77
104
|
<div class="slide-content">
|
78
105
|
<h1>Web Server</h1>
|
79
106
|
<ul>
|
@@ -103,7 +130,68 @@
|
|
103
130
|
</div>
|
104
131
|
</script>
|
105
132
|
|
106
|
-
<script id="
|
133
|
+
<script id="HTMLTemplate" type="text/html">
|
134
|
+
<div class="slide-content">
|
135
|
+
<h1>HTML Templates</h1>
|
136
|
+
<ul>
|
137
|
+
<li><p>Templates compiled by sprockets into single file</p></li>
|
138
|
+
<li><p>Accept models from controller when rendered</p></li>
|
139
|
+
<li><p>Templates used with ERB helpers during compilation</p></li>
|
140
|
+
</ul>
|
141
|
+
<pre><code class="ruby">
|
142
|
+
erb_helpers.rb:
|
143
|
+
module ErbHelper
|
144
|
+
def ErbHelper.asset_link(asset, prefix)
|
145
|
+
src = "{{PathJoin .Common.RootURL \"/assets/\" \"#{asset}\"}}"
|
146
|
+
if (prefix == 'js')
|
147
|
+
return "<script type=\"text/javascript\" src=\"#{src}\"></script>"
|
148
|
+
|
149
|
+
elsif (prefix == 'css')
|
150
|
+
return "<link rel=\"stylesheet\" type=\"text/css\" href=\"#{src}\">"
|
151
|
+
end
|
152
|
+
end
|
153
|
+
...
|
154
|
+
end
|
155
|
+
</div>
|
156
|
+
</script>
|
157
|
+
<script id="HTMLGoTemplate" type="text/html">
|
158
|
+
<div class="slide-content">
|
159
|
+
<h1>HTML Templates</h1>
|
160
|
+
<pre><code class="html">
|
161
|
+
{{define "base.header"}}
|
162
|
+
<!DOCTYPE html>
|
163
|
+
<html>
|
164
|
+
<head>
|
165
|
+
<title>{{.Common.Title}}</title>
|
166
|
+
{{if .Common.Debug}}{{template "base.header.assets.debug" .}}{{else}}{{template "base.header.assets" .}}{{end}}
|
167
|
+
</head>
|
168
|
+
<body>
|
169
|
+
{{template "html_templates"}}
|
170
|
+
{{end}}
|
171
|
+
|
172
|
+
{{define "base.header.assets"}}
|
173
|
+
<script type="text/javascript" src="ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
174
|
+
<% ErbHelper::each_compiled_asset(ASSET_BUNDLES, @@sprockets) do |asset, prefix| %>
|
175
|
+
<%= ErbHelper::asset_link(asset, prefix) %>
|
176
|
+
<% end %>
|
177
|
+
{{end}}
|
178
|
+
|
179
|
+
{{define "base.header.assets.debug"}}
|
180
|
+
<script type="text/javascript" src="ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
|
181
|
+
<% ErbHelper::each_compiled_debug_asset(ASSET_BUNDLES, @@sprockets) do |asset, prefix| %>
|
182
|
+
<%= ErbHelper::asset_link(asset, prefix) %>
|
183
|
+
<% end %>
|
184
|
+
{{end}}
|
185
|
+
|
186
|
+
{{define "base.footer"}}
|
187
|
+
</body>
|
188
|
+
</html>
|
189
|
+
{{end}}
|
190
|
+
</code></pre>
|
191
|
+
</div>
|
192
|
+
</script>
|
193
|
+
|
194
|
+
<script id="ClientTemplate" type="text/html">
|
107
195
|
<div class="slide-content">
|
108
196
|
<h1>Client Scripting and Content</h1>
|
109
197
|
<ul>
|
@@ -120,25 +208,47 @@
|
|
120
208
|
<li><p>Compatible with most of require.js</p></li>
|
121
209
|
</ul>
|
122
210
|
</li>
|
211
|
+
</ul>
|
212
|
+
<pre><code class="javascript">
|
213
|
+
define('GokartPres/utilities/logger', [
|
214
|
+
'deferred',
|
215
|
+
], function LoggerModule(Deferred) {
|
216
|
+
. . .
|
217
|
+
return Logger;
|
218
|
+
});
|
219
|
+
</code></pre>
|
220
|
+
</div>
|
221
|
+
</script>
|
222
|
+
|
223
|
+
<script id="ClientTestingTemplate" type="text/html">
|
224
|
+
<div class="slide-content">
|
225
|
+
<h1>Client Scripting Unit Tests</h1>
|
226
|
+
<ul>
|
123
227
|
<li>
|
124
|
-
<p>Jasmine
|
228
|
+
<p>Jasmine</p>
|
125
229
|
<ul>
|
126
230
|
<li><p>Integrated with guard, and rake tasks</p></li>
|
127
231
|
<li><p>Test driven development</p></li>
|
128
232
|
</ul>
|
129
233
|
</li>
|
130
|
-
<li>
|
131
|
-
<p>Build</p>
|
132
|
-
<ul>
|
133
|
-
<li><p>Release: Single compressed JS/CSS files</p></li>
|
134
|
-
<li><p>Debug: JS/CSS files maintain pathing</p></li>
|
135
|
-
</ul>
|
136
|
-
</li>
|
137
234
|
</ul>
|
235
|
+
<pre><code class="javascript">
|
236
|
+
define('spec/all', [
|
237
|
+
'spec/helpers/mocks',
|
238
|
+
'spec/utilities/test',
|
239
|
+
'spec/utilities/deferred',
|
240
|
+
'spec/utilities/properties'
|
241
|
+
], function(){});
|
242
|
+
|
243
|
+
window.addEventListener('load', function(){
|
244
|
+
require('spec/all');
|
245
|
+
jasmine.getEnv().execute()
|
246
|
+
}, false);
|
247
|
+
</code></pre>
|
138
248
|
</div>
|
139
249
|
</script>
|
140
250
|
|
141
|
-
<script id="
|
251
|
+
<script id="ImprovementsTemplate" type="text/html">
|
142
252
|
<div class="slide-content">
|
143
253
|
<h1>Improvements</h1>
|
144
254
|
<ul>
|
@@ -173,6 +283,17 @@
|
|
173
283
|
</div>
|
174
284
|
</script>
|
175
285
|
|
286
|
+
<script id="QuestionsTemplate" type="text/html">
|
287
|
+
<div class="slide-content">
|
288
|
+
<h1>Questions?</h1>
|
289
|
+
<ul>
|
290
|
+
<li><p>Github: github.com/jasondelponte/gokart</p></li>
|
291
|
+
<li><p>Ruby Gems: rubygems.org/gems/gokart</p></li>
|
292
|
+
<li><p>This presentation: jasondelponte.com/goapps/gokart</p></li>
|
293
|
+
</ul>
|
294
|
+
</div>
|
295
|
+
</script>
|
296
|
+
|
176
297
|
<script type="text/javascript">
|
177
298
|
var PresentationPage = require('pages/presentation_page');
|
178
299
|
|
@@ -1 +1 @@
|
|
1
|
-
var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+(q.parentNode?q.parentNode.className:"")).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\b\\s*"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(E,F,C){function o(r,N){for(var M=0;M<N.c.length;M++){var L=N.c[M].bR.exec(r);if(L&&L.index==0){return N.c[M]}}}function s(L,r){if(L.e&&L.eR.test(r)){return L}if(L.eW){return s(L.parent,r)}}function t(r,L){return !C&&L.i&&L.iR.test(r)}function y(M,r){var L=G.cI?r[0].toLowerCase():r[0];return M.k.hasOwnProperty(L)&&M.k[L]}function H(){var L=l(w);if(!A.k){return L}var r="";var O=0;A.lR.lastIndex=0;var M=A.lR.exec(L);while(M){r+=L.substr(O,M.index-O);var N=y(A,M);if(N){v+=N[1];r+='<span class="'+N[0]+'">'+M[0]+"</span>"}else{r+=M[0]}O=A.lR.lastIndex;M=A.lR.exec(L)}return r+L.substr(O)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function K(){return A.sL!==undefined?z():H()}function J(M,r){var L=M.cN?'<span class="'+M.cN+'">':"";if(M.rB){x+=L;w=""}else{if(M.eB){x+=l(r)+L;w=""}else{x+=L;w=r}}A=Object.create(M,{parent:{value:A}});B+=M.r}function D(L,r){w+=L;if(r===undefined){x+=K();return 0}var M=o(r,A);if(M){x+=K();J(M,r);return M.rB?0:r.length}var N=s(A,r);if(N){if(!(N.rE||N.eE)){w+=r}x+=K();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=N.parent);if(N.eE){x+=l(r)}w="";if(N.starts){J(N.starts,"")}return N.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var G=e[E];f(G);var A=G;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(F);if(!u){break}q=D(F.substr(p,u.index-p),u[0]);p=u.index+q}D(F.substr(p));return{r:B,keyword_count:v,value:x,language:E}}catch(I){if(I=="Illegal"){return{r:0,keyword_count:0,value:l(F)}}else{throw I}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s,false);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v,true):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.go=function(a){var b={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer",constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{k:b,i:"</",c:[a.CLCM,a.CBLCLM,a.QSM,{cN:"string",b:"'",e:"[^\\\\]'",r:0},{cN:"string",b:"`",e:"`"},{cN:"number",b:"[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?",r:0},a.CNM]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",i:"\\n",c:[{b:"\\\\[\\\\/]"}]},{b:"<",e:">;",sL:"xml"}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}(hljs);hljs.LANGUAGES.css=function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:"import page media charset",c:[c,a.ASM,a.QSM,a.NM]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);
|
1
|
+
var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+(q.parentNode?q.parentNode.className:"")).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\b\\s*"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(E,F,C){function o(r,N){for(var M=0;M<N.c.length;M++){var L=N.c[M].bR.exec(r);if(L&&L.index==0){return N.c[M]}}}function s(L,r){if(L.e&&L.eR.test(r)){return L}if(L.eW){return s(L.parent,r)}}function t(r,L){return !C&&L.i&&L.iR.test(r)}function y(M,r){var L=G.cI?r[0].toLowerCase():r[0];return M.k.hasOwnProperty(L)&&M.k[L]}function H(){var L=l(w);if(!A.k){return L}var r="";var O=0;A.lR.lastIndex=0;var M=A.lR.exec(L);while(M){r+=L.substr(O,M.index-O);var N=y(A,M);if(N){v+=N[1];r+='<span class="'+N[0]+'">'+M[0]+"</span>"}else{r+=M[0]}O=A.lR.lastIndex;M=A.lR.exec(L)}return r+L.substr(O)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function K(){return A.sL!==undefined?z():H()}function J(M,r){var L=M.cN?'<span class="'+M.cN+'">':"";if(M.rB){x+=L;w=""}else{if(M.eB){x+=l(r)+L;w=""}else{x+=L;w=r}}A=Object.create(M,{parent:{value:A}});B+=M.r}function D(L,r){w+=L;if(r===undefined){x+=K();return 0}var M=o(r,A);if(M){x+=K();J(M,r);return M.rB?0:r.length}var N=s(A,r);if(N){if(!(N.rE||N.eE)){w+=r}x+=K();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=N.parent);if(N.eE){x+=l(r)}w="";if(N.starts){J(N.starts,"")}return N.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var G=e[E];f(G);var A=G;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(F);if(!u){break}q=D(F.substr(p,u.index-p),u[0]);p=u.index+q}D(F.substr(p));return{r:B,keyword_count:v,value:x,language:E}}catch(I){if(I=="Illegal"){return{r:0,keyword_count:0,value:l(F)}}else{throw I}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s,false);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v,true):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.go=function(a){var b={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer",constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{k:b,i:"</",c:[a.CLCM,a.CBLCLM,a.QSM,{cN:"string",b:"'",e:"[^\\\\]'",r:0},{cN:"string",b:"`",e:"`"},{cN:"number",b:"[^a-zA-Z_0-9](\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s)(\\+|\\-)?\\d+)?",r:0},a.CNM]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.markdown=function(a){return{c:[{cN:"header",b:"^#{1,3}",e:"$"},{cN:"header",b:"^.+?\\n[=-]{2,}$"},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",b:"\\*.+?\\*"},{cN:"emphasis",b:"_.+?_",r:0},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",b:"`.+?`"},{cN:"code",b:"^ ",e:"$",r:0},{cN:"horizontal_rule",b:"^-{3,}",e:"$"},{b:"\\[.+?\\]\\(.+?\\)",rB:true,c:[{cN:"link_label",b:"\\[.+\\]"},{cN:"link_url",b:"\\(",e:"\\)",eB:true,eE:true}]}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",i:"\\n",c:[{b:"\\\\[\\\\/]"}]},{b:"<",e:">;",sL:"xml"}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}(hljs);hljs.LANGUAGES.css=function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:"import page media charset",c:[c,a.ASM,a.QSM,a.NM]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}(hljs);hljs.LANGUAGES.ruby=function(e){var a="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var j="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var g={keyword:"and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include"};var c={cN:"yardoctag",b:"@[A-Za-z]+"};var k=[{cN:"comment",b:"#",e:"$",c:[c]},{cN:"comment",b:"^\\=begin",e:"^\\=end",c:[c],r:10},{cN:"comment",b:"^__END__",e:"\\n$"}];var d={cN:"subst",b:"#\\{",e:"}",l:a,k:g};var i=[e.BE,d];var b=[{cN:"string",b:"'",e:"'",c:i,r:0},{cN:"string",b:'"',e:'"',c:i,r:0},{cN:"string",b:"%[qw]?\\(",e:"\\)",c:i},{cN:"string",b:"%[qw]?\\[",e:"\\]",c:i},{cN:"string",b:"%[qw]?{",e:"}",c:i},{cN:"string",b:"%[qw]?<",e:">",c:i,r:10},{cN:"string",b:"%[qw]?/",e:"/",c:i,r:10},{cN:"string",b:"%[qw]?%",e:"%",c:i,r:10},{cN:"string",b:"%[qw]?-",e:"-",c:i,r:10},{cN:"string",b:"%[qw]?\\|",e:"\\|",c:i,r:10}];var h={cN:"function",bWK:true,e:" |$|;",k:"def",c:[{cN:"title",b:j,l:a,k:g},{cN:"params",b:"\\(",e:"\\)",l:a,k:g}].concat(k)};var f=k.concat(b.concat([{cN:"class",bWK:true,e:"$|;",k:"class module",c:[{cN:"title",b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",r:0},{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]}].concat(k)},h,{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:b.concat([{b:j}]),r:0},{cN:"symbol",b:a+":",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"number",b:"\\?\\w"},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:k.concat([{cN:"regexp",b:"/",e:"/[a-z]*",i:"\\n",c:[e.BE,d]}]),r:0}]));d.c=f;h.c[1].c=f;return{l:a,k:g,c:f}}(hljs);hljs.LANGUAGES.bash=function(a){var g="true false";var e="if then else elif fi for break continue while in do done echo exit return set declare";var c={cN:"variable",b:"\\$[a-zA-Z0-9_#]+"};var b={cN:"variable",b:"\\${([^}]|\\\\})+}"};var h={cN:"string",b:'"',e:'"',i:"\\n",c:[a.BE,c,b],r:0};var d={cN:"string",b:"'",e:"'",c:[{b:"''"}],r:0};var f={cN:"test_condition",b:"",e:"",c:[h,d,c,b],k:{literal:g},r:0};return{k:{keyword:e,literal:g},c:[{cN:"shebang",b:"(#!\\/bin\\/bash)|(#!\\/bin\\/sh)",r:10},c,b,a.HCM,h,d,a.inherit(f,{b:"\\[ ",e:" \\]",r:0}),a.inherit(f,{b:"\\[\\[ ",e:" \\]\\]"})]}}(hljs);
|
data/assets/tasks/www.rake
CHANGED
@@ -96,6 +96,8 @@ namespace :app do
|
|
96
96
|
task :compile do
|
97
97
|
begin
|
98
98
|
ASSET_BUNDLES.each do |bundle|
|
99
|
+
next if bundle == "application.gotmpl"
|
100
|
+
|
99
101
|
assets = sprockets.find_asset(bundle)
|
100
102
|
|
101
103
|
# drop all extentions except the first
|
@@ -125,7 +127,7 @@ namespace :app do
|
|
125
127
|
begin
|
126
128
|
assets = sprockets.find_asset("application.gotmpl")
|
127
129
|
|
128
|
-
# drop all
|
130
|
+
# drop all extensions except the first
|
129
131
|
realname = assets.pathname.basename.to_s.split(".")[0..1].join(".")
|
130
132
|
outfile = TMPL_BUILD_PATH.join(realname)
|
131
133
|
|
data/bin/gokart
CHANGED
@@ -27,7 +27,7 @@ Open3.popen3('bundle install') do | i, o, e |
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
-
Open3.popen3('GOPATH
|
30
|
+
Open3.popen3('GOPATH=$GOPATH:./ go get github.com/jasondelponte/golib') do | i, o, e |
|
31
31
|
while (out = o.gets || err = e.gets)
|
32
32
|
$stdout.puts out unless out.nil?
|
33
33
|
$stderr.puts err unless err.nil?
|
data/lib/gokart/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gokart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sass
|
16
|
-
requirement: &
|
16
|
+
requirement: &13463920 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *13463920
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: coffee-script
|
27
|
-
requirement: &
|
27
|
+
requirement: &13463500 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *13463500
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: therubyracer
|
38
|
-
requirement: &
|
38
|
+
requirement: &13463080 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *13463080
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: sprockets
|
49
|
-
requirement: &
|
49
|
+
requirement: &13462660 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *13462660
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: guard
|
60
|
-
requirement: &
|
60
|
+
requirement: &13462240 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *13462240
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: guard-coffeescript
|
71
|
-
requirement: &
|
71
|
+
requirement: &13461820 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *13461820
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: guard-jasmine
|
82
|
-
requirement: &
|
82
|
+
requirement: &13461400 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *13461400
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: guard-sass
|
93
|
-
requirement: &
|
93
|
+
requirement: &13460980 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *13460980
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: guard-rake
|
104
|
-
requirement: &
|
104
|
+
requirement: &13460560 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *13460560
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: guard-livereload
|
115
|
-
requirement: &
|
115
|
+
requirement: &13476520 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *13476520
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: guard-shell
|
126
|
-
requirement: &
|
126
|
+
requirement: &13476100 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *13476100
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: jasmine
|
137
|
-
requirement: &
|
137
|
+
requirement: &13475680 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,10 +142,10 @@ dependencies:
|
|
142
142
|
version: '0'
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *13475680
|
146
146
|
- !ruby/object:Gem::Dependency
|
147
147
|
name: yui-compressor
|
148
|
-
requirement: &
|
148
|
+
requirement: &13475260 !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
151
151
|
- - ! '>='
|
@@ -153,10 +153,10 @@ dependencies:
|
|
153
153
|
version: '0'
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
|
-
version_requirements: *
|
156
|
+
version_requirements: *13475260
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: uglifier
|
159
|
-
requirement: &
|
159
|
+
requirement: &13474840 !ruby/object:Gem::Requirement
|
160
160
|
none: false
|
161
161
|
requirements:
|
162
162
|
- - ! '>='
|
@@ -164,10 +164,10 @@ dependencies:
|
|
164
164
|
version: '0'
|
165
165
|
type: :development
|
166
166
|
prerelease: false
|
167
|
-
version_requirements: *
|
167
|
+
version_requirements: *13474840
|
168
168
|
- !ruby/object:Gem::Dependency
|
169
169
|
name: bundler
|
170
|
-
requirement: &
|
170
|
+
requirement: &13474340 !ruby/object:Gem::Requirement
|
171
171
|
none: false
|
172
172
|
requirements:
|
173
173
|
- - ! '>='
|
@@ -175,7 +175,7 @@ dependencies:
|
|
175
175
|
version: 1.0.0
|
176
176
|
type: :runtime
|
177
177
|
prerelease: false
|
178
|
-
version_requirements: *
|
178
|
+
version_requirements: *13474340
|
179
179
|
description: Combination of tooks which will make developing webapps using go easier. The
|
180
180
|
gokart gem by default combines SASS, Coffee Script, Rake, and Sprokets with Go to
|
181
181
|
provide a great development environment. This environment supports test driven
|
@@ -194,9 +194,6 @@ files:
|
|
194
194
|
- lib/gokart/environment.rb
|
195
195
|
- lib/gokart/version.rb
|
196
196
|
- assets/Guardfile
|
197
|
-
- assets/pkg/linux_amd64/server/view.a
|
198
|
-
- assets/pkg/linux_amd64/server/config.a
|
199
|
-
- assets/pkg/linux_amd64/server/controller.a
|
200
197
|
- assets/config/config-debug.json
|
201
198
|
- assets/config/config-release.json
|
202
199
|
- assets/config.rb
|
Binary file
|
Binary file
|
Binary file
|