amber-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. data/.gitignore +2 -0
  2. data/.rvmrc +4 -0
  3. data/CHANGELOG.md +3 -0
  4. data/Gemfile +2 -0
  5. data/Gemfile.lock +96 -0
  6. data/LICENSE +7 -0
  7. data/README.md +13 -0
  8. data/Rakefile +15 -0
  9. data/amber-rails.gemspec +21 -0
  10. data/app/assets/.DS_Store +0 -0
  11. data/app/assets/javascripts/.DS_Store +0 -0
  12. data/app/assets/javascripts/codemirror/codemirror.js +2144 -0
  13. data/app/assets/javascripts/codemirror/overlay.js +51 -0
  14. data/app/assets/javascripts/codemirror/runmode.js +27 -0
  15. data/app/assets/javascripts/codemirror/smalltalk/index.html +56 -0
  16. data/app/assets/javascripts/codemirror/smalltalk/smalltalk.js +134 -0
  17. data/app/assets/javascripts/html5.js +35 -0
  18. data/app/assets/javascripts/jquery.js +8981 -0
  19. data/app/assets/javascripts/jquery.textarea.js +267 -0
  20. data/app/assets/javascripts/jquery.tmpl.js +503 -0
  21. data/app/assets/javascripts/jquery.ui.js +272 -0
  22. data/app/assets/javascripts/json2.js +481 -0
  23. data/app/assets/javascripts/jtalk-development.js.coffee +4 -0
  24. data/app/assets/javascripts/jtalk-todos.js.coffee +4 -0
  25. data/app/assets/javascripts/jtalk.js.coffee +16 -0
  26. data/app/assets/javascripts/jtalk_core/boot.js +466 -0
  27. data/app/assets/javascripts/jtalk_core/st/.DS_Store +0 -0
  28. data/app/assets/javascripts/jtalk_core/st/Benchfib.js +159 -0
  29. data/app/assets/javascripts/jtalk_core/st/Canvas.js +1479 -0
  30. data/app/assets/javascripts/jtalk_core/st/Compiler.js +1587 -0
  31. data/app/assets/javascripts/jtalk_core/st/Examples.js +863 -0
  32. data/app/assets/javascripts/jtalk_core/st/HTML5.js +54 -0
  33. data/app/assets/javascripts/jtalk_core/st/IDE.js +3457 -0
  34. data/app/assets/javascripts/jtalk_core/st/JQuery.js +898 -0
  35. data/app/assets/javascripts/jtalk_core/st/Kernel.js +6761 -0
  36. data/app/assets/javascripts/jtalk_core/st/Parser.js +1655 -0
  37. data/app/assets/javascripts/jtalk_core/st/SUnit.js +1059 -0
  38. data/app/assets/stylesheets/codemirror.css +67 -0
  39. data/app/assets/stylesheets/codemirror_jtalk.css +21 -0
  40. data/app/assets/stylesheets/jtalk.css +369 -0
  41. data/app/assets/stylesheets/sunit.css +65 -0
  42. data/config/routes.rb +10 -0
  43. data/examples/todos/.gitignore +5 -0
  44. data/examples/todos/.rvmrc +4 -0
  45. data/examples/todos/Gemfile +12 -0
  46. data/examples/todos/Gemfile.lock +126 -0
  47. data/examples/todos/README +261 -0
  48. data/examples/todos/Rakefile +15 -0
  49. data/examples/todos/app/assets/images/rails.png +0 -0
  50. data/examples/todos/app/assets/javascripts/application.js.coffee +5 -0
  51. data/examples/todos/app/assets/javascripts/jtalk/Examples.deploy.js +863 -0
  52. data/examples/todos/app/assets/javascripts/jtalk/Examples.js +863 -0
  53. data/examples/todos/app/assets/smalltalk/Examples.st +397 -0
  54. data/examples/todos/app/assets/stylesheets/application.css +8 -0
  55. data/examples/todos/app/assets/stylesheets/jtalk-todos.css +154 -0
  56. data/examples/todos/app/controllers/application_controller.rb +3 -0
  57. data/examples/todos/app/controllers/todos_controller.rb +5 -0
  58. data/examples/todos/app/helpers/application_helper.rb +2 -0
  59. data/examples/todos/app/models/.gitkeep +0 -0
  60. data/examples/todos/app/views/todos/index.html.haml +16 -0
  61. data/examples/todos/config.ru +4 -0
  62. data/examples/todos/config/application.rb +31 -0
  63. data/examples/todos/config/boot.rb +6 -0
  64. data/examples/todos/config/database.yml +25 -0
  65. data/examples/todos/config/environment.rb +5 -0
  66. data/examples/todos/config/environments/development.rb +27 -0
  67. data/examples/todos/config/environments/production.rb +60 -0
  68. data/examples/todos/config/environments/test.rb +42 -0
  69. data/examples/todos/config/initializers/backtrace_silencers.rb +7 -0
  70. data/examples/todos/config/initializers/inflections.rb +10 -0
  71. data/examples/todos/config/initializers/mime_types.rb +5 -0
  72. data/examples/todos/config/initializers/secret_token.rb +7 -0
  73. data/examples/todos/config/initializers/session_store.rb +8 -0
  74. data/examples/todos/config/initializers/wrap_parameters.rb +14 -0
  75. data/examples/todos/config/locales/en.yml +5 -0
  76. data/examples/todos/config/routes.rb +3 -0
  77. data/examples/todos/log/.gitkeep +0 -0
  78. data/examples/todos/public/404.html +26 -0
  79. data/examples/todos/public/422.html +26 -0
  80. data/examples/todos/public/500.html +26 -0
  81. data/examples/todos/public/favicon.ico +0 -0
  82. data/examples/todos/public/robots.txt +5 -0
  83. data/examples/todos/script/rails +6 -0
  84. data/examples/todos/vendor/assets/stylesheets/.gitkeep +0 -0
  85. data/examples/todos/vendor/plugins/.gitkeep +0 -0
  86. data/lib/amber-rails.rb +1 -0
  87. data/lib/amber/rails.rb +30 -0
  88. data/lib/amber/rails/engine.rb +12 -0
  89. data/lib/amber/rails/version.rb +5 -0
  90. metadata +167 -0
@@ -0,0 +1,67 @@
1
+ .CodeMirror {
2
+ line-height: 1em;
3
+ font-family: monospace;
4
+ }
5
+
6
+ .CodeMirror-scroll {
7
+ overflow: auto;
8
+ height: 300px;
9
+ /* This is needed to prevent an IE[67] bug where the scrolled content
10
+ is visible outside of the scrolling box. */
11
+ position: relative;
12
+ }
13
+
14
+ .CodeMirror-gutter {
15
+ position: absolute; left: 0; top: 0;
16
+ background-color: #f7f7f7;
17
+ border-right: 1px solid #eee;
18
+ min-width: 2em;
19
+ height: 100%;
20
+ }
21
+ .CodeMirror-gutter-text {
22
+ color: #aaa;
23
+ text-align: right;
24
+ padding: .4em .2em .4em .4em;
25
+ }
26
+ .CodeMirror-lines {
27
+ padding: .4em;
28
+ }
29
+
30
+ .CodeMirror pre {
31
+ -moz-border-radius: 0;
32
+ -webkit-border-radius: 0;
33
+ -o-border-radius: 0;
34
+ border-radius: 0;
35
+ border-width: 0; margin: 0; padding: 0; background: transparent;
36
+ font-family: inherit;
37
+ font-size: inherit;
38
+ padding: 0; margin: 0;
39
+ white-space: pre;
40
+ word-wrap: normal;
41
+ }
42
+
43
+ .CodeMirror textarea {
44
+ font-family: inherit !important;
45
+ font-size: inherit !important;
46
+ }
47
+
48
+ .CodeMirror-cursor {
49
+ z-index: 10;
50
+ position: absolute;
51
+ visibility: hidden;
52
+ border-left: 1px solid black !important;
53
+ }
54
+ .CodeMirror-focused .CodeMirror-cursor {
55
+ visibility: visible;
56
+ }
57
+
58
+ span.CodeMirror-selected {
59
+ background: #ccc !important;
60
+ color: HighlightText !important;
61
+ }
62
+ .CodeMirror-focused span.CodeMirror-selected {
63
+ background: Highlight !important;
64
+ }
65
+
66
+ .CodeMirror-matchingbracket {color: #0f0 !important;}
67
+ .CodeMirror-nonmatchingbracket {color: #f22 !important;}
@@ -0,0 +1,21 @@
1
+ .cm-s-jtalk span.cm-keyword {color: #7F0000; font-weight: bold;}
2
+ .cm-s-jtalk span.cm-className {font-weight: bold;}
3
+ .cm-s-jtalk span.cm-assignment {font-weight: bold;}
4
+ .cm-s-jtalk span.cm-return {font-weight: bold;}
5
+ .cm-s-jtalk span.cm-atom {color: #219;}
6
+ .cm-s-jtalk span.cm-number {color: #7F0000;}
7
+ .cm-s-jtalk span.cm-def {color: #00f;}
8
+ .cm-s-jtalk span.cm-variable {color: grey;}
9
+ .cm-s-jtalk span.cm-variable-2 {color: #05a;}
10
+ .cm-s-jtalk span.cm-variable-3 {color: #0a5;}
11
+ .cm-s-jtalk span.cm-property {color: black;}
12
+ .cm-s-jtalk span.cm-operator {color: #00007F;}
13
+ .cm-s-jtalk span.cm-comment {color: #007F00;}
14
+ .cm-s-jtalk span.cm-string {color: #7F007F;}
15
+ .cm-s-jtalk span.cm-meta {color: #555;}
16
+ .cm-s-jtalk span.cm-error {color: #f00;}
17
+ .cm-s-jtalk span.cm-qualifier {color: #555;}
18
+ .cm-s-jtalk span.cm-builtin {color: #30a;}
19
+ .cm-s-jtalk span.cm-bracket {color: #cc7;}
20
+ .cm-s-jtalk span.cm-tag {color: #170;}
21
+ .cm-s-jtalk span.cm-attribute {color: #00c;}
@@ -0,0 +1,369 @@
1
+ /*
2
+ = require 'sunit'
3
+ = require 'codemirror'
4
+ = require 'codemirror_jtalk'
5
+
6
+ */
7
+
8
+ body.jtalkBody {
9
+ margin-bottom: 350px;
10
+ }
11
+
12
+ #jtalkTabs {
13
+ position: fixed;
14
+ font-family: helvetica,arial,sans;
15
+ font-size: 12px;
16
+ line-height: 1;
17
+ z-index: 1001;
18
+ bottom: 0;
19
+ left: 0;
20
+ right: 0;
21
+ margin: 0;
22
+ padding: 0 0 3px 0;
23
+ height: 20px;
24
+ background: transparent;
25
+ }
26
+ #jtalkTabs li {
27
+ list-style-type: none;
28
+ display: inline;
29
+ background: #c8c8c8;
30
+ font-weight: bold;
31
+ color: #414141;
32
+ padding: 4px;
33
+ border: 1px solid #acacac;
34
+ cursor: pointer;
35
+ line-height: 14px;
36
+ margin: 0;
37
+ }
38
+
39
+ #jtalkTabs li.selected {
40
+ background: #dbdbdb;
41
+ border-top: 0 none;
42
+ padding: 5px 4px;
43
+ color: #222;
44
+ }
45
+
46
+ #jtalkTabs li span.close {
47
+ margin-left: 3px;
48
+ margin-right: 5px;
49
+ }
50
+
51
+ #jtalkTabs li span.close:hover {
52
+ color: #e72a2a;
53
+ }
54
+
55
+ #jtalkTabs li.closeAll {
56
+ -moz-border-radius: 10px;
57
+ -webkit-border-radius: 10px;
58
+ border-radius: 10px;
59
+ background: #ef3b3b;
60
+ color: #e3e3e3;
61
+ font-weight: bold;
62
+ border: 1px solid #ac1616;
63
+ margin: 4px;
64
+ padding: 2px 6px;
65
+ font-size: 10px;
66
+ }
67
+
68
+ #jtalkTabs li.closeAll:hover {
69
+ background: #e72a2a;
70
+ }
71
+
72
+ #jtalk {
73
+ position: fixed;
74
+ bottom: 27px;
75
+ left: 0;
76
+ right: 0;
77
+ height: 330px;
78
+ z-index: 1000;
79
+ }
80
+
81
+ #jtalk .ui-resizable-handle {
82
+ background-color: #a8a8a8;
83
+ top: 0;
84
+ cursor: row-resize;
85
+ height: 4px;
86
+ left: 0;
87
+ position: absolute;
88
+ right: 0;
89
+ width: auto !important;
90
+ }
91
+
92
+ .jtalkTool {
93
+ width: 98%;
94
+ background: #dbdbdb;
95
+ border-style: solid;
96
+ border-width: 1px;
97
+ border-color: #a8a8a8;
98
+ color: @dark;
99
+ font-family: Arial, Helvetica, sans;
100
+ font-size: 12px;
101
+ line-height: 1.5em;
102
+ padding: 15px 1%;
103
+ position: absolute;
104
+ bottom: 0;
105
+ left: 0;
106
+ top: 4px;
107
+ z-index: 1000;
108
+ }
109
+
110
+ .jtalkTool .jt_box {
111
+ width: 98%;
112
+ margin: 0;
113
+ position: absolute;
114
+ top: 15px;
115
+ bottom: 45px;
116
+ }
117
+
118
+ .jtalkTool .jt_buttons {
119
+ position: absolute;
120
+ width: 98%;
121
+ bottom: 15px;
122
+ }
123
+
124
+ .jtalkTool .jt_buttons .right {
125
+ float: right;
126
+ }
127
+
128
+ .jtalkTool .important {
129
+ font-weight: bold;
130
+ }
131
+
132
+ .jtalkTool li {
133
+ margin: 0;
134
+ padding: 0;
135
+ }
136
+
137
+ .jtalkTool .jt_buttons button,
138
+ .jtalkTool .jt_buttons select {
139
+ font-size: 12px;
140
+ }
141
+
142
+ .jtalkTool .source {
143
+ height: 100%;
144
+ }
145
+
146
+ .jtalkTool textarea,
147
+ .jtalkTool input {
148
+ border: 1px solid;
149
+ border-color: #a8a8a8;
150
+ font-family: Arial, Helvetica, sans;
151
+ line-height: 1.2em;
152
+ font-size: 13px;
153
+ position: relative;
154
+ padding: 0;
155
+ }
156
+
157
+ .jtalkTool .CodeMirror {
158
+ border: 1px solid;
159
+ border-color: #a8a8a8;
160
+ font-family: Arial, Helvetica, sans;
161
+ font-size: 13px;
162
+ line-height: 1.3em;
163
+ height: 100%;
164
+ background: white;
165
+ }
166
+
167
+ .jtalkTool .CodeMirror-scroll {
168
+ height: 100%;
169
+ }
170
+
171
+ .talkTool .CodeMirror-scroll pre {
172
+ font-family: Arial, Helvetica, sans;
173
+ }
174
+
175
+ .jtalkTool .jt_clear {
176
+ clear: both;
177
+ }
178
+
179
+ .jtalkTool .jt_transcript,
180
+ .jtalkTool .jt_workspace {
181
+ width: 100%;
182
+ height: 100%;
183
+ }
184
+
185
+ .jtalkTool .jt_commit {
186
+ position: absolute;
187
+ top: 140px;
188
+ left: 0;
189
+ font-size: 12px;
190
+ }
191
+
192
+ .jtalkTool .jt_column {
193
+ width: 24%;
194
+ padding: 0;
195
+ margin: 0;
196
+ float: left;
197
+ border: 1px solid;
198
+ border-color: #a8a8a8;
199
+ height: 130px;
200
+ overflow-y: scroll;
201
+ background: #fff;
202
+ position: absolute;
203
+ top: 0;
204
+ }
205
+
206
+ .jtalkTool .jt_column.value {
207
+ left: 25.2%;
208
+ width: 74.8%;
209
+ }
210
+
211
+ .jtalkTool .jt_column.browser {
212
+ top: 30px;
213
+ }
214
+
215
+ .jtalkTool .jt_column.categories {
216
+ left: 0%;
217
+ height: 105px;
218
+ }
219
+
220
+ .jtalkTool .jt_column.classes {
221
+ height: 105px;
222
+ left: 25.2%
223
+ }
224
+
225
+ .jtalkTool .jt_column.classes ul {
226
+ margin-left: 0;
227
+ }
228
+
229
+ .jtalkTool .jt_column.classes ul li {
230
+ padding-left: 10px;
231
+ margin-left: 0;
232
+ }
233
+
234
+ .jtalkTool .jt_column.protocols {
235
+ left: 50.4%
236
+ }
237
+
238
+ .jtalkTool .jt_column.methods {
239
+ left: 75.6%
240
+ }
241
+
242
+ .jtalkTool .jt_column li {
243
+ list-style-type: none;
244
+ padding-left: 5px;
245
+ cursor: pointer;
246
+ color: #333;
247
+ font-weight: bold;
248
+ }
249
+
250
+ .jtalkTool .jt_column li.selected {
251
+ background: #e3e3e3;
252
+ color: #222;
253
+ }
254
+
255
+ .jtalkTool .jt_column li:hover {
256
+ background: #08c;
257
+ color: white;
258
+ }
259
+
260
+ .jtalkTool .jt_tabs {
261
+ top: 136px;
262
+ position: absolute;
263
+ left: 25.2%;
264
+ padding: 0;
265
+ margin: 0;
266
+ }
267
+
268
+ .jtalkTool .jt_tabs li {
269
+ color: #666;
270
+ font-weight: bold;
271
+ cursor: pointer;
272
+ list-style-type: none;
273
+ float: left;
274
+ padding: 2px 4px;
275
+ margin-right: 2px;
276
+ background: #ccc;
277
+ border: 1px solid #a8a8a8;
278
+ -moz-border-radius-bottomleft: 8px;
279
+ -moz-border-radius-bottomright: 8px;
280
+ -webkit-border-bottom-left-radius: 8px;
281
+ -webkit-border-bottom-right-radius: 8px;
282
+ border-bottom-left-radius: 8px;
283
+ border-bottom-right-radius: 8px;
284
+ height: 20px;
285
+ line-height: 18px;
286
+ }
287
+
288
+ /* .jtalkTool .jt_tabs li:hover { */
289
+ /* background: #08c; */
290
+ /* color: white; */
291
+ /* border-color: #08c; */
292
+ /* } */
293
+
294
+ .jtalkTool .jt_tabs li.selected,
295
+ .jtalkTool .jt_tabs li.selected:hover {
296
+ background: white;
297
+ border: 1px solid #b3b3b3;
298
+ border-top: 1px solid white;
299
+ color: #222;
300
+ }
301
+
302
+
303
+ .jtalkTool .jt_sourceCode {
304
+ position: absolute;
305
+ top: 175px;
306
+ bottom: 0;
307
+ left: 0;
308
+ right: 0;
309
+ }
310
+
311
+ .jtalkTool .jt_sourceCode textarea.source {
312
+ width: 100%;
313
+ height: 100%;
314
+ }
315
+
316
+ /* Debugger */
317
+
318
+ .jtalkTool .jt_box .label {
319
+ width: 98%;
320
+ font-weight: bold;
321
+ text-align: center;
322
+ position: absolute;
323
+ line-height: 1.2em;
324
+ font-size: 16px;
325
+ color: red;
326
+ }
327
+
328
+ .jtalkTool .jt_box .jt_column.debugger.contexts {
329
+ width: 100%;
330
+ top: 30px;
331
+
332
+ }
333
+
334
+ /***** IDE - ReferencesBrowser ******/
335
+
336
+ .jtalkTool .jt_box .implementors {
337
+ width: 100%
338
+ }
339
+
340
+ .jtalkTool .jt_box .jt_column.implementors,
341
+ .jtalkTool .jt_box .jt_column.senders,
342
+ .jtalkTool .jt_box .jt_column.referenced_classes {
343
+ top: 30px;
344
+ height: 100%;
345
+ bottom: 0px;
346
+ width: 33%;
347
+ }
348
+
349
+ .jtalkTool .jt_box .jt_column.senders {
350
+ left: 33.6%
351
+ }
352
+
353
+ .jtalkTool .jt_box .jt_column.referenced_classes {
354
+ left: 67.3%
355
+ }
356
+
357
+ .jtalkTool .jt_box .jt_column.implementors .column_label,
358
+ .jtalkTool .jt_box .jt_column.senders .column_label,
359
+ .jtalkTool .jt_box .jt_column.referenced_classes .column_label {
360
+ background: #dbdbdb
361
+ }
362
+
363
+ .jtalkTool .jt_box .jt_column.implementors .column_label:hover,
364
+ .jtalkTool .jt_box .jt_column.senders .column_label:hover,
365
+ .jtalkTool .jt_box .jt_column.referenced_classes .column_label:hover {
366
+ font-weight: bold;
367
+ color: #000;
368
+ cursor: default
369
+ }