dubious 0.0.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +202 -0
- data/README.rdoc +160 -0
- data/ROADMAP.rdoc +28 -0
- data/Rakefile +130 -0
- data/bin/dubious +4 -0
- data/examples/contacts/Rakefile +169 -0
- data/examples/contacts/WEB-INF/app.yaml +9 -0
- data/examples/contacts/WEB-INF/appengine-web.xml +14 -0
- data/examples/contacts/WEB-INF/classes/controllers/ApplicationController.class +0 -0
- data/examples/contacts/WEB-INF/classes/controllers/ContactsController.class +0 -0
- data/examples/contacts/WEB-INF/classes/controllers/InfoPropertiesController.class +0 -0
- data/examples/contacts/WEB-INF/classes/controllers/SourceController.class +0 -0
- data/examples/contacts/WEB-INF/classes/models/Contact$Query.class +0 -0
- data/examples/contacts/WEB-INF/classes/models/Contact.class +0 -0
- data/examples/contacts/WEB-INF/lib/appengine-api.jar +0 -0
- data/examples/contacts/WEB-INF/lib/dubious.jar +0 -0
- data/examples/contacts/WEB-INF/lib/dubydatastore.jar +0 -0
- data/examples/contacts/WEB-INF/web.xml +3 -0
- data/examples/contacts/app.yaml +44 -0
- data/examples/contacts/app/controllers/application_controller.mirah +5 -0
- data/examples/contacts/app/controllers/contacts_controller.mirah +62 -0
- data/examples/contacts/app/controllers/info_properties_controller.mirah +55 -0
- data/examples/contacts/app/controllers/source_controller.mirah +30 -0
- data/examples/contacts/app/models/contact.mirah +28 -0
- data/examples/contacts/app/views/contacts/edit.html.erb +50 -0
- data/examples/contacts/app/views/contacts/index.html.erb +38 -0
- data/examples/contacts/app/views/contacts/new.html.erb +49 -0
- data/examples/contacts/app/views/contacts/show.html.erb +47 -0
- data/examples/contacts/app/views/layouts/application.html.erb +10 -0
- data/examples/contacts/app/views/layouts/contacts.html.erb +20 -0
- data/examples/contacts/app/views/source/list.html.erb +27 -0
- data/examples/contacts/app/views/source/show.html.erb +15 -0
- data/examples/contacts/config/application.properties +4 -0
- data/examples/contacts/config/asset.properties +32 -0
- data/examples/contacts/config/build.properties +10 -0
- data/examples/contacts/config/routes.properties +1 -0
- data/examples/contacts/public/404.html +30 -0
- data/examples/contacts/public/422.html +30 -0
- data/examples/contacts/public/500.html +30 -0
- data/examples/contacts/public/favicon.ico +0 -0
- data/examples/contacts/public/images/appengine_duby.png +0 -0
- data/examples/contacts/public/images/back.gif +0 -0
- data/examples/contacts/public/images/dir.gif +0 -0
- data/examples/contacts/public/images/dubious.png +0 -0
- data/examples/contacts/public/images/file.gif +0 -0
- data/examples/contacts/public/images/silver-120x30.gif +0 -0
- data/examples/contacts/public/index.html +144 -0
- data/examples/contacts/public/javascripts/effects.js +1128 -0
- data/examples/contacts/public/javascripts/jquery.rails.min.js +117 -0
- data/examples/contacts/public/javascripts/lang/sh_css.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_duby.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_erb.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_html.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_java.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_js.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_mirah.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_properties.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_rb.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_sh.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_xml.min.js +1 -0
- data/examples/contacts/public/javascripts/lang/sh_yaml.min.js +1 -0
- data/examples/contacts/public/javascripts/prototype.js +4320 -0
- data/examples/contacts/public/javascripts/sh_main.min.js +4 -0
- data/examples/contacts/public/robots.txt +0 -0
- data/examples/contacts/public/stylesheets/main.css +188 -0
- data/examples/contacts/public/stylesheets/scaffold.css +57 -0
- data/examples/contacts/public/stylesheets/sh_style.css +66 -0
- data/examples/contacts/public/stylesheets/source.css +27 -0
- data/examples/shout/Rakefile +138 -0
- data/examples/shout/WEB-INF/appengine-web.xml +14 -0
- data/examples/shout/WEB-INF/web.xml +11 -0
- data/examples/shout/app.mirah +35 -0
- data/examples/shout/app.yaml +11 -0
- data/examples/shout/public/404.html +30 -0
- data/examples/shout/public/422.html +30 -0
- data/examples/shout/public/500.html +30 -0
- data/examples/shout/public/favicon.ico +0 -0
- data/examples/shout/public/images/appengine_duby.png +0 -0
- data/examples/shout/public/images/back.gif +0 -0
- data/examples/shout/public/images/dir.gif +0 -0
- data/examples/shout/public/images/file.gif +0 -0
- data/examples/shout/public/images/silver-120x30.gif +0 -0
- data/examples/shout/public/index.html +116 -0
- data/examples/shout/public/javascripts/effects.js +1128 -0
- data/examples/shout/public/javascripts/jquery.rails.min.js +117 -0
- data/examples/shout/public/javascripts/prototype.js +4320 -0
- data/examples/shout/public/robots.txt +0 -0
- data/examples/shout/public/stylesheets/main.css +185 -0
- data/examples/shout/public/stylesheets/scaffold.css +57 -0
- data/examples/shout/views/application.html.erb +10 -0
- data/examples/shout/views/list.html.erb +14 -0
- data/javalib/dubydatastore.jar +0 -0
- data/lib/dubious.jar +0 -0
- data/lib/dubious.rb +2 -0
- data/lib/dubious/cli.rb +65 -0
- data/lib/dubious/templates/base/Rakefile +169 -0
- data/lib/dubious/templates/base/WEB-INF/app.yaml.tt +9 -0
- data/lib/dubious/templates/base/app/controllers/application_controller.mirah +5 -0
- data/lib/dubious/templates/base/config/application.properties.tt +6 -0
- data/lib/dubious/templates/base/config/asset.properties +0 -0
- data/lib/dubious/templates/base/config/build.properties +0 -0
- data/lib/dubious/templates/base/config/routes.properties +1 -0
- data/lib/dubious/templates/base/public/404.html +30 -0
- data/lib/dubious/templates/base/public/422.html +30 -0
- data/lib/dubious/templates/base/public/500.html +30 -0
- data/lib/dubious/templates/base/public/favicon.ico +0 -0
- data/lib/dubious/templates/base/public/images/appengine_duby.png +0 -0
- data/lib/dubious/templates/base/public/images/back.gif +0 -0
- data/lib/dubious/templates/base/public/images/dir.gif +0 -0
- data/lib/dubious/templates/base/public/images/dubious.png +0 -0
- data/lib/dubious/templates/base/public/images/file.gif +0 -0
- data/lib/dubious/templates/base/public/images/silver-120x30.gif +0 -0
- data/lib/dubious/templates/base/public/index.html +144 -0
- data/lib/dubious/templates/base/public/javascripts/jquery.rails.min.js +117 -0
- data/lib/dubious/templates/base/public/robots.txt +0 -0
- data/lib/dubious/templates/base/public/stylesheets/main.css +188 -0
- data/lib/dubious/templates/base/public/stylesheets/scaffold.css +57 -0
- data/lib/dubious/templates/generator/controller.mirah.tt +5 -0
- data/lib/dubious/templates/generator/model.mirah.tt +6 -0
- metadata +224 -0
@@ -0,0 +1,4 @@
|
|
1
|
+
/* Copyright (C) 2007, 2008 gnombat@users.sourceforge.net */
|
2
|
+
/* License: http://shjs.sourceforge.net/doc/gplv3.html */
|
3
|
+
|
4
|
+
if(!this.sh_languages){this.sh_languages={}}var sh_requests={};function sh_isEmailAddress(a){if(/^mailto:/.test(a)){return false}return a.indexOf("@")!==-1}function sh_setHref(b,c,d){var a=d.substring(b[c-2].pos,b[c-1].pos);if(a.length>=2&&a.charAt(0)==="<"&&a.charAt(a.length-1)===">"){a=a.substr(1,a.length-2)}if(sh_isEmailAddress(a)){a="mailto:"+a}b[c-2].node.href=a}function sh_konquerorExec(b){var a=[""];a.index=b.length;a.input=b;return a}function sh_highlightString(B,o){if(/Konqueror/.test(navigator.userAgent)){if(!o.konquered){for(var F=0;F<o.length;F++){for(var H=0;H<o[F].length;H++){var G=o[F][H][0];if(G.source==="$"){G.exec=sh_konquerorExec}}}o.konquered=true}}var N=document.createElement("a");var q=document.createElement("span");var A=[];var j=0;var n=[];var C=0;var k=null;var x=function(i,a){var p=i.length;if(p===0){return}if(!a){var Q=n.length;if(Q!==0){var r=n[Q-1];if(!r[3]){a=r[1]}}}if(k!==a){if(k){A[j++]={pos:C};if(k==="sh_url"){sh_setHref(A,j,B)}}if(a){var P;if(a==="sh_url"){P=N.cloneNode(false)}else{P=q.cloneNode(false)}P.className=a;A[j++]={node:P,pos:C}}}C+=p;k=a};var t=/\r\n|\r|\n/g;t.lastIndex=0;var d=B.length;while(C<d){var v=C;var l;var w;var h=t.exec(B);if(h===null){l=d;w=d}else{l=h.index;w=t.lastIndex}var g=B.substring(v,l);var M=[];for(;;){var I=C-v;var D;var y=n.length;if(y===0){D=0}else{D=n[y-1][2]}var O=o[D];var z=O.length;var m=M[D];if(!m){m=M[D]=[]}var E=null;var u=-1;for(var K=0;K<z;K++){var f;if(K<m.length&&(m[K]===null||I<=m[K].index)){f=m[K]}else{var c=O[K][0];c.lastIndex=I;f=c.exec(g);m[K]=f}if(f!==null&&(E===null||f.index<E.index)){E=f;u=K;if(f.index===I){break}}}if(E===null){x(g.substring(I),null);break}else{if(E.index>I){x(g.substring(I,E.index),null)}var e=O[u];var J=e[1];var b;if(J instanceof Array){for(var L=0;L<J.length;L++){b=E[L+1];x(b,J[L])}}else{b=E[0];x(b,J)}switch(e[2]){case -1:break;case -2:n.pop();break;case -3:n.length=0;break;default:n.push(e);break}}}if(k){A[j++]={pos:C};if(k==="sh_url"){sh_setHref(A,j,B)}k=null}C=w}return A}function sh_getClasses(d){var a=[];var b=d.className;if(b&&b.length>0){var e=b.split(" ");for(var c=0;c<e.length;c++){if(e[c].length>0){a.push(e[c])}}}return a}function sh_addClass(c,a){var d=sh_getClasses(c);for(var b=0;b<d.length;b++){if(a.toLowerCase()===d[b].toLowerCase()){return}}d.push(a);c.className=d.join(" ")}function sh_extractTagsFromNodeList(c,a){var f=c.length;for(var d=0;d<f;d++){var e=c.item(d);switch(e.nodeType){case 1:if(e.nodeName.toLowerCase()==="br"){var b;if(/MSIE/.test(navigator.userAgent)){b="\r"}else{b="\n"}a.text.push(b);a.pos++}else{a.tags.push({node:e.cloneNode(false),pos:a.pos});sh_extractTagsFromNodeList(e.childNodes,a);a.tags.push({pos:a.pos})}break;case 3:case 4:a.text.push(e.data);a.pos+=e.length;break}}}function sh_extractTags(c,b){var a={};a.text=[];a.tags=b;a.pos=0;sh_extractTagsFromNodeList(c.childNodes,a);return a.text.join("")}function sh_mergeTags(d,f){var a=d.length;if(a===0){return f}var c=f.length;if(c===0){return d}var i=[];var e=0;var b=0;while(e<a&&b<c){var h=d[e];var g=f[b];if(h.pos<=g.pos){i.push(h);e++}else{i.push(g);if(f[b+1].pos<=h.pos){b++;i.push(f[b]);b++}else{i.push({pos:h.pos});f[b]={node:g.node.cloneNode(false),pos:h.pos}}}}while(e<a){i.push(d[e]);e++}while(b<c){i.push(f[b]);b++}return i}function sh_insertTags(k,h){var g=document;var l=document.createDocumentFragment();var e=0;var d=k.length;var b=0;var j=h.length;var c=l;while(b<j||e<d){var i;var a;if(e<d){i=k[e];a=i.pos}else{a=j}if(a<=b){if(i.node){var f=i.node;c.appendChild(f);c=f}else{c=c.parentNode}e++}else{c.appendChild(g.createTextNode(h.substring(b,a)));b=a}}return l}function sh_highlightElement(d,g){sh_addClass(d,"sh_sourceCode");var c=[];var e=sh_extractTags(d,c);var f=sh_highlightString(e,g);var b=sh_mergeTags(c,f);var a=sh_insertTags(b,e);while(d.hasChildNodes()){d.removeChild(d.firstChild)}d.appendChild(a)}function sh_getXMLHttpRequest(){if(window.ActiveXObject){return new ActiveXObject("Msxml2.XMLHTTP")}else{if(window.XMLHttpRequest){return new XMLHttpRequest()}}throw"No XMLHttpRequest implementation available"}function sh_load(language,element,prefix,suffix){if(language in sh_requests){sh_requests[language].push(element);return}sh_requests[language]=[element];var request=sh_getXMLHttpRequest();var url=prefix+"sh_"+language+suffix;request.open("GET",url,true);request.onreadystatechange=function(){if(request.readyState===4){try{if(!request.status||request.status===200){eval(request.responseText);var elements=sh_requests[language];for(var i=0;i<elements.length;i++){sh_highlightElement(elements[i],sh_languages[language])}}else{throw"HTTP error: status "+request.status}}finally{request=null}}};request.send(null)}function sh_highlightDocument(g,k){var b=document.getElementsByTagName("pre");for(var e=0;e<b.length;e++){var f=b.item(e);var a=sh_getClasses(f);for(var c=0;c<a.length;c++){var h=a[c].toLowerCase();if(h==="sh_sourcecode"){continue}if(h.substr(0,3)==="sh_"){var d=h.substring(3);if(d in sh_languages){sh_highlightElement(f,sh_languages[d])}else{if(typeof(g)==="string"&&typeof(k)==="string"){sh_load(d,f,g,k)}else{throw'Found <pre> element with class="'+h+'", but no such language exists'}}break}}}};
|
File without changes
|
@@ -0,0 +1,188 @@
|
|
1
|
+
body {
|
2
|
+
margin: 0;
|
3
|
+
margin-bottom: 25px;
|
4
|
+
padding: 0;
|
5
|
+
background-color: #f0f0f0;
|
6
|
+
font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
|
7
|
+
font-size: 13px;
|
8
|
+
color: #333;
|
9
|
+
}
|
10
|
+
|
11
|
+
h1 {
|
12
|
+
font-size: 28px;
|
13
|
+
color: #000;
|
14
|
+
}
|
15
|
+
|
16
|
+
a {color: #666}
|
17
|
+
a:hover {
|
18
|
+
background-color: #ccc;
|
19
|
+
color: white;
|
20
|
+
text-decoration: none;
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
#page {
|
25
|
+
background-color: #f0f0f0;
|
26
|
+
width: 750px;
|
27
|
+
margin: 0;
|
28
|
+
margin-left: auto;
|
29
|
+
margin-right: auto;
|
30
|
+
}
|
31
|
+
|
32
|
+
#content {
|
33
|
+
float: left;
|
34
|
+
background-color: white;
|
35
|
+
border: 3px solid #aaa;
|
36
|
+
border-top: none;
|
37
|
+
padding: 25px;
|
38
|
+
width: 500px;
|
39
|
+
}
|
40
|
+
|
41
|
+
#sidebar {
|
42
|
+
float: right;
|
43
|
+
width: 175px;
|
44
|
+
}
|
45
|
+
|
46
|
+
#footer {
|
47
|
+
clear: both;
|
48
|
+
}
|
49
|
+
|
50
|
+
#header, #about, #getting-started {
|
51
|
+
padding-left: 75px;
|
52
|
+
padding-right: 30px;
|
53
|
+
}
|
54
|
+
|
55
|
+
#header {
|
56
|
+
background-image: url("/images/dubious.png");
|
57
|
+
background-repeat: no-repeat;
|
58
|
+
background-position: top left;
|
59
|
+
height: 64px;
|
60
|
+
}
|
61
|
+
|
62
|
+
#header h1, #header h2 {margin: 0}
|
63
|
+
#header h2 {
|
64
|
+
color: #888;
|
65
|
+
font-weight: normal;
|
66
|
+
font-size: 16px;
|
67
|
+
}
|
68
|
+
|
69
|
+
td.mono { font-family: "Andale Mono", "monospace"; }
|
70
|
+
|
71
|
+
#about h3 {
|
72
|
+
margin: 0;
|
73
|
+
margin-bottom: 10px;
|
74
|
+
font-size: 14px;
|
75
|
+
}
|
76
|
+
|
77
|
+
#about-content {
|
78
|
+
background-color: #ffd;
|
79
|
+
border: 1px solid #fc0;
|
80
|
+
margin-left: -11px;
|
81
|
+
}
|
82
|
+
#about-content table {
|
83
|
+
margin-top: 10px;
|
84
|
+
margin-bottom: 10px;
|
85
|
+
font-size: 11px;
|
86
|
+
border-collapse: collapse;
|
87
|
+
}
|
88
|
+
#about-content td {
|
89
|
+
padding: 10px;
|
90
|
+
padding-top: 3px;
|
91
|
+
padding-bottom: 3px;
|
92
|
+
}
|
93
|
+
#about-content td.name {color: #555}
|
94
|
+
#about-content td.value {color: #000}
|
95
|
+
|
96
|
+
#about-content.failure {
|
97
|
+
background-color: #fcc;
|
98
|
+
border: 1px solid #f00;
|
99
|
+
}
|
100
|
+
#about-content.failure p {
|
101
|
+
margin: 0;
|
102
|
+
padding: 10px;
|
103
|
+
}
|
104
|
+
|
105
|
+
code {
|
106
|
+
color: Brown;
|
107
|
+
}
|
108
|
+
|
109
|
+
#getting-started {
|
110
|
+
border-top: 1px solid #ccc;
|
111
|
+
margin-top: 25px;
|
112
|
+
padding-top: 15px;
|
113
|
+
}
|
114
|
+
#getting-started h1 {
|
115
|
+
margin: 0;
|
116
|
+
font-size: 20px;
|
117
|
+
}
|
118
|
+
#getting-started h2 {
|
119
|
+
margin: 0;
|
120
|
+
font-size: 14px;
|
121
|
+
font-weight: normal;
|
122
|
+
color: #333;
|
123
|
+
margin-bottom: 25px;
|
124
|
+
}
|
125
|
+
#getting-started ul {
|
126
|
+
margin-left: 0;
|
127
|
+
padding-left: 0;
|
128
|
+
}
|
129
|
+
#getting-started ol {
|
130
|
+
margin-left: 0;
|
131
|
+
padding-left: 0;
|
132
|
+
}
|
133
|
+
#getting-started li {
|
134
|
+
font-size: 18px;
|
135
|
+
color: #888;
|
136
|
+
margin-bottom: 25px;
|
137
|
+
}
|
138
|
+
#getting-started li h2 {
|
139
|
+
margin: 0;
|
140
|
+
font-weight: normal;
|
141
|
+
font-size: 18px;
|
142
|
+
color: #333;
|
143
|
+
}
|
144
|
+
#getting-started li p {
|
145
|
+
color: #555;
|
146
|
+
font-size: 13px;
|
147
|
+
}
|
148
|
+
|
149
|
+
|
150
|
+
#search {
|
151
|
+
margin: 0;
|
152
|
+
padding-top: 10px;
|
153
|
+
padding-bottom: 10px;
|
154
|
+
font-size: 11px;
|
155
|
+
}
|
156
|
+
#search input {
|
157
|
+
font-size: 11px;
|
158
|
+
margin: 2px;
|
159
|
+
}
|
160
|
+
#search-text {width: 170px}
|
161
|
+
|
162
|
+
|
163
|
+
#sidebar ul {
|
164
|
+
margin-left: 0;
|
165
|
+
padding-left: 0;
|
166
|
+
}
|
167
|
+
#sidebar ul h3 {
|
168
|
+
margin-top: 25px;
|
169
|
+
font-size: 16px;
|
170
|
+
padding-bottom: 10px;
|
171
|
+
border-bottom: 1px solid #ccc;
|
172
|
+
}
|
173
|
+
#sidebar li {
|
174
|
+
list-style-type: none;
|
175
|
+
}
|
176
|
+
#sidebar ul.links li {
|
177
|
+
margin-bottom: 5px;
|
178
|
+
}
|
179
|
+
span.comment {
|
180
|
+
color: blue;
|
181
|
+
font-weight: plain;
|
182
|
+
}
|
183
|
+
pre {
|
184
|
+
font-size: 12pt;
|
185
|
+
}
|
186
|
+
span.appid {
|
187
|
+
color: green;
|
188
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
div.ui-datepicker-title { font-size: 8pt; }
|
2
|
+
th { font-size: 8pt; }
|
3
|
+
|
4
|
+
body { background-color: #fff; color: #333; }
|
5
|
+
|
6
|
+
body, p, ol, ul, td {
|
7
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
8
|
+
font-size: 13px;
|
9
|
+
line-height: 18px;
|
10
|
+
}
|
11
|
+
|
12
|
+
pre {
|
13
|
+
background-color: #eee;
|
14
|
+
padding: 10px;
|
15
|
+
font-size: 11px;
|
16
|
+
}
|
17
|
+
|
18
|
+
a { color: #000; }
|
19
|
+
a:visited { color: #666; }
|
20
|
+
a:hover { color: #fff; background-color:#000; }
|
21
|
+
|
22
|
+
.fieldWithErrors {
|
23
|
+
padding: 2px;
|
24
|
+
background-color: red;
|
25
|
+
display: table;
|
26
|
+
}
|
27
|
+
|
28
|
+
#errorExplanation {
|
29
|
+
width: 400px;
|
30
|
+
border: 2px solid red;
|
31
|
+
padding: 7px;
|
32
|
+
padding-bottom: 12px;
|
33
|
+
margin-bottom: 20px;
|
34
|
+
background-color: #f0f0f0;
|
35
|
+
}
|
36
|
+
|
37
|
+
#errorExplanation h2 {
|
38
|
+
text-align: left;
|
39
|
+
font-weight: bold;
|
40
|
+
padding: 5px 5px 5px 15px;
|
41
|
+
font-size: 12px;
|
42
|
+
margin: -7px;
|
43
|
+
background-color: #c00;
|
44
|
+
color: #fff;
|
45
|
+
}
|
46
|
+
|
47
|
+
#errorExplanation p {
|
48
|
+
color: #333;
|
49
|
+
margin-bottom: 0;
|
50
|
+
padding: 5px;
|
51
|
+
}
|
52
|
+
|
53
|
+
#errorExplanation ul li {
|
54
|
+
font-size: 12px;
|
55
|
+
list-style: square;
|
56
|
+
}
|
57
|
+
|
@@ -0,0 +1,66 @@
|
|
1
|
+
pre.sh_sourceCode {
|
2
|
+
background-color: white;
|
3
|
+
color: black;
|
4
|
+
font-style: normal;
|
5
|
+
font-weight: normal;
|
6
|
+
}
|
7
|
+
|
8
|
+
pre.sh_sourceCode .sh_keyword { color: blue; font-weight: bold; } /* language keywords */
|
9
|
+
pre.sh_sourceCode .sh_type { color: darkgreen; } /* basic types */
|
10
|
+
pre.sh_sourceCode .sh_usertype { color: teal; } /* user defined types */
|
11
|
+
pre.sh_sourceCode .sh_string { color: red; font-family: monospace; } /* strings and chars */
|
12
|
+
pre.sh_sourceCode .sh_regexp { color: orange; font-family: monospace; } /* regular expressions */
|
13
|
+
pre.sh_sourceCode .sh_specialchar { color: pink; font-family: monospace; } /* e.g., \n, \t, \\ */
|
14
|
+
pre.sh_sourceCode .sh_comment { color: brown; font-style: italic; } /* comments */
|
15
|
+
pre.sh_sourceCode .sh_number { color: purple; } /* literal numbers */
|
16
|
+
pre.sh_sourceCode .sh_preproc { color: darkblue; font-weight: bold; } /* e.g., #include, import */
|
17
|
+
pre.sh_sourceCode .sh_symbol { color: darkred; } /* e.g., <, >, + */
|
18
|
+
pre.sh_sourceCode .sh_function { color: black; font-weight: bold; } /* function calls and declarations */
|
19
|
+
pre.sh_sourceCode .sh_cbracket { color: red; } /* block brackets (e.g., {, }) */
|
20
|
+
pre.sh_sourceCode .sh_todo { font-weight: bold; background-color: cyan; } /* TODO and FIXME */
|
21
|
+
|
22
|
+
/* Predefined variables and functions (for instance glsl) */
|
23
|
+
pre.sh_sourceCode .sh_predef_var { color: darkblue; }
|
24
|
+
pre.sh_sourceCode .sh_predef_func { color: darkblue; font-weight: bold; }
|
25
|
+
|
26
|
+
/* for OOP */
|
27
|
+
pre.sh_sourceCode .sh_classname { color: teal; }
|
28
|
+
|
29
|
+
/* line numbers (not yet implemented) */
|
30
|
+
pre.sh_sourceCode .sh_linenum { color: black; font-family: monospace; }
|
31
|
+
|
32
|
+
/* Internet related */
|
33
|
+
pre.sh_sourceCode .sh_url { color: blue; text-decoration: underline; font-family: monospace; }
|
34
|
+
|
35
|
+
/* for ChangeLog and Log files */
|
36
|
+
pre.sh_sourceCode .sh_date { color: blue; font-weight: bold; }
|
37
|
+
pre.sh_sourceCode .sh_time, pre.sh_sourceCode .sh_file { color: darkblue; font-weight: bold; }
|
38
|
+
pre.sh_sourceCode .sh_ip, pre.sh_sourceCode .sh_name { color: darkgreen; }
|
39
|
+
|
40
|
+
/* for Prolog, Perl... */
|
41
|
+
pre.sh_sourceCode .sh_variable { color: darkgreen; }
|
42
|
+
|
43
|
+
/* for LaTeX */
|
44
|
+
pre.sh_sourceCode .sh_italics { color: darkgreen; font-style: italic; }
|
45
|
+
pre.sh_sourceCode .sh_bold { color: darkgreen; font-weight: bold; }
|
46
|
+
pre.sh_sourceCode .sh_underline { color: darkgreen; text-decoration: underline; }
|
47
|
+
pre.sh_sourceCode .sh_fixed { color: green; font-family: monospace; }
|
48
|
+
pre.sh_sourceCode .sh_argument { color: darkgreen; }
|
49
|
+
pre.sh_sourceCode .sh_optionalargument { color: purple; }
|
50
|
+
pre.sh_sourceCode .sh_math { color: orange; }
|
51
|
+
pre.sh_sourceCode .sh_bibtex { color: blue; }
|
52
|
+
|
53
|
+
/* for diffs */
|
54
|
+
pre.sh_sourceCode .sh_oldfile { color: orange; }
|
55
|
+
pre.sh_sourceCode .sh_newfile { color: darkgreen; }
|
56
|
+
pre.sh_sourceCode .sh_difflines { color: blue; }
|
57
|
+
|
58
|
+
/* for css */
|
59
|
+
pre.sh_sourceCode .sh_selector { color: purple; }
|
60
|
+
pre.sh_sourceCode .sh_property { color: blue; }
|
61
|
+
pre.sh_sourceCode .sh_value { color: darkgreen; font-style: italic; }
|
62
|
+
|
63
|
+
/* other */
|
64
|
+
pre.sh_sourceCode .sh_section { color: black; font-weight: bold; }
|
65
|
+
pre.sh_sourceCode .sh_paren { color: red; }
|
66
|
+
pre.sh_sourceCode .sh_attribute { color: darkgreen; }
|
@@ -0,0 +1,27 @@
|
|
1
|
+
body {
|
2
|
+
font-family: sans-serif;
|
3
|
+
background-color: #f0f0f0; }
|
4
|
+
pre {
|
5
|
+
width: 48em;
|
6
|
+
font-size:10pt;
|
7
|
+
background-color: #fff;
|
8
|
+
border: thin solid Gray;
|
9
|
+
padding: 1em;
|
10
|
+
margin: 2em; }
|
11
|
+
div.main {
|
12
|
+
font-family: sans-serif;
|
13
|
+
font-size:10pt;
|
14
|
+
width: 20em;
|
15
|
+
background-color: #fff;
|
16
|
+
border: thin solid Gray;
|
17
|
+
padding: 1em;
|
18
|
+
margin: 2em; }
|
19
|
+
div.head {
|
20
|
+
font-weight: bold;
|
21
|
+
font-size: 12pt;
|
22
|
+
margin-bottom: 9px;
|
23
|
+
padding-bottom: 3px;
|
24
|
+
border-bottom: thin solid orange; }
|
25
|
+
|
26
|
+
#shout_title { width: 200px; }
|
27
|
+
#shout_body { width: 600px; }
|
@@ -0,0 +1,138 @@
|
|
1
|
+
begin
|
2
|
+
require 'ant'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'This Rakefile requires JRuby. Please use jruby -S rake.'
|
5
|
+
exit 1
|
6
|
+
end
|
7
|
+
|
8
|
+
if ENV['MIRAH_HOME'] && File.exist?(ENV['MIRAH_HOME'] +'/lib/mirah.rb')
|
9
|
+
$: << File.expand_path(ENV['MIRAH_HOME'] +'/lib')
|
10
|
+
end
|
11
|
+
|
12
|
+
if File.exist?('../bitescript/lib/bitescript.rb')
|
13
|
+
$: << File.expand_path('../bitescript/lib/')
|
14
|
+
end
|
15
|
+
|
16
|
+
MIRAH_HOME = ENV['MIRAH_HOME'] ? ENV['MIRAH_HOME'] : Gem.find_files('mirah').first.sub(/lib\/mirah.rb/,'')
|
17
|
+
|
18
|
+
MODEL_SRC_JAR = File.join(MIRAH_HOME, 'examples', 'appengine', 'war',
|
19
|
+
'WEB-INF', 'lib', 'dubydatastore.jar')
|
20
|
+
MODEL_JAR = "WEB-INF/lib/dubydatastore.jar"
|
21
|
+
|
22
|
+
require 'rake/clean'
|
23
|
+
require 'mirah/appengine_tasks'
|
24
|
+
|
25
|
+
def mirahc *files
|
26
|
+
if files[-1].kind_of?(Hash)
|
27
|
+
options = files.pop
|
28
|
+
else
|
29
|
+
options = {}
|
30
|
+
end
|
31
|
+
source_dir = options.fetch(:dir, Duby.source_path)
|
32
|
+
dest = File.expand_path(options.fetch(:dest, Duby.dest_path))
|
33
|
+
files = files.map {|f| f.sub(/^#{source_dir}\//, '')}
|
34
|
+
flags = options.fetch(:options, Duby.compiler_options)
|
35
|
+
args = ['-d', dest, *flags] + files
|
36
|
+
chdir(source_dir) do
|
37
|
+
cmd = "mirahc #{args.join ' '}"
|
38
|
+
puts cmd
|
39
|
+
if files.any? {|f|f.include? 'controllers'}
|
40
|
+
system cmd
|
41
|
+
else
|
42
|
+
Duby.compile(*args)
|
43
|
+
Duby.reset
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
OUTDIR = 'WEB-INF/classes'
|
50
|
+
|
51
|
+
def class_files_for files
|
52
|
+
files.map do |f|
|
53
|
+
explode = f.split('/')[1..-1]
|
54
|
+
explode.last.gsub!(/(^[a-z]|_[a-z])/) {|m|m.sub('_','').upcase}
|
55
|
+
explode.last.sub! /\.(duby|java|mirah)$/, '.class'
|
56
|
+
OUTDIR + '/' + explode.join('/')
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
CLASSPATH = [AppEngine::Rake::SERVLET, AppEngine::SDK::API_JAR].join(":")
|
61
|
+
|
62
|
+
Duby.dest_paths << OUTDIR
|
63
|
+
Duby.source_paths << '.'
|
64
|
+
Duby.compiler_options << '--classpath' << [File.expand_path(OUTDIR), *FileList["WEB-INF/lib/*.jar"].map{|f|File.expand_path(f)}].join(':') + ':' + CLASSPATH
|
65
|
+
|
66
|
+
CLEAN.include(OUTDIR)
|
67
|
+
CLOBBER.include("WEB-INF/lib/dubious.jar", 'WEB-INF/appengine-generated')
|
68
|
+
|
69
|
+
APP_SRC = [File.expand_path "app.mirah"]
|
70
|
+
APP_CLASSES = ["#{OUTDIR}/ShoutController.class","#{OUTDIR}/Shout.class"]
|
71
|
+
TEMPLATES = Dir["views/**/*.erb"]
|
72
|
+
|
73
|
+
directory OUTDIR
|
74
|
+
|
75
|
+
APP_CLASSES.each do |klass|
|
76
|
+
file klass => APP_SRC do
|
77
|
+
mirahc *APP_SRC
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
file MODEL_JAR => MODEL_SRC_JAR do |t|
|
82
|
+
cp MODEL_SRC_JAR, MODEL_JAR
|
83
|
+
end
|
84
|
+
|
85
|
+
appengine_app :app, 'app', '' => APP_CLASSES
|
86
|
+
|
87
|
+
#there is an upload task in appengine_tasks, but I couldn't get it to work
|
88
|
+
desc "publish to appengine"
|
89
|
+
task :publish => 'compile:app' do
|
90
|
+
sh "appcfg.sh update ."
|
91
|
+
end
|
92
|
+
|
93
|
+
namespace :compile do
|
94
|
+
task :app => APP_CLASSES
|
95
|
+
end
|
96
|
+
|
97
|
+
desc "compile app"
|
98
|
+
task :compile => 'compile:app'
|
99
|
+
|
100
|
+
desc "run development server"
|
101
|
+
task :server
|
102
|
+
|
103
|
+
task :default => :server
|
104
|
+
|
105
|
+
task :generate_build_properties do
|
106
|
+
def git_data(dir, file='')
|
107
|
+
returning = nil
|
108
|
+
chdir dir do
|
109
|
+
# ["commit abc....123", "2010-06-23 12:58:06 -0700"]
|
110
|
+
IO.popen("git rev-list --pretty=format:%ci -1 HEAD #{file}") do |f|
|
111
|
+
returning = [f.gets.chomp, f.gets.chomp]
|
112
|
+
end
|
113
|
+
end
|
114
|
+
returning
|
115
|
+
end
|
116
|
+
|
117
|
+
dubious_data = git_data(".")
|
118
|
+
mirah_data = git_data(MIRAH_HOME)
|
119
|
+
bite_data = git_data(MIRAH_HOME + '/../bitescript')
|
120
|
+
model_data = git_data(File.dirname(MODEL_SRC_JAR),File.basename(MODEL_SRC_JAR))
|
121
|
+
|
122
|
+
prop_file = "config/build.properties"
|
123
|
+
File.open(prop_file, 'w') do |f|
|
124
|
+
f.write <<-EOF
|
125
|
+
# the current build environment
|
126
|
+
application.build.time=#{Time.now.xmlschema}
|
127
|
+
dubious.version.commit=#{dubious_data[0][7..-1]}
|
128
|
+
dubious.version.time=#{Time.parse(dubious_data[1]).xmlschema}
|
129
|
+
mirah.version.commit=#{mirah_data[0][7..-1]}
|
130
|
+
mirah.version.time=#{Time.parse(mirah_data[1]).xmlschema}
|
131
|
+
bitescript.version.commit=#{bite_data[0][7..-1]}
|
132
|
+
bitescript.version.time=#{Time.parse(bite_data[1]).xmlschema}
|
133
|
+
model.version.commit=#{model_data[0][7..-1]}
|
134
|
+
model.version.time=#{Time.parse(model_data[1]).xmlschema}
|
135
|
+
EOF
|
136
|
+
end
|
137
|
+
|
138
|
+
end
|