alpha-simprini-engine 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +38 -0
  4. data/app/assets/javascripts/alpha_simprini.coffee +15 -0
  5. data/app/assets/javascripts/alpha_simprini/application.coffee +22 -0
  6. data/app/assets/javascripts/alpha_simprini/coffee_kup/binding.coffee +119 -0
  7. data/app/assets/javascripts/alpha_simprini/coffee_kup/helpers.coffee +17 -0
  8. data/app/assets/javascripts/alpha_simprini/coffee_kup/tags.coffee +7 -0
  9. data/app/assets/javascripts/alpha_simprini/collection.coffee +62 -0
  10. data/app/assets/javascripts/alpha_simprini/delegate.coffee +21 -0
  11. data/app/assets/javascripts/alpha_simprini/event.coffee +75 -0
  12. data/app/assets/javascripts/alpha_simprini/html.coffee +56 -0
  13. data/app/assets/javascripts/alpha_simprini/mixin.coffee +10 -0
  14. data/app/assets/javascripts/alpha_simprini/model.coffee +137 -0
  15. data/app/assets/javascripts/alpha_simprini/models/radio_selection_model.coffee +9 -0
  16. data/app/assets/javascripts/alpha_simprini/packer.coffee +93 -0
  17. data/app/assets/javascripts/alpha_simprini/template_helpers.coffee +8 -0
  18. data/app/assets/javascripts/alpha_simprini/view.coffee +182 -0
  19. data/app/assets/javascripts/alpha_simprini/views/canvas.coffee +2 -0
  20. data/app/assets/javascripts/alpha_simprini/views/horizontal_split.coffee +9 -0
  21. data/app/assets/javascripts/alpha_simprini/views/panel.coffee +2 -0
  22. data/app/assets/javascripts/alpha_simprini/views/splitter.coffee +2 -0
  23. data/app/assets/javascripts/alpha_simprini/views/stage.coffee +7 -0
  24. data/app/assets/javascripts/alpha_simprini/views/vertical_split.coffee +8 -0
  25. data/app/assets/javascripts/alpha_simprini/views/viewport.coffee +0 -0
  26. data/app/assets/javascripts/bundle.js +16416 -0
  27. data/app/assets/javascripts/lib/backbone.coffee +11 -0
  28. data/app/assets/javascripts/lib/koffeecup_backbone_databind.coffee +25 -0
  29. data/app/assets/javascripts/lib/module.coffee +15 -0
  30. data/app/assets/javascripts/lib/state_machine.coffee +33 -0
  31. data/app/assets/javascripts/lib/string.coffee +13 -0
  32. data/app/assets/javascripts/qunit.js +1513 -0
  33. data/app/assets/javascripts/test.coffee +4 -0
  34. data/app/assets/javascripts/test/alpha_simprini/coffee_kup/binding.coffee +118 -0
  35. data/app/assets/javascripts/test/alpha_simprini/coffee_kup/helpers.coffee +10 -0
  36. data/app/assets/javascripts/test/alpha_simprini/coffee_kup/tags.coffee +18 -0
  37. data/app/assets/javascripts/test/alpha_simprini/collection.coffee +7 -0
  38. data/app/assets/javascripts/test/alpha_simprini/event.coffee +43 -0
  39. data/app/assets/javascripts/test/alpha_simprini/model.coffee +63 -0
  40. data/app/assets/javascripts/test/alpha_simprini/view.coffee +72 -0
  41. data/app/assets/javascripts/test/alpha_simprini/views/canvas.coffee +8 -0
  42. data/app/assets/javascripts/test/alpha_simprini/views/horizontal_split.coffee +13 -0
  43. data/app/assets/javascripts/test/alpha_simprini/views/vertical_split.coffee +13 -0
  44. data/app/assets/javascripts/test/backbone/collection.js +345 -0
  45. data/app/assets/javascripts/test/backbone/events.js +86 -0
  46. data/app/assets/javascripts/test/backbone/model.js +426 -0
  47. data/app/assets/javascripts/test/backbone/view.js +137 -0
  48. data/app/assets/stylesheets/bootstrap.sass +6 -0
  49. data/app/assets/stylesheets/paneling.sass +2 -0
  50. data/app/assets/stylesheets/qunit.scss +228 -0
  51. data/app/assets/stylesheets/table.sass +10 -0
  52. data/app/assets/stylesheets/typography.sass +19 -0
  53. data/app/controllers/alpha_simprini/test_controller.rb +3 -0
  54. data/app/controllers/resources_controller.rb +7 -0
  55. data/app/views/alpha_simprini/test/root.rb +13 -0
  56. data/app/views/resources/base.rb +2 -0
  57. data/app/views/resources/edit.rb +9 -0
  58. data/app/views/resources/form.rb +26 -0
  59. data/app/views/resources/index.rb +41 -0
  60. data/app/views/resources/new.rb +9 -0
  61. data/app/views/resources/show.rb +42 -0
  62. data/app/views/resources/show_has_many.rb +28 -0
  63. data/config/locales/en.yml +4 -0
  64. data/config/routes.rb +3 -0
  65. data/lib/alpha-simprini-engine.rb +33 -0
  66. data/lib/alpha-simprini-engine/version.rb +3 -0
  67. data/lib/alpha_simprini/directive_processor.rb +77 -0
  68. data/lib/alpha_simprini/packer.rb +161 -0
  69. data/lib/alpha_simprini/page.rb +37 -0
  70. data/lib/tasks/alpha-simprini-engine_tasks.rake +4 -0
  71. data/test/alpha-simprini-engine_test.rb +7 -0
  72. data/test/dummy/Rakefile +7 -0
  73. data/test/dummy/app/assets/javascripts/application.js +9 -0
  74. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  75. data/test/dummy/app/controllers/application_controller.rb +3 -0
  76. data/test/dummy/app/helpers/application_helper.rb +2 -0
  77. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  78. data/test/dummy/config.ru +4 -0
  79. data/test/dummy/config/application.rb +42 -0
  80. data/test/dummy/config/boot.rb +10 -0
  81. data/test/dummy/config/database.yml +25 -0
  82. data/test/dummy/config/environment.rb +5 -0
  83. data/test/dummy/config/environments/development.rb +27 -0
  84. data/test/dummy/config/environments/production.rb +51 -0
  85. data/test/dummy/config/environments/test.rb +39 -0
  86. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  87. data/test/dummy/config/initializers/inflections.rb +10 -0
  88. data/test/dummy/config/initializers/mime_types.rb +5 -0
  89. data/test/dummy/config/initializers/secret_token.rb +7 -0
  90. data/test/dummy/config/initializers/session_store.rb +8 -0
  91. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  92. data/test/dummy/config/locales/en.yml +4 -0
  93. data/test/dummy/config/routes.rb +58 -0
  94. data/test/dummy/db/development.sqlite3 +0 -0
  95. data/test/dummy/log/development.log +800 -0
  96. data/test/dummy/public/404.html +26 -0
  97. data/test/dummy/public/422.html +26 -0
  98. data/test/dummy/public/500.html +26 -0
  99. data/test/dummy/public/favicon.ico +0 -0
  100. data/test/dummy/script/rails +6 -0
  101. data/test/dummy/tmp/cache/assets/C24/D70/sprockets%2F388a550030239f3784f207fa32954f64 +0 -0
  102. data/test/dummy/tmp/cache/assets/C34/620/sprockets%2F097ee8532856d48d70420c006f475889 +0 -0
  103. data/test/dummy/tmp/cache/assets/C6F/710/sprockets%2F908d18b0f21c18dad508851126164a41 +0 -0
  104. data/test/dummy/tmp/cache/assets/CA7/120/sprockets%2F35278a6c0150c40394fe02629c8b0eb9 +0 -0
  105. data/test/dummy/tmp/cache/assets/CDB/A80/sprockets%2F443b1c6e71b482fdd83b1833b7e27712 +0 -0
  106. data/test/dummy/tmp/cache/assets/CE3/FB0/sprockets%2F6d3f87a4232e0368bb86760780c5f1bd +0 -0
  107. data/test/dummy/tmp/cache/assets/D1C/160/sprockets%2F87876f7e55ebc78ae11c6c08a27f0605 +0 -0
  108. data/test/dummy/tmp/cache/assets/D26/6C0/sprockets%2F65bce2254bb3140a50326ea1654ea5df +0 -0
  109. data/test/dummy/tmp/cache/assets/D26/FA0/sprockets%2F1f50f59148df5f3e2ab889df381d9744 +0 -0
  110. data/test/dummy/tmp/cache/assets/D36/220/sprockets%2F841654b01d89eada195d7d1fe10b57b0 +0 -0
  111. data/test/dummy/tmp/cache/assets/D47/410/sprockets%2Ff1fe319eb4064bd5b861ac28f7d76555 +18122 -0
  112. data/test/dummy/tmp/cache/assets/D57/1E0/sprockets%2Fe267e3e1059799c429e4f5cfb95ec53c +0 -0
  113. data/test/dummy/tmp/cache/assets/D64/3E0/sprockets%2Fb49b7f8034b81ec601bc32fb127fbe08 +0 -0
  114. data/test/dummy/tmp/cache/assets/D65/850/sprockets%2F7a9b6a0e2d51adb43a1d3f859213e6b8 +15469 -0
  115. data/test/dummy/tmp/cache/assets/D6C/E30/sprockets%2Fcc7322b05ac2bef75e9f4f145d38117f +0 -0
  116. data/test/dummy/tmp/cache/assets/D7D/E00/sprockets%2Fce33b82451c73df1cfec69928b4f77b6 +0 -0
  117. data/test/dummy/tmp/cache/assets/D85/5D0/sprockets%2Fcf743946c378c148b19ce78eeaa9cc75 +0 -0
  118. data/test/dummy/tmp/cache/assets/DBB/560/sprockets%2F5a1d70cf7dd81a5ab5ce7a40a3a38d06 +0 -0
  119. data/test/dummy/tmp/cache/assets/DC1/670/sprockets%2Fefdfad0542298a1db90d24dc27ecc250 +0 -0
  120. data/test/dummy/tmp/cache/assets/DC5/1E0/sprockets%2F7517f22ad0f9dc13b8f0f6e0cc0e5de2 +0 -0
  121. data/test/dummy/tmp/cache/assets/DCC/220/sprockets%2F28d953c6ab9cc9a7db15600aabc6d77d +208 -0
  122. data/test/dummy/tmp/cache/assets/DCF/DF0/sprockets%2Ff0d3068f05825e1dfd9f5aaba946d3dc +0 -0
  123. data/test/dummy/tmp/cache/assets/DD3/0E0/sprockets%2F3e9e08a334bae7deadb5335f5e4f195f +0 -0
  124. data/test/dummy/tmp/cache/assets/DDB/980/sprockets%2Fbd2abc80a17c901e2f497f88f9be58cf +0 -0
  125. data/test/dummy/tmp/cache/assets/E00/ED0/sprockets%2Ffecf3bffeb200a47e96bd04cbc878076 +1535 -0
  126. data/test/dummy/tmp/cache/assets/EFB/560/sprockets%2Fbca0daf751c020cdeddabbefa51cb6ea +0 -0
  127. data/test/dummy/tmp/restart.txt +0 -0
  128. data/test/test_helper.rb +10 -0
  129. metadata +326 -0
@@ -0,0 +1,137 @@
1
+ $(document).ready(function() {
2
+
3
+ module("Backbone.View");
4
+
5
+ var view = new Backbone.View({
6
+ id : 'test-view',
7
+ className : 'test-view'
8
+ });
9
+
10
+ test("View: constructor", function() {
11
+ equals(view.el.id, 'test-view');
12
+ equals(view.el.className, 'test-view');
13
+ equals(view.options.id, 'test-view');
14
+ equals(view.options.className, 'test-view');
15
+ });
16
+
17
+ test("View: jQuery", function() {
18
+ view.el = document.body;
19
+ ok(view.$('#qunit-header a').get(0).innerHTML.match(/Backbone Test Suite/));
20
+ ok(view.$('#qunit-header a').get(1).innerHTML.match(/Backbone Speed Suite/));
21
+ });
22
+
23
+ test("View: make", function() {
24
+ var div = view.make('div', {id: 'test-div'}, "one two three");
25
+ equals(div.tagName.toLowerCase(), 'div');
26
+ equals(div.id, 'test-div');
27
+ equals($(div).text(), 'one two three');
28
+ });
29
+
30
+ test("View: initialize", function() {
31
+ var View = Backbone.View.extend({
32
+ initialize: function() {
33
+ this.one = 1;
34
+ }
35
+ });
36
+ var view = new View;
37
+ equals(view.one, 1);
38
+ });
39
+
40
+ test("View: delegateEvents", function() {
41
+ var counter = counter2 = 0;
42
+ view.el = document.body;
43
+ view.increment = function(){ counter++; };
44
+ $(view.el).bind('click', function(){ counter2++; });
45
+ var events = {"click #qunit-banner": "increment"};
46
+ view.delegateEvents(events);
47
+ $('#qunit-banner').trigger('click');
48
+ equals(counter, 1);
49
+ equals(counter2, 1);
50
+ $('#qunit-banner').trigger('click');
51
+ equals(counter, 2);
52
+ equals(counter2, 2);
53
+ view.delegateEvents(events);
54
+ $('#qunit-banner').trigger('click');
55
+ equals(counter, 3);
56
+ equals(counter2, 3);
57
+ });
58
+
59
+ test("View: _ensureElement with DOM node el", function() {
60
+ var ViewClass = Backbone.View.extend({
61
+ el: document.body
62
+ });
63
+ var view = new ViewClass;
64
+ equals(view.el, document.body);
65
+ });
66
+
67
+ test("View: _ensureElement with string el", function() {
68
+ var ViewClass = Backbone.View.extend({
69
+ el: "body"
70
+ });
71
+ var view = new ViewClass;
72
+ equals(view.el, document.body);
73
+
74
+ ViewClass = Backbone.View.extend({
75
+ el: "body > h2"
76
+ });
77
+ view = new ViewClass;
78
+ equals(view.el, $("#qunit-banner").get(0));
79
+
80
+ ViewClass = Backbone.View.extend({
81
+ el: "#nonexistent"
82
+ });
83
+ view = new ViewClass;
84
+ ok(!view.el);
85
+ });
86
+
87
+ test("View: with attributes", function() {
88
+ var view = new Backbone.View({attributes : {'class': 'one', id: 'two'}});
89
+ equals(view.el.className, 'one');
90
+ equals(view.el.id, 'two');
91
+ });
92
+
93
+ test("View: multiple views per element", function() {
94
+ var count = 0, ViewClass = Backbone.View.extend({
95
+ el: $("body"),
96
+ events: {
97
+ "click": "click"
98
+ },
99
+ click: function() {
100
+ count++;
101
+ }
102
+ });
103
+
104
+ var view1 = new ViewClass;
105
+ $("body").trigger("click");
106
+ equals(1, count);
107
+
108
+ var view2 = new ViewClass;
109
+ $("body").trigger("click");
110
+ equals(3, count);
111
+
112
+ view1.delegateEvents();
113
+ $("body").trigger("click");
114
+ equals(5, count);
115
+ });
116
+
117
+ test("View: custom events, with namespaces", function() {
118
+ var count = 0;
119
+ var ViewClass = Backbone.View.extend({
120
+ el: $('body'),
121
+ events: function() {
122
+ return {"fake$event.namespaced": "run"};
123
+ },
124
+ run: function() {
125
+ count++;
126
+ }
127
+ });
128
+
129
+ var view = new ViewClass;
130
+ $('body').trigger('fake$event').trigger('fake$event');
131
+ equals(count, 2);
132
+ $('body').unbind('.namespaced');
133
+ $('body').trigger('fake$event');
134
+ equals(count, 2);
135
+ });
136
+
137
+ });
@@ -0,0 +1,6 @@
1
+ @import compass/css3
2
+ @import compass/reset
3
+ @import blueprint/typography
4
+ @import typography
5
+ @import table
6
+ @import paneling
@@ -0,0 +1,2 @@
1
+ body
2
+ background-color: adjust-lightness(white, -10)
@@ -0,0 +1,228 @@
1
+ /**
2
+ * QUnit - A JavaScript Unit Testing Framework
3
+ *
4
+ * http://docs.jquery.com/QUnit
5
+ *
6
+ * Copyright (c) 2011 John Resig, Jörn Zaefferer
7
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
8
+ * or GPL (GPL-LICENSE.txt) licenses.
9
+ * Pulled Live from Git Thu Aug 25 06:20:01 UTC 2011
10
+ * Last Commit: 7f292170fa1109f1355f3e96f8973c32fc553946
11
+ */
12
+
13
+ /** Font Family and Sizes */
14
+
15
+ #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
16
+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
17
+ }
18
+
19
+ #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
20
+ #qunit-tests { font-size: smaller; }
21
+
22
+
23
+ /** Resets */
24
+
25
+ #qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
26
+ margin: 0;
27
+ padding: 0;
28
+ }
29
+
30
+
31
+ /** Header */
32
+
33
+ #qunit-header {
34
+ padding: 0.5em 0 0.5em 1em;
35
+
36
+ color: #8699a4;
37
+ background-color: #0d3349;
38
+
39
+ font-size: 1.5em;
40
+ line-height: 1em;
41
+ font-weight: normal;
42
+
43
+ border-radius: 15px 15px 0 0;
44
+ -moz-border-radius: 15px 15px 0 0;
45
+ -webkit-border-top-right-radius: 15px;
46
+ -webkit-border-top-left-radius: 15px;
47
+ }
48
+
49
+ #qunit-header a {
50
+ text-decoration: none;
51
+ color: #c2ccd1;
52
+ }
53
+
54
+ #qunit-header a:hover,
55
+ #qunit-header a:focus {
56
+ color: #fff;
57
+ }
58
+
59
+ #qunit-banner {
60
+ height: 5px;
61
+ }
62
+
63
+ #qunit-testrunner-toolbar {
64
+ padding: 0.5em 0 0.5em 2em;
65
+ color: #5E740B;
66
+ background-color: #eee;
67
+ }
68
+
69
+ #qunit-userAgent {
70
+ padding: 0.5em 0 0.5em 2.5em;
71
+ background-color: #2b81af;
72
+ color: #fff;
73
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
74
+ }
75
+
76
+
77
+ /** Tests: Pass/Fail */
78
+
79
+ #qunit-tests {
80
+ list-style-position: inside;
81
+ }
82
+
83
+ #qunit-tests li {
84
+ padding: 0.4em 0.5em 0.4em 2.5em;
85
+ border-bottom: 1px solid #fff;
86
+ list-style-position: inside;
87
+ }
88
+
89
+ #qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
90
+ display: none;
91
+ }
92
+
93
+ #qunit-tests li strong {
94
+ cursor: pointer;
95
+ }
96
+
97
+ #qunit-tests li a {
98
+ padding: 0.5em;
99
+ color: #c2ccd1;
100
+ text-decoration: none;
101
+ }
102
+ #qunit-tests li a:hover,
103
+ #qunit-tests li a:focus {
104
+ color: #000;
105
+ }
106
+
107
+ #qunit-tests ol {
108
+ margin-top: 0.5em;
109
+ padding: 0.5em;
110
+
111
+ background-color: #fff;
112
+
113
+ border-radius: 15px;
114
+ -moz-border-radius: 15px;
115
+ -webkit-border-radius: 15px;
116
+
117
+ box-shadow: inset 0px 2px 13px #999;
118
+ -moz-box-shadow: inset 0px 2px 13px #999;
119
+ -webkit-box-shadow: inset 0px 2px 13px #999;
120
+ }
121
+
122
+ #qunit-tests table {
123
+ border-collapse: collapse;
124
+ margin-top: .2em;
125
+ }
126
+
127
+ #qunit-tests th {
128
+ text-align: right;
129
+ vertical-align: top;
130
+ padding: 0 .5em 0 0;
131
+ }
132
+
133
+ #qunit-tests td {
134
+ vertical-align: top;
135
+ }
136
+
137
+ #qunit-tests pre {
138
+ margin: 0;
139
+ white-space: pre-wrap;
140
+ word-wrap: break-word;
141
+ }
142
+
143
+ #qunit-tests del {
144
+ background-color: #e0f2be;
145
+ color: #374e0c;
146
+ text-decoration: none;
147
+ }
148
+
149
+ #qunit-tests ins {
150
+ background-color: #ffcaca;
151
+ color: #500;
152
+ text-decoration: none;
153
+ }
154
+
155
+ /*** Test Counts */
156
+
157
+ #qunit-tests b.counts { color: black; }
158
+ #qunit-tests b.passed { color: #5E740B; }
159
+ #qunit-tests b.failed { color: #710909; }
160
+
161
+ #qunit-tests li li {
162
+ margin: 0.5em;
163
+ padding: 0.4em 0.5em 0.4em 0.5em;
164
+ background-color: #fff;
165
+ border-bottom: none;
166
+ list-style-position: inside;
167
+ }
168
+
169
+ /*** Passing Styles */
170
+
171
+ #qunit-tests li li.pass {
172
+ color: #5E740B;
173
+ background-color: #fff;
174
+ border-left: 26px solid #C6E746;
175
+ }
176
+
177
+ #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
178
+ #qunit-tests .pass .test-name { color: #366097; }
179
+
180
+ #qunit-tests .pass .test-actual,
181
+ #qunit-tests .pass .test-expected { color: #999999; }
182
+
183
+ #qunit-banner.qunit-pass { background-color: #C6E746; }
184
+
185
+ /*** Failing Styles */
186
+
187
+ #qunit-tests li li.fail {
188
+ color: #710909;
189
+ background-color: #fff;
190
+ border-left: 26px solid #EE5757;
191
+ white-space: pre;
192
+ }
193
+
194
+ #qunit-tests > li:last-child {
195
+ border-radius: 0 0 15px 15px;
196
+ -moz-border-radius: 0 0 15px 15px;
197
+ -webkit-border-bottom-right-radius: 15px;
198
+ -webkit-border-bottom-left-radius: 15px;
199
+ }
200
+
201
+ #qunit-tests .fail { color: #000000; background-color: #EE5757; }
202
+ #qunit-tests .fail .test-name,
203
+ #qunit-tests .fail .module-name { color: #000000; }
204
+
205
+ #qunit-tests .fail .test-actual { color: #EE5757; }
206
+ #qunit-tests .fail .test-expected { color: green; }
207
+
208
+ #qunit-banner.qunit-fail { background-color: #EE5757; }
209
+
210
+
211
+ /** Result */
212
+
213
+ #qunit-testresult {
214
+ padding: 0.5em 0.5em 0.5em 2.5em;
215
+
216
+ color: #2b81af;
217
+ background-color: #D2E0E6;
218
+
219
+ border-bottom: 1px solid white;
220
+ }
221
+
222
+ /** Fixture */
223
+
224
+ #qunit-fixture {
225
+ position: absolute;
226
+ top: -10000px;
227
+ left: -10000px;
228
+ }
@@ -0,0 +1,10 @@
1
+ table
2
+ thead
3
+ border-bottom: 1px solid adjust-lightness(black, 70)
4
+ th
5
+ background: white
6
+
7
+ tr.odd td
8
+ background-color: adjust-lightness(white, -10)
9
+ tr.even td
10
+ background-color: white
@@ -0,0 +1,19 @@
1
+ +blueprint-typography
2
+ body
3
+ font-family: Helvetica
4
+
5
+ thead
6
+ text-align: left
7
+ h1, h2, h3, h4, h5, h6, button
8
+ font-family: Orator Std
9
+ color: #5E6469
10
+ text-shadow: white 0 1px 0
11
+
12
+ h1, h2, h3, h4, h5, h6
13
+ padding: 0
14
+ margin-bottom: 0
15
+ +background(linear-gradient(top, #efefef, #dfe1e2))
16
+ +box-shadow(rgba(0, 0, 0, 0.37), 0, 1px, 2px)
17
+ border-bottom: 1px solid #ededed
18
+ letter-spacing: -4px
19
+ text-transform: lowercase
@@ -0,0 +1,3 @@
1
+ class AlphaSimprini::TestController < ActionController::Base
2
+ def root; render end
3
+ end
@@ -0,0 +1,7 @@
1
+ class ResourcesController < ApplicationController
2
+ inherit_resources
3
+ def resource_name
4
+ resource_class.name
5
+ end
6
+ helper_method :resource_name
7
+ end
@@ -0,0 +1,13 @@
1
+ class Views::AlphaSimprini::Test::Root < AlphaSimprini::Page
2
+ def assets
3
+ javascript_include_tag "test"
4
+ stylesheet_link_tag "qunit"
5
+ end
6
+
7
+ def body_content
8
+ h1 "QUnit", id:'qunit-header'
9
+ h1 id:'qunit-banner'
10
+ h2 id:'qunit-userAgent'
11
+ ol id:'qunit-tests'
12
+ end
13
+ end
@@ -0,0 +1,2 @@
1
+ class Views::Resources::Base < AlphaSimprini::Page
2
+ end
@@ -0,0 +1,9 @@
1
+ class Views::Resources::Edit < Views::Resources::Form
2
+ def page_title
3
+ "Edit #{resource_name}"
4
+ end
5
+
6
+ def form(&block)
7
+ form_for resource, url: resource_url(resource), &block
8
+ end
9
+ end