resin 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.
Files changed (83) hide show
  1. data/README.markdown +52 -0
  2. data/amber/css/amber.css +519 -0
  3. data/amber/css/documentation.css +84 -0
  4. data/amber/css/profstef.css +75 -0
  5. data/amber/css/style.css +313 -0
  6. data/amber/images/amber.png +0 -0
  7. data/amber/images/amber_small.png +0 -0
  8. data/amber/images/off.png +0 -0
  9. data/amber/images/offHover.png +0 -0
  10. data/amber/images/presentation.png +0 -0
  11. data/amber/images/profstef.png +0 -0
  12. data/amber/images/sprite.png +0 -0
  13. data/amber/images/tinylogo.png +0 -0
  14. data/amber/images/twitterwall.png +0 -0
  15. data/amber/js/Additional-Examples.deploy.js +15 -0
  16. data/amber/js/Additional-Examples.js +21 -0
  17. data/amber/js/Benchfib.deploy.js +132 -0
  18. data/amber/js/Benchfib.js +167 -0
  19. data/amber/js/Canvas.deploy.js +1304 -0
  20. data/amber/js/Canvas.js +1885 -0
  21. data/amber/js/Compiler.deploy.js +1871 -0
  22. data/amber/js/Compiler.js +2616 -0
  23. data/amber/js/Documentation.deploy.js +961 -0
  24. data/amber/js/Documentation.js +1376 -0
  25. data/amber/js/Examples.deploy.js +53 -0
  26. data/amber/js/Examples.js +73 -0
  27. data/amber/js/IDE.deploy.js +3468 -0
  28. data/amber/js/IDE.js +4883 -0
  29. data/amber/js/Kernel-Announcements.deploy.js +107 -0
  30. data/amber/js/Kernel-Announcements.js +152 -0
  31. data/amber/js/Kernel-Classes.deploy.js +675 -0
  32. data/amber/js/Kernel-Classes.js +956 -0
  33. data/amber/js/Kernel-Collections.deploy.js +3273 -0
  34. data/amber/js/Kernel-Collections.js +4644 -0
  35. data/amber/js/Kernel-Exceptions.deploy.js +244 -0
  36. data/amber/js/Kernel-Exceptions.js +349 -0
  37. data/amber/js/Kernel-Methods.deploy.js +510 -0
  38. data/amber/js/Kernel-Methods.js +739 -0
  39. data/amber/js/Kernel-Objects.deploy.js +2698 -0
  40. data/amber/js/Kernel-Objects.js +3858 -0
  41. data/amber/js/Kernel-Tests.deploy.js +1419 -0
  42. data/amber/js/Kernel-Tests.js +1929 -0
  43. data/amber/js/Kernel-Transcript.deploy.js +142 -0
  44. data/amber/js/Kernel-Transcript.js +202 -0
  45. data/amber/js/SUnit.deploy.js +351 -0
  46. data/amber/js/SUnit.js +501 -0
  47. data/amber/js/amber.js +250 -0
  48. data/amber/js/boot.js +587 -0
  49. data/amber/js/compat.js +22 -0
  50. data/amber/js/init.js +8 -0
  51. data/amber/js/lib/CodeMirror/LICENSE +19 -0
  52. data/amber/js/lib/CodeMirror/amber.css +21 -0
  53. data/amber/js/lib/CodeMirror/codemirror.css +67 -0
  54. data/amber/js/lib/CodeMirror/codemirror.js +2144 -0
  55. data/amber/js/lib/CodeMirror/smalltalk.js +134 -0
  56. data/amber/js/lib/jQuery/jquery-1.4.4.min.js +167 -0
  57. data/amber/js/lib/jQuery/jquery-1.6.4.min.js +4 -0
  58. data/amber/js/lib/jQuery/jquery-ui-1.8.16.custom.min.js +791 -0
  59. data/amber/js/lib/jQuery/jquery.textarea.js +267 -0
  60. data/amber/js/lib/peg-0.6.2.min.js +2 -0
  61. data/amber/js/lib/showdown.js +419 -0
  62. data/amber/js/parser.js +4005 -0
  63. data/amber/js/parser.pegjs +220 -0
  64. data/amber/st/Benchfib.st +124 -0
  65. data/amber/st/Canvas.st +556 -0
  66. data/amber/st/Compiler.st +1425 -0
  67. data/amber/st/Documentation.st +758 -0
  68. data/amber/st/Examples.st +38 -0
  69. data/amber/st/IDE.st +2336 -0
  70. data/amber/st/Kernel-Announcements.st +61 -0
  71. data/amber/st/Kernel-Classes.st +403 -0
  72. data/amber/st/Kernel-Collections.st +1673 -0
  73. data/amber/st/Kernel-Exceptions.st +124 -0
  74. data/amber/st/Kernel-Methods.st +287 -0
  75. data/amber/st/Kernel-Objects.st +1489 -0
  76. data/amber/st/Kernel-Tests.st +892 -0
  77. data/amber/st/Kernel-Transcript.st +70 -0
  78. data/amber/st/SUnit.st +172 -0
  79. data/bin/runresin +12 -0
  80. data/lib/resin.rb +0 -0
  81. data/lib/resin/app/app.rb +121 -0
  82. data/lib/resin/app/views/index.haml +10 -0
  83. metadata +216 -0
@@ -0,0 +1,52 @@
1
+ # Resin: a simple environment for Amber development
2
+
3
+
4
+ ## About
5
+
6
+ Resin is a simple [Sinatra](http://sinatrarb.com) application which allows for
7
+ a rapid-bootstrap of an [Amber](http://amber-lang.net) project.
8
+
9
+ The gem bundles a version of Amber and provides the necessary routes to
10
+ transparently serve up Amber assets *or* user-defined assets in their current
11
+ project directory
12
+
13
+ ## Getting Started
14
+
15
+ Read further, or you could just [watch this fanciful screencast](http://youtu.be/9NHCGJxQKlA)
16
+
17
+ First you'll need to install the Gem and make your project directory:
18
+
19
+ % mkdir my-project
20
+ % cd my-project
21
+ % gem install resin
22
+
23
+ Once the gem is installed, make some directories to store your own custom Amber
24
+ code:
25
+
26
+ % mkdir st js
27
+
28
+
29
+ These directories will allow you to commit your code from the Amber IDE, so
30
+ once they're created, just run Resin and navigate to
31
+ [localhost:4567](http://localhost:4567)
32
+
33
+ % runresin
34
+
35
+
36
+ ## Custom Views
37
+
38
+ Adding custom views is pretty easy, just create the `views` directory and start
39
+ adding [HAML](http://haml-lang.com) files into it. If for example if you wanted
40
+ to create a URL [localhost:4567/user](http://localhost:4567/user) then you
41
+ would create `views/user.haml` and fill in your template accordingly.
42
+
43
+ To embed the Amber JavaScripts in your custom views, you can just call the
44
+ `embed_amber` function:
45
+
46
+ %html
47
+ %head
48
+ %title
49
+ My Custom View
50
+ = embed_amber
51
+ %body
52
+ Hello World
@@ -0,0 +1,519 @@
1
+ body.jtalkBody {
2
+ margin-bottom: 350px;
3
+ }
4
+
5
+ #jtalkTabs, #jtalk .jt_tabs {
6
+ margin: 0;
7
+ padding: 0;
8
+ background: url("../images/sprite.png") #DBD9C9 0 -27px;
9
+ height: 22px;
10
+ width: 100%;
11
+ list-style: none;
12
+ font-weight: bold;
13
+ }
14
+
15
+ #jtalkTabs li, #jtalk .jt_tabs li {
16
+ padding: 0 1px;
17
+ cursor: pointer;
18
+ color: #565656;
19
+ max-width: 200px;
20
+ float:left;
21
+ }
22
+
23
+ #jtalk .ltab, #jtalk .rtab, #jtalk .mtab {
24
+ height: 22px;
25
+ float: left;
26
+ }
27
+
28
+ #jtalk .ltab, #jtalk .rtab {
29
+ width: 8px;
30
+ }
31
+
32
+ #jtalk .rtab {
33
+ margin-right: 1px;
34
+ }
35
+
36
+ #jtalk .mtab {
37
+ line-height: 20px;
38
+ }
39
+
40
+ #jtalkTabs li:hover .ltab,
41
+ #jtalk .jt_tabs li:hover .ltab {
42
+ background: url("../images/sprite.png") -16px -96px;
43
+ }
44
+
45
+ #jtalkTabs li:hover .mtab,
46
+ #jtalk .jt_tabs li:hover .mtab {
47
+ background: url("../images/sprite.png") 0 -73px;
48
+ }
49
+
50
+ #jtalkTabs li:hover .rtab,
51
+ #jtalk .jt_tabs li:hover .rtab {
52
+ background: url("../images/sprite.png") -24px -96px;
53
+ }
54
+
55
+ #jtalkTabs li.selected,
56
+ #jtalk .jt_tabs li.selected {
57
+ color: #111;
58
+ }
59
+
60
+ #jtalkTabs li.selected .ltab,
61
+ #jtalk .jt_tabs li.selected .ltab {
62
+ background: url("../images/sprite.png") 0px -96px;
63
+ }
64
+
65
+ #jtalkTabs li.selected .mtab,
66
+ #jtalk .jt_tabs li.selected .mtab {
67
+ background: url("../images/sprite.png") 0 -50px;
68
+ }
69
+
70
+ #jtalkTabs li.selected .rtab,
71
+ #jtalk .jt_tabs li.selected .rtab {
72
+ background: url("../images/sprite.png") -8px -96px;
73
+ }
74
+
75
+ #jtalkTabs li .close {
76
+ margin-right: 5px;
77
+ color: #aaa;
78
+ }
79
+
80
+ #jtalk {
81
+ position: fixed;
82
+ bottom: 0;
83
+ left: 0;
84
+ right: 0;
85
+ height: 350px;
86
+ z-index: 1000;
87
+ }
88
+
89
+ #jtalk, #jtalk button, #jtalk input, #jtalk select {
90
+ font-family: Lucida Grande, Tahoma, sans-serif;
91
+ font-size: 11px;
92
+ }
93
+
94
+ #jtalk #logo {
95
+ position: absolute;
96
+ top: 3px;
97
+ left: 8px;
98
+ width: 22px;
99
+ height: 20px;
100
+ background: url("../images/tinylogo.png") top left no-repeat;
101
+ }
102
+
103
+ #jtalk #jt_toolbar {
104
+ height: 27px;
105
+ background: url("../images/sprite.png") 0 0;
106
+ }
107
+
108
+ #jtalk #jt_toolbar input {
109
+ margin-left: 50px;
110
+ width: 250px;
111
+ margin-top: 5px;
112
+ }
113
+
114
+ #jtalk #jt_toolbar #jt_close {
115
+ position: absolute;
116
+ right: 4px;
117
+ top: 6px;
118
+ width: 16px;
119
+ height: 16px;
120
+ background: url('../images/off.png');
121
+ cursor: pointer;
122
+ }
123
+
124
+ #jtalk #jt_toolbar #jt_close:hover {
125
+ background: url('../images/offHover.png');
126
+ }
127
+
128
+
129
+ #jtalk .ui-resizable-handle {
130
+ background-color: transparent;
131
+ top: 0;
132
+ cursor: row-resize;
133
+ height: 5px;
134
+ left: 0;
135
+ position: absolute;
136
+ right: 0;
137
+ width: auto !important;
138
+ }
139
+
140
+ .jtalkTool {
141
+ width: 100%;
142
+ color: #333;
143
+ line-height: 1.3em;
144
+ padding: 0;
145
+ margin: 0;
146
+ position: absolute;
147
+ bottom: 0;
148
+ left: 0;
149
+ top: 49px;
150
+ z-index: 1000;
151
+ background: white;
152
+ }
153
+
154
+ .jtalkTool .jt_box {
155
+ width: 100%;
156
+ margin: 0;
157
+ position: absolute;
158
+ top: 0;
159
+ bottom: 27px;
160
+ }
161
+
162
+ .jtalkTool .jt_buttons {
163
+ position: absolute;
164
+ bottom: 0;
165
+ left: 0;
166
+ right: 0;
167
+ height: 27px;
168
+ line-height: 27px;
169
+ background: url("../images/sprite.png") 0 0 repeat;
170
+ }
171
+
172
+ .jtalkTool .jt_buttons .right {
173
+ float: right;
174
+ }
175
+
176
+ .jtalkTool .important {
177
+ font-weight: bold;
178
+ }
179
+
180
+
181
+ .jtalkTool button {
182
+ border: 1px solid transparent;
183
+ background: transparent;
184
+ padding: 2px 4px;
185
+ margin-left: 4px;
186
+ cursor: pointer;
187
+ }
188
+
189
+ .jtalkTool button:hover {
190
+ border-top: 1px solid #fff;
191
+ border-left: 1px solid #fff;
192
+ border-right: 1px solid #bbb;
193
+ border-bottom: 1px solid #bbb;
194
+ }
195
+
196
+ .jtalkTool button:active {
197
+ border-top: 1px solid #bbb;
198
+ border-left: 1px solid #bbb;
199
+ border-right: 1px solid #fff;
200
+ border-bottom: 1px solid #fff;
201
+ background: #ddd;
202
+ }
203
+
204
+ .jtalkTool select, #jtalk input {
205
+ border-top: 1px solid #bbb;
206
+ border-left: 1px solid #bbb;
207
+ border-right: 1px solid #fff;
208
+ border-bottom: 1px solid #fff;
209
+ background: #fff;
210
+ margin-top: 0;
211
+ margin-bottom: 0;
212
+ padding-top: 0;
213
+ padding-bottom: 0;
214
+ }
215
+
216
+ .jtalkTool li {
217
+ margin: 0;
218
+ padding: 0;
219
+ }
220
+
221
+ .jtalkTool .source {
222
+ height: 100%;
223
+ }
224
+
225
+ .jtalkTool textarea,
226
+ .jtalkTool input {
227
+ border: 0 none;
228
+ font-family: Arial, Helvetica, sans;
229
+ line-height: 1.3em;
230
+ font-size: 12px;
231
+ position: relative;
232
+ padding: 0;
233
+ }
234
+
235
+ .jtalkTool .CodeMirror {
236
+ border: 0 none;
237
+ font-family: Arial, Helvetica, sans;
238
+ font-size: 12px;
239
+ line-height: 1.3em;
240
+ height: 100%;
241
+ background: white;
242
+ }
243
+
244
+ .jtalkTool .CodeMirror-scroll {
245
+ height: 100%;
246
+ }
247
+
248
+ .talkTool .CodeMirror-scroll pre {
249
+ font-family: Arial, Helvetica, sans;
250
+ }
251
+
252
+ .jtalkTool .jt_clear {
253
+ clear: both;
254
+ }
255
+
256
+ .jtalkTool .jt_transcript,
257
+ .jtalkTool .jt_workspace {
258
+ width: 100%;
259
+ height: 100%;
260
+ }
261
+
262
+ .jtalkTool .jt_packagesButtons {
263
+ position: absolute;
264
+ top: 149px;
265
+ left: 0;
266
+ z-index: 1;
267
+ }
268
+
269
+ .jtalkTool .jt_column {
270
+ width: 25%;
271
+ padding: 0;
272
+ margin: 0;
273
+ float: left;
274
+ outline: 1px solid #aaa;
275
+ border: 0 none;
276
+ height: 150px;
277
+ overflow-y: auto;
278
+ background: #fff;
279
+ color: #111;
280
+ position: absolute;
281
+ top: 0;
282
+ }
283
+
284
+ .jtalkTool .jt_column.classes {
285
+ left: 25%
286
+ }
287
+
288
+ .jtalkTool .jt_column.classes ul {
289
+ margin-left: 0;
290
+ }
291
+
292
+ .jtalkTool .jt_column.classes ul li {
293
+ padding-left: 10px;
294
+ margin-left: 0;
295
+ }
296
+
297
+ .jtalkTool .jt_column.protocols {
298
+ left: 50%
299
+ }
300
+
301
+ .jtalkTool .jt_column.methods {
302
+ left: 75%
303
+ }
304
+
305
+ .jtalkTool .jt_column li {
306
+ list-style-type: none;
307
+ padding-left: 5px;
308
+ cursor: pointer;
309
+ color: #111;
310
+ font-weight: bold;
311
+ }
312
+
313
+ .jtalkTool .jt_column li.selected {
314
+ background: #e3e3e3;
315
+ color: #222;
316
+ }
317
+
318
+ .jtalkTool .jt_column li:hover {
319
+ background: #08c;
320
+ color: white;
321
+ }
322
+
323
+ #jtalk .jtalkTool .jt_tabs {
324
+ top: 150px;
325
+ position: absolute;
326
+ }
327
+
328
+ #jtalk .jtalkTool .jt_tabs.jt_browser {
329
+ padding-left: 25%;
330
+ }
331
+
332
+ .jtalkTool .jt_sourceCode {
333
+ position: absolute;
334
+ top: 172px;
335
+ bottom: 0;
336
+ left: 0;
337
+ right: 0;
338
+ }
339
+
340
+ .jtalkTool .jt_sourceCode textarea.source {
341
+ width: 100%;
342
+ height: 100%;
343
+ }
344
+
345
+ /* Debugger & inspector */
346
+
347
+ .jtalkTool .jt_box .label {
348
+ width: 100%;
349
+ font-weight: bold;
350
+ text-align: center;
351
+ position: absolute;
352
+ line-height: 1.5em;
353
+ font-size: 16px;
354
+ color: red;
355
+ background: url("../images/sprite.png") top left repeat;
356
+ height: 27px;
357
+ }
358
+
359
+ .jtalkTool .jt_box .jt_column.debugger {
360
+ top: 178px;
361
+ }
362
+
363
+ .jtalkTool .jt_box .jt_column.debugger.contexts {
364
+ top: 27px;
365
+ width: 100%;
366
+ }
367
+
368
+ .jtalkTool .jt_sourceCode.debugger {
369
+ width: 60%;
370
+ top: 178px;
371
+ }
372
+
373
+ .jtalkTool .jt_box .jt_column.debugger.variables {
374
+ width: 10%;
375
+ left: 60%;
376
+ bottom: 0;
377
+ position: absolute;
378
+ height: auto;
379
+ }
380
+
381
+ .jtalkTool .jt_box .jt_column.debugger.inspector {
382
+ width: 30%;
383
+ left: 70%;
384
+ bottom: 0;
385
+ position: absolute;
386
+ height: auto;
387
+ }
388
+
389
+ .jtalkTool .jt_button.debugger.inspect {
390
+ position: absolute;
391
+ left: 60%;
392
+ }
393
+
394
+ .jtalkTool .jt_column.value {
395
+ left: 25%;
396
+ width: 75%;
397
+ }
398
+
399
+ .jtalkTool .jt_buttons.inspector {
400
+ position: absolute;
401
+ top: 150px;
402
+ }
403
+
404
+
405
+ /* ReferencesBrowser */
406
+
407
+ .jtalkTool .jt_box .implementors {
408
+ width: 100%
409
+ }
410
+
411
+ .jtalkTool .jt_box .jt_column.implementors,
412
+ .jtalkTool .jt_box .jt_column.senders,
413
+ .jtalkTool .jt_box .jt_column.referenced_classes {
414
+ top: 20px;
415
+ height: auto;
416
+ bottom: 0;
417
+ width: 33.333%;
418
+ }
419
+
420
+ .jtalkTool .jt_box .jt_column.senders {
421
+ left: 33.333%
422
+ }
423
+
424
+ .jtalkTool .jt_box .jt_column.referenced_classes {
425
+ left: 66.67%
426
+ }
427
+
428
+ .jtalkTool .jt_box .jt_column.implementors .column_label,
429
+ .jtalkTool .jt_box .jt_column.senders .column_label,
430
+ .jtalkTool .jt_box .jt_column.referenced_classes .column_label {
431
+ background: #dbdbdb
432
+ }
433
+
434
+ .jtalkTool .jt_box .jt_column.implementors .column_label:hover,
435
+ .jtalkTool .jt_box .jt_column.senders .column_label:hover,
436
+ .jtalkTool .jt_box .jt_column.referenced_classes .column_label:hover {
437
+ font-weight: bold;
438
+ color: #000;
439
+ cursor: default
440
+ }
441
+
442
+
443
+ .jtalkTool .classes .commented {
444
+ color: #33337F;
445
+ }
446
+
447
+
448
+ /* SUnit TestRunner */
449
+
450
+ .jtalkTool .jt_column.sunit.packages,
451
+ .jtalkTool .jt_column.sunit.classes {
452
+ height: 100%
453
+ }
454
+
455
+ .jtalkTool .jt_column.sunit.classes li.all,
456
+ .jtalkTool .jt_column.sunit.categories li.all {
457
+ background: #e3e3e3;
458
+ font-weight: bold
459
+ }
460
+
461
+ .jtalkTool .jt_column.sunit.classes li.all:hover ,
462
+ .jtalkTool .jt_column.sunit.categories li.all:hover {
463
+ background: #0088CC;
464
+ font-weight: bold
465
+ }
466
+
467
+ .jtalkTool .sunit.status {
468
+ position: absolute;
469
+ left: 50%;
470
+ width: 50%;
471
+ outline: 1px solid #aaa;
472
+ background: white;
473
+ height: 40px
474
+ }
475
+
476
+
477
+ .jtalkTool .sunit.status.success {
478
+ background: #43d443;
479
+ }
480
+
481
+
482
+ .jtalkTool .sunit.status.failure {
483
+ background: #ecd443;
484
+ }
485
+
486
+
487
+ .jtalkTool .sunit.status.error {
488
+ background: #e56f3b;
489
+ }
490
+
491
+ .jtalkTool .progress_bar {
492
+ position: absolute;
493
+ left: 50%;
494
+ width: 50%;
495
+ top: 40px;
496
+ background: white;
497
+ outline: 1px solid #aaa;
498
+ min-height: 20px
499
+ }
500
+
501
+ .jtalkTool .progress_bar div {
502
+ background: #0088CC;
503
+ min-height: 20px;
504
+ }
505
+
506
+ .jtalkTool .jt_column.results.sunit {
507
+ left: 50%;
508
+ height: auto;
509
+ width: 50%;
510
+ top: 62px;
511
+ bottom: 0;
512
+ }
513
+
514
+ .jtalkTool .jt_column.sunit.results .errors {
515
+ color: red;
516
+ }
517
+
518
+ /*.jtalkTool .jt_column.sunit.results ul {padding: 0; margin: 0}*/
519
+