rubaidh-generators 1.0.4 → 1.0.6

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.
data/CHANGELOG CHANGED
@@ -1,5 +1,23 @@
1
1
  = Change Log
2
2
 
3
+ == Version 1.0.6
4
+
5
+ * Add Web App Theme to the application (script/generate rubaidh_layout)
6
+
7
+ * Fix error introduced in last version of a missing comma in a command to add a submodule
8
+
9
+ == Version 1.0.5
10
+
11
+ * Add .DS_Store to .gitignore
12
+
13
+ * Remove cucumber being installed as a submoduled plugin so we don't encounter issues with the gem path
14
+
15
+ * Added dependancy for grit gem
16
+
17
+ * Switched out Hoptoad for GetExceptional
18
+
19
+ * Switched out Remarkable for Shoulda
20
+
3
21
  == Version 1.0.4
4
22
 
5
23
  * Insert cucumber into the generated application, not a duplicate copy of
data/README.rdoc CHANGED
@@ -13,10 +13,10 @@ application and applies the Rubaidh template to it. In short, this will:
13
13
  * initialize a local Git repository, ignoring the appropriate things and
14
14
  saving the log directory but not its contents;
15
15
 
16
- * install RSpec, RSpec's Rails support, Cucumber, Remarkable and object_daddy
16
+ * install RSpec, RSpec's Rails support, Shoulda and object_daddy
17
17
  for testing support;
18
18
 
19
- * install and enable hoptoad for watching errors in production; and
19
+ * install and enable GetExceptional for watching errors in production; and
20
20
 
21
21
  * create and migrate all the appropriate databases.
22
22
 
@@ -36,6 +36,8 @@ We currently ship with 4 generators:
36
36
  * rubaidh_scaffold which generates the full shebang for a CRUD-operated
37
37
  RESTful resource.
38
38
 
39
+ * rubaidh_layout which generates a basic web-app theme
40
+
39
41
  Where possible generators are built in terms of other generators (so the
40
42
  scaffold calls on rubaidh_model to generate the model).
41
43
 
@@ -1,2 +1,17 @@
1
- <h1><%= class_name %>#<%= action %></h1>
2
- <p>Find me in <%= path %></p>
1
+ <div class="block">
2
+ <div class="content">
3
+ <h2 class="title"><%= class_name %>#<%= action %></h2>
4
+ <div class="inner">
5
+ <p>Find me in <%= path %></p>
6
+ </div>
7
+ </div>
8
+ </div>
9
+
10
+ <%% content_for :sidebar do %>
11
+ <div class="block notice">
12
+ <h4>Sample</h4>
13
+ <p>
14
+ This is a sample notice for in the sidebar
15
+ </p>
16
+ </div>
17
+ <%% end %>
@@ -0,0 +1,27 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'rubaidh_named_base')
2
+
3
+ class RubaidhLayoutGenerator < RubaidhNamedBase
4
+ def initialize(runtime_args, runtime_options = {})
5
+ runtime_args = ["application"] if runtime_args.blank?
6
+ super
7
+ end
8
+
9
+ def manifest
10
+ record do |m|
11
+ # Check the layout dir and stylesheets dir exist
12
+ m.directory File.join('app/views/layouts')
13
+ m.directory File.join('public/stylesheets')
14
+
15
+ # copy layout over to app
16
+ m.template 'layout.html.erb',
17
+ File.join('app/views/layouts', "#{file_name}.html.erb")
18
+
19
+ # copy CSS files
20
+ m.template 'base.css',
21
+ File.join('public/stylesheets', "base.css")
22
+ m.template 'style.css',
23
+ File.join('public/stylesheets', "style.css")
24
+
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,334 @@
1
+ * {margin:0;padding:0}
2
+ .clear { clear: both; height: 0; }
3
+
4
+ h1 { margin: 15px 0; font-size: 22px; font-weight: normal; }
5
+ h2 { font-size: 22px; margin: 15px 0; font-weight: normal;}
6
+ h3 { font-size: 18px; margin: 10px 0; font-weight: normal;}
7
+ h4 { font-size: 16px; margin: 10px 0; font-weight: normal;}
8
+ hr {height: 1px; border: 0; }
9
+ p { margin: 15px 0;}
10
+ a img { border: none; }
11
+
12
+ body {
13
+ font-size: 12px;
14
+ font-family: sans-serif;
15
+ }
16
+
17
+ #container {
18
+ min-width: 960px;
19
+ }
20
+
21
+ #header, #wrapper, #footer {
22
+ padding: 0 20px;
23
+ }
24
+
25
+ #header {
26
+ position: relative;
27
+ padding-top: 1px;
28
+ }
29
+
30
+ #header h1 {
31
+ margin: 0;
32
+ padding: 10px 0;
33
+ font-size: 30px;
34
+ }
35
+
36
+ #header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
37
+ text-decoration: none;
38
+ }
39
+
40
+ #main {
41
+ width: 70%;
42
+ float: left;
43
+ }
44
+
45
+ .actions-bar {
46
+ padding: 10px 1px;
47
+ }
48
+
49
+ .actions-bar .actions {
50
+ float: left;
51
+ }
52
+
53
+
54
+ .actions-bar .pagination {
55
+ float: right;
56
+ padding: 1px 0;
57
+ }
58
+
59
+ #sidebar {
60
+ width: 25%;
61
+ float: right;
62
+ }
63
+
64
+ #sidebar h3 {
65
+ padding: 10px 15px;
66
+ margin: 0;
67
+ font-size: 13px;
68
+ }
69
+
70
+ #sidebar .block {
71
+ margin-bottom: 20px;
72
+ padding-bottom: 10px;
73
+ }
74
+
75
+ #sidebar .block .content {
76
+ padding: 0 15px;
77
+ }
78
+
79
+ #sidebar ul.navigation li a:link, #sidebar ul.navigation li a:visited {
80
+ display: block;
81
+ padding: 10px 15px;
82
+ }
83
+
84
+ #sidebar .block .sidebar-block, #sidebar .notice {
85
+ padding:10px;
86
+ }
87
+
88
+ #wrapper {
89
+ padding-top: 20px;
90
+ }
91
+
92
+ #main .block {
93
+ margin-bottom: 20px;
94
+ padding-top: 1px;
95
+ }
96
+
97
+ #main .block .content .inner {
98
+ padding: 0 15px 15px;
99
+ }
100
+
101
+ #main .main p.first {
102
+ margin-top: 0;
103
+ }
104
+
105
+ #user-navigation {
106
+ position: absolute;
107
+ top: 0px;
108
+ right: 20px;
109
+ }
110
+
111
+ #main-navigation {
112
+ width: 100%;
113
+ }
114
+
115
+ #user-navigation ul, #main-navigation ul, .secondary-navigation ul, #sidebar ul.navigation {
116
+ margin: 0;
117
+ padding: 0;
118
+ list-style-type: none;
119
+ }
120
+
121
+ #user-navigation ul li, #main-navigation ul li, .secondary-navigation ul li {
122
+ float: left;
123
+ }
124
+
125
+ #main-navigation ul li {
126
+ margin-right: 5px;
127
+ }
128
+
129
+ #user-navigation ul li {
130
+ padding: 5px 10px;
131
+ }
132
+
133
+ #main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
134
+ .secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
135
+ #user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
136
+ text-decoration: none;
137
+ }
138
+
139
+ #main-navigation ul li a {
140
+ font-size: 15px;
141
+ display: block;
142
+ padding: 8px 15px;
143
+ }
144
+
145
+ .secondary-navigation {
146
+ font-size: 13px;
147
+ border-bottom-width: 10px;
148
+ border-bottom-style: solid;
149
+ }
150
+
151
+ .secondary-navigation ul li a {
152
+ display: block;
153
+ padding: 10px 15px;
154
+ }
155
+
156
+ #footer {
157
+ padding-bottom: 20px;
158
+ }
159
+
160
+ /* pagination */
161
+
162
+ .pagination a, .pagination span {
163
+ padding: 2px 5px;
164
+ margin-right: 5px;
165
+ display: block;
166
+ float: left;
167
+ border-style: solid;
168
+ border-width: 1px;
169
+ }
170
+
171
+ .pagination span.current {
172
+ font-weight: bold;
173
+ }
174
+
175
+ .pagination a {
176
+ text-decoration: none;
177
+ }
178
+
179
+ /* tables */
180
+ .table {
181
+ width: 100%;
182
+ border-collapse: collapse;
183
+ margin-bottom: 15px;
184
+ }
185
+
186
+ .table th {
187
+ padding: 10px;
188
+ font-weight: bold;
189
+ text-align: left;
190
+ }
191
+
192
+ .table th.first {
193
+ width: 30px;
194
+ }
195
+
196
+ .table th.last {
197
+ width: 200px;
198
+ }
199
+
200
+ .table .checkbox {
201
+ margin-left: 10px;
202
+ }
203
+
204
+ .table td {
205
+ padding: 10px;
206
+ }
207
+
208
+ .table td.last {
209
+ text-align: right;
210
+ }
211
+
212
+ /* forms */
213
+
214
+ input.checkbox {
215
+ margin: 0;
216
+ padding: 0;
217
+ }
218
+
219
+ .form .group {
220
+ margin-bottom: 15px;
221
+ }
222
+
223
+ .form div.left {
224
+ width: 20%;
225
+ float: left;
226
+ }
227
+
228
+ .form div.right {
229
+ width: 75%;
230
+ float: right;
231
+ }
232
+
233
+ .form .columns .column {
234
+ width: 48%;
235
+ }
236
+
237
+ .form .columns .left {
238
+ float: left;
239
+ }
240
+
241
+ .form .columns .right {
242
+ float: right;
243
+ }
244
+
245
+ .form label.label, .form input.text_field, .form textarea.text_area {
246
+ font-size: 1.2em;
247
+ padding: 1px 0;
248
+ margin: 0;
249
+ }
250
+
251
+ .form label.right {
252
+ text-align: right;
253
+ }
254
+
255
+ .form input.checkbox, .form input.radio {
256
+ margin-right: 5px;
257
+ }
258
+
259
+ .form label.checkbox, .form label.radio {
260
+ line-height: 1.5em;
261
+ }
262
+
263
+ .form label.label {
264
+ display: block;
265
+ padding-bottom: 2px;
266
+ font-weight: bold;
267
+ }
268
+
269
+ .form div.fieldWithErrors label.label {
270
+ display: inline;
271
+ }
272
+
273
+ .form .fieldWithErrors .error {
274
+ color: red;
275
+ }
276
+
277
+ .form input.text_field, .form textarea.text_area {
278
+ width: 100%;
279
+ border-width: 1px;
280
+ border-style: solid;
281
+ }
282
+
283
+ /* lists */
284
+
285
+ ul.list {
286
+ margin: 0;
287
+ padding: 0;
288
+ list-style-type: none;
289
+ }
290
+
291
+ ul.list li {
292
+ clear: left;
293
+ padding-bottom: 5px;
294
+ }
295
+
296
+ ul.list li .left {
297
+ float: left;
298
+ }
299
+
300
+ ul.list li .left .avatar {
301
+ width: 50px;
302
+ height: 50px;
303
+ }
304
+
305
+ ul.list li .item {
306
+ margin-left: 80px;
307
+ }
308
+
309
+ ul.list li .item .avatar {
310
+ float: left;
311
+ margin: 0 5px 5px 0;
312
+ width: 30px;
313
+ height: 30px;
314
+ }
315
+
316
+ /* box */
317
+
318
+ #box {
319
+ width: 500px;
320
+ margin: 50px auto;
321
+ }
322
+
323
+ #box .block {
324
+ margin-bottom: 20px;
325
+ }
326
+
327
+ #box .block h2 {
328
+ padding: 10px 15px;
329
+ margin: 0;
330
+ }
331
+
332
+ #box .block .content {
333
+ padding: 10px 20px;
334
+ }
@@ -0,0 +1,36 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <title>title</title>
6
+ <%%= stylesheet_link_tag 'base', 'style' %>
7
+ </head>
8
+ <body>
9
+ <div id="container">
10
+ <div id="header">
11
+ <h1><a href="/"><%%= File.dirname(RAILS_ROOT) %></a></h1>
12
+ </div>
13
+ <div id="wrapper">
14
+ <div id="main">
15
+ <%% unless flash.empty? %>
16
+ <div class="flash">
17
+ <%% flash.each do |sev, message| %>
18
+ <%%= content_tag :div, message, :class => sev %>
19
+ <%% end %>
20
+ </div>
21
+ <%% end %>
22
+ <%%= yield %>
23
+ </div>
24
+ <div id="sidebar">
25
+ <%%= yield :sidebar %>
26
+ </div>
27
+ <div class="clear"></div>
28
+ </div>
29
+ <div id="footer">
30
+ <div class="block">
31
+ <p>Copyright &copy; <%= Time.now.strftime("%Y") %> Rubaidh Ltd</p>
32
+ </div>
33
+ </div>
34
+ </div>
35
+ </body>
36
+ </html>
@@ -0,0 +1,321 @@
1
+ .small { font-size:11px; }
2
+ .gray { color:#999; }
3
+ .hightlight { background-color:#ffc; }
4
+
5
+ a:link, a:visited, a:hover, a:active, h1, h2, h3 { color: #660606; }
6
+
7
+ body {
8
+ color: #222;
9
+ background: #ddd;
10
+ font-family: "Helvetica Neue",Helvetica,Arial,"Bitstream Vera Sans",sans-serif;
11
+ }
12
+
13
+ hr {
14
+ background: #EEF0F0;
15
+ color: #EEF0F0;
16
+ }
17
+
18
+ /* @end */
19
+
20
+ /* @group Header */
21
+
22
+ #header {
23
+ background: #660606;
24
+ }
25
+
26
+ #header h1 {
27
+ padding: 10px 0;
28
+ }
29
+
30
+ #header h1 a:link, #header h1 a:active, #header h1 a:hover, #header h1 a:visited {
31
+ color: #F7F7F8;
32
+ }
33
+
34
+ /* @end */
35
+
36
+ #user-navigation {
37
+ top: auto;
38
+ bottom: 5px;
39
+ right: 25px;
40
+ }
41
+
42
+ #main .block h2{
43
+ background-color: blue;
44
+ padding: 5px 15px;
45
+ margin: 0;
46
+ background-color: #9e0a0a;
47
+ color: #fff;
48
+ -moz-border-radius-topleft: 4px;
49
+ -webkit-border-top-left-radius: 4px;
50
+ -moz-border-radius-topright: 4px;
51
+ -webkit-border-top-right-radius: 4px;
52
+ }
53
+
54
+ #main .block .content {
55
+ background: #F7F7F8;
56
+ -moz-border-radius-bottomleft: 4px;
57
+ -webkit-border-bottom-left-radius: 4px;
58
+ -moz-border-radius-bottomright: 4px;
59
+ -webkit-border-bottom-right-radius: 4px;
60
+ }
61
+
62
+ #main .block .content .inner{
63
+ line-height: 1.4em;
64
+ font-size: 1.1em;
65
+ }
66
+
67
+ table.results{
68
+ width: 100%;
69
+ text-align: center;
70
+ }
71
+ /* @group Main navigation */
72
+
73
+ #main-navigation ul li {
74
+ padding-left: 0;
75
+ }
76
+
77
+ #main-navigation ul li a {
78
+ padding: 8px 0;
79
+ }
80
+
81
+ #main-navigation ul li a {
82
+ padding: 8px 15px;
83
+ }
84
+
85
+ #main-navigation {
86
+ background-color: #005573;
87
+ }
88
+
89
+ #main-navigation ul li a:hover {
90
+ background-color: #001C26;
91
+ }
92
+
93
+ #main-navigation ul li.active a {
94
+ background-color: #C2C8D1;
95
+ background: -webkit-gradient(linear, left top, left bottom, from(#C2C8D1), to(#C2C8D1), color-stop(0.5, #F7F7F8), color-stop(0.5, #F7F7F8));
96
+
97
+ }
98
+
99
+ label{
100
+ display: block;
101
+ font-size: 1.3em;
102
+ }
103
+
104
+ #query_keywords{
105
+ width: 100%;
106
+ font-size: 1.3em;
107
+ border: 3px solid #bdd0dd;
108
+ }
109
+
110
+ /* @end */
111
+
112
+ /* @group Secondary navigation */
113
+
114
+ .secondary-navigation li a:hover {
115
+ background: #005573;
116
+ }
117
+
118
+ .secondary-navigation {
119
+ background: #007BA7;
120
+ border-bottom-width: 7px;
121
+ border-bottom-color: #005573;
122
+ }
123
+
124
+ .secondary-navigation ul li.active, .secondary-navigation ul li.active a:hover {
125
+ background-color: #005573;
126
+ }
127
+
128
+ /* @end */
129
+
130
+ /* @group Sidebar */
131
+
132
+ #sidebar .block {
133
+ background: #F7F7F8;
134
+ line-height: 1.4em;
135
+ font-size: 1.1em;
136
+ }
137
+
138
+ #sidebar h3 {
139
+ background: #007BA7;
140
+ color: #F7F7F8;
141
+ border-bottom: 7px solid #005573;
142
+ }
143
+
144
+ #sidebar ul{
145
+ padding-left: 2em;
146
+ list-style-type: square;
147
+ color: #bdd1dd;
148
+ }
149
+ #sidebar ul span{
150
+ color: #000;
151
+ }
152
+
153
+ #sidebar ul li a:link, #sidebar ul li a:visited {
154
+ background: #F7F7F8;
155
+ border-bottom: 1px solid #EEF0F0;
156
+ text-decoration: none;
157
+ }
158
+
159
+ #sidebar ul li a:hover, #sidebar ul li a:active {
160
+ background: #005573;
161
+ color: #F7F7F8;
162
+ }
163
+
164
+ /* @end */
165
+
166
+ #main-navigation ul li a:link, #main-navigation ul li a:visited, #main-navigation ul li a:hover, #main-navigation ul li a:active,
167
+ .secondary-navigation ul li a:link, .secondary-navigation ul li a:visited, .secondary-navigation ul li a:hover, .secondary-navigation ul li a:active,
168
+ #user-navigation ul li a:link, #user-navigation ul li a:visited, #user-navigation ul li a:hover, #user-navigation ul li a:active {
169
+ text-decoration: none;
170
+ color: #F7F7F8;
171
+ }
172
+
173
+ #main-navigation ul li.active a:link, #main-navigation ul li.active a:visited, #main-navigation ul li.active a:hover, #main-navigation ul li.active a:active {
174
+ color: #001C26;
175
+ }
176
+
177
+ #footer .block {
178
+ color: #222;
179
+ background-color: #aaa;
180
+ }
181
+
182
+ #footer .block p {
183
+ margin: 0;
184
+ padding: 10px;
185
+ }
186
+
187
+ /* pagination */
188
+
189
+ .pagination span.current {
190
+ background: #005573;
191
+ color: #F7F7F8;
192
+ border-color: #005573;
193
+ }
194
+
195
+ .pagination a,
196
+ .pagination span {
197
+ color: #001C26;
198
+ border-color: #005573;
199
+ }
200
+
201
+ .pagination a:hover {
202
+ color: #F7F7F8;
203
+ background: #005573;
204
+ }
205
+
206
+ /* tables */
207
+
208
+ .table th {
209
+ background: #C2C8D1;
210
+ color: #001C26;
211
+ }
212
+
213
+ .table td {
214
+ border-bottom:1px solid #EEF0F0;
215
+ }
216
+
217
+ /* forms */
218
+
219
+ .form input.text_field, .form textarea.text_area {
220
+ width: 100%;
221
+ border: 1px solid #001C26;
222
+ }
223
+
224
+ .form input.button {
225
+ background: #EEE;
226
+ color: #001C26;
227
+ padding: 2px 5px;
228
+ border: 1px solid #001C26;
229
+ cursor: pointer;
230
+ }
231
+
232
+ .form .description {
233
+ color: #8C8C8C;
234
+ font-size: .9em;
235
+ }
236
+
237
+ /* @group Flash messages */
238
+
239
+ .flash .message {
240
+ -moz-border-radius: 3px;
241
+ -webkit-border-radius: 3px;
242
+ text-align:center;
243
+ margin: 0 auto 15px;
244
+ }
245
+
246
+ .flash .message p {
247
+ margin:8px;
248
+ }
249
+ .flash .error {
250
+ border: 1px solid #fbb;
251
+ background-color: #fdd;
252
+ }
253
+ .flash .warning {
254
+ border: 1px solid #e0d300;
255
+ background-color: #ffffcc;
256
+ }
257
+ .flash .notice {
258
+ border: 1px solid #8ec4df;
259
+ background-color: #dffaff;
260
+ }
261
+
262
+ /* @end */
263
+
264
+ /* lists */
265
+
266
+ ul.list li {
267
+ border-bottom-color: #EEF0F0;
268
+ border-bottom-width: 1px;
269
+ border-bottom-style: solid;
270
+ }
271
+
272
+ ul.list li .item .avatar {
273
+ border-color: #EEF0F0;
274
+ border-width: 1px;
275
+ border-style: solid;
276
+ padding: 2px;
277
+ }
278
+
279
+ /* box */
280
+
281
+ #box .block {
282
+ background: #F7F7F8;
283
+ }
284
+
285
+ #box .block h2 {
286
+ background: #005573;
287
+ color: #F7F7F8;
288
+ }
289
+
290
+
291
+ /* rounded borders */
292
+
293
+ #main, #main-navigation, #main-navigation li, #main-navigation li a, .secondary-navigation, #main .block, #sidebar .block, #sidebar h3, ul.list li,
294
+ #footer .block, .form input.button, #box .block, #box .block h2 {
295
+ -moz-border-radius-topleft: 4px;
296
+ -webkit-border-top-left-radius: 4px;
297
+ -moz-border-radius-topright: 4px;
298
+ -webkit-border-top-right-radius: 4px;
299
+ }
300
+
301
+ .secondary-navigation li.first a, .secondary-navigation ul li.first, .table th.first, .table th.first {
302
+ -moz-border-radius-topleft: 4px;
303
+ -webkit-border-top-left-radius: 4px;
304
+ }
305
+
306
+ .table th.last {
307
+ -moz-border-radius-topright: 4px;
308
+ -webkit-border-top-right-radius: 4px;
309
+ }
310
+
311
+ .secondary-navigation ul li.first {
312
+ -moz-border-radius-topleft: 4px;
313
+ -webkit-border-top-left-radius: 4px;
314
+ }
315
+
316
+ #sidebar, #sidebar .block, #main .block, #sidebar ul.navigation, ul.list li, #footer .block, .form input.button, #box .block {
317
+ -moz-border-radius-bottomleft: 4px;
318
+ -webkit-border-bottom-left-radius: 4px;
319
+ -moz-border-radius-bottomright: 4px;
320
+ -webkit-border-bottom-right-radius: 4px;
321
+ }
@@ -1,6 +1,10 @@
1
- <h1>Editing <%= singular_name.humanize %></h1>
2
-
3
- <%%= render :partial => 'form', :locals => { :<%= singular_name %> => @<%= singular_name %> } %>
4
-
5
- <p><%%= link_to 'Show', @<%= singular_name %> %> |
6
- <%%= link_to 'Back', <%= plural_name %>_path %></p>
1
+ <div class="block">
2
+ <div class="content">
3
+ <h2 class="title">Editing <%= singular_name.humanize %></h2>
4
+ <div class="inner">
5
+ <%%= render :partial => 'form', :locals => { :<%= singular_name %> => @<%= singular_name %> } %>
6
+ <p><%%= link_to 'Show', @<%= singular_name %> %> |
7
+ <%%= link_to 'Back', <%= plural_name %>_path %></p>
8
+ </div>
9
+ </div>
10
+ </div>
@@ -1,5 +1,10 @@
1
- <h1>Listing <%= plural_name.humanize %></h1>
1
+ <div class="block">
2
+ <div class="content">
3
+ <h2 class="title">Listing <%= plural_name.humanize %></h2>
4
+ <div class="inner">
5
+ <%%= render :partial => @<%= plural_name %>, :layout => '<%= plural_name %>' %>
6
+ <p><%%= link_to 'New <%= singular_name %>', new_<%= singular_name %>_path %></p>
7
+ </div>
8
+ </div>
9
+ </div>
2
10
 
3
- <%%= render :partial => @<%= plural_name %>, :layout => '<%= plural_name %>' %>
4
-
5
- <p><%%= link_to 'New <%= singular_name %>', new_<%= singular_name %>_path %></p>
@@ -1,5 +1,9 @@
1
- <h1>New <%= singular_name.humanize %></h1>
2
-
3
- <%%= render :partial => 'form', :locals => { :<%= singular_name %> => @<%= singular_name %> } %>
4
-
5
- <p><%%= link_to 'Back', <%= plural_name %>_path %></p>
1
+ <div class="block">
2
+ <div class="content">
3
+ <h2 class="title">New <%= singular_name.humanize %></h2>
4
+ <div class="inner">
5
+ <%%= render :partial => 'form', :locals => { :<%= singular_name %> => @<%= singular_name %> } %>
6
+ <p><%%= link_to 'Back', <%= plural_name %>_path %></p>
7
+ </div>
8
+ </div>
9
+ </div>
@@ -1,11 +1,17 @@
1
- <h1>Showing <%= singular_name.humanize %></h1>
1
+ <div class="block">
2
+ <div class="content">
3
+ <h2 class="title">Showing <%= singular_name.humanize %></h2>
4
+ <div class="inner">
5
+ <% attributes.each do |attribute| -%>
6
+ <dl>
7
+ <dt><%= attribute.column.human_name %></dt>
8
+ <dd><%%=h @<%= singular_name %>.<%= attribute.name %> %></dd>
9
+ </dl>
2
10
 
3
- <% attributes.each do |attribute| -%>
4
- <dl>
5
- <dt><%= attribute.column.human_name %></dt>
6
- <dd><%%=h @<%= singular_name %>.<%= attribute.name %> %></dd>
7
- </dl>
11
+ <% end -%>
12
+ <p><%%= link_to 'Edit', edit_<%= singular_name %>_path(@<%= singular_name %>) %> |
13
+ <%%= link_to 'Back', <%= plural_name %>_path %></p>
14
+ </div>
15
+ </div>
16
+ </div>
8
17
 
9
- <% end -%>
10
- <p><%%= link_to 'Edit', edit_<%= singular_name %>_path(@<%= singular_name %>) %> |
11
- <%%= link_to 'Back', <%= plural_name %>_path %></p>
data/generators.gemspec CHANGED
@@ -1,8 +1,8 @@
1
1
  spec = Gem::Specification.new do |s|
2
2
  s.name = 'generators'
3
- s.version = '1.0.4'
4
- s.date = '2009-03-04'
5
- s.authors = ['Graeme Mathieson', 'Rubaidh Ltd']
3
+ s.version = '1.0.6'
4
+ s.date = '2009-03-17'
5
+ s.authors = ['Graeme Mathieson', 'Mark Connell' 'Rubaidh Ltd']
6
6
  s.email = 'support@rubaidh.com'
7
7
  s.rubyforge_project = 'rubaidh'
8
8
  s.homepage = 'http://rubaidh.com/portfolio/open-source'
@@ -41,14 +41,19 @@ spec = Gem::Specification.new do |s|
41
41
  generators/rubaidh_scaffold/templates/view_new.html.erb
42
42
  generators/rubaidh_scaffold/templates/view_show.html.erb
43
43
  generators/rubaidh_scaffold/USAGE
44
+ generators/rubaidh_layout/rubaidh_layout_generator.rb
45
+ generators/rubaidh_layout/templates/base.css
46
+ generators/rubaidh_layout/templates/style.css
47
+ generators/rubaidh_layout/templates/layout.html.erb
44
48
  templates/rubaidh.rb
45
49
  )
46
50
 
47
51
  s.add_dependency 'rails', '>=2.3.0'
52
+ s.add_dependency 'grit', '>=1.0.1'
48
53
 
49
54
  s.bindir = "bin"
50
55
  s.executables = ["rubaidh_rails"]
51
56
  s.default_executable = "rubaidh_rails"
52
57
 
53
- s.has_rdoc = true
58
+ s.has_rdoc = false
54
59
  end
data/templates/rubaidh.rb CHANGED
@@ -16,6 +16,10 @@ file ".gitignore", <<-GITIGNORE
16
16
 
17
17
  # RSpec test coverage
18
18
  /coverage
19
+
20
+ # Pesky .DS_Store files from Mac OS X
21
+ .DS_Store
22
+
19
23
  GITIGNORE
20
24
 
21
25
  # Don't delete the log folder, thanks, git.
@@ -34,16 +38,15 @@ git :add => '.'
34
38
  git :commit => '-m "Update Rails skeleton code to latest from edge Rails."'
35
39
 
36
40
  # Pull in all our favourite testing tools.
37
- plugin 'remarkable', :git => 'git://github.com/carlosbrando/remarkable.git', :submodule => true
41
+ plugin 'shoulda', :git => 'git://github.com/thoughtbot/shoulda.git', :submodule => true
38
42
  plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git', :submodule => true
39
43
  plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git', :submodule => true
40
44
  plugin 'webrat', :git => 'git://github.com/brynary/webrat.git', :submodule => true
41
- plugin 'cucumber', :git => 'git://github.com/aslakhellesoy/cucumber.git', :submodule => true
42
45
  plugin 'object_daddy', :git => 'git://github.com/flogic/object_daddy.git', :submodule => true
43
46
  generate 'rspec'
44
47
  generate 'cucumber'
45
48
  git :add => '.'
46
- git :commit => "-m 'Pull in submodules, and install support, for RSpec/Cucumber testing tools.'"
49
+ git :commit => "-m 'Pull in submodules, and install support, for RSpec testing tools.'"
47
50
 
48
51
  # Remave the existing Test::Unit test suite code.
49
52
  git :rm => "-rf test"
@@ -56,24 +59,45 @@ rake "db:migrate"
56
59
  git :add => "db/schema.rb"
57
60
  git :commit => "-m 'Create a blank database schema.'"
58
61
 
59
- # Hoptoad Notifier for notification of production errors
60
- plugin 'hoptoad_notifier', :git => 'git://github.com/thoughtbot/hoptoad_notifier.git', :submodule => true
61
- file 'app/controllers/application_controller.rb', <<-RUBY
62
- class ApplicationController < ActionController::Base
63
- helper :all
64
- protect_from_forgery
65
- filter_parameter_logging :password
66
-
67
- include HoptoadNotifier::Catcher
68
- end
69
- RUBY
70
-
71
- initializer 'hoptoad.rb', <<-RUBY
72
- HoptoadNotifier.configure do |config|
73
- # FIXME Insert Hoptoad API key.
74
- config.api_key = 'Insert API Key here'
75
- end
76
- RUBY
62
+ # GetExceptional Notifier for notification of production errors
63
+ plugin 'exceptional', :git => 'git://github.com/contrast/exceptional.git', :submodule => true
64
+ file 'config/exceptional.yml', <<-EXCEPTIONAL
65
+ # here are the settings that are common to all environments
66
+ common: &default_settings
67
+ # You must specify your Exceptional API key here.
68
+ api-key: API_KEY_GOES_HERE
69
+ # Exceptional creates a separate log file from your application's logs
70
+ # available levels are debug, info, warn, error, fatal
71
+ log-level: info
72
+ # The exceptional agent sends data via regular http by default
73
+ # Setting this value to true will send data over SSL, increasing security
74
+ # There will be an additional CPU overhead in encrypting the data, however
75
+ # as long as your deployment environment is not Passenger (mod_rails), this
76
+ # happens in the background so as not to incur a page wait for your users.
77
+ ssl: false
78
+
79
+ development:
80
+ <<: *default_settings
81
+ # Normally no reason to collect exceptions in development
82
+ # NOTE: for trial purposes you may want to enable exceptional in development
83
+ enabled: false
84
+
85
+ test:
86
+ <<: *default_settings
87
+ # No reason to collect exceptions when running tests by default
88
+ enabled: false
89
+
90
+ production:
91
+ <<: *default_settings
92
+ enabled: true
93
+
94
+ staging:
95
+ # It's common development practice to have a staging environment that closely
96
+ # mirrors production, by default catch errors in this environment too.
97
+ <<: *default_settings
98
+ enabled: true
99
+
100
+ EXCEPTIONAL
77
101
 
78
102
  git :add => '.'
79
103
  git :commit => "-m 'Incorporate Hoptoad exception notification support.'"
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubaidh-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Graeme Mathieson
8
- - Rubaidh Ltd
8
+ - Mark ConnellRubaidh Ltd
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-03-04 00:00:00 -08:00
13
+ date: 2009-03-17 00:00:00 -07:00
14
14
  default_executable: rubaidh_rails
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -23,6 +23,16 @@ dependencies:
23
23
  - !ruby/object:Gem::Version
24
24
  version: 2.3.0
25
25
  version:
26
+ - !ruby/object:Gem::Dependency
27
+ name: grit
28
+ type: :runtime
29
+ version_requirement:
30
+ version_requirements: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: 1.0.1
35
+ version:
26
36
  description: Generators for building Ruby on Rails projects the Rubaidh Way
27
37
  email: support@rubaidh.com
28
38
  executables:
@@ -68,8 +78,12 @@ files:
68
78
  - generators/rubaidh_scaffold/templates/view_new.html.erb
69
79
  - generators/rubaidh_scaffold/templates/view_show.html.erb
70
80
  - generators/rubaidh_scaffold/USAGE
81
+ - generators/rubaidh_layout/rubaidh_layout_generator.rb
82
+ - generators/rubaidh_layout/templates/base.css
83
+ - generators/rubaidh_layout/templates/style.css
84
+ - generators/rubaidh_layout/templates/layout.html.erb
71
85
  - templates/rubaidh.rb
72
- has_rdoc: true
86
+ has_rdoc: false
73
87
  homepage: http://rubaidh.com/portfolio/open-source
74
88
  post_install_message:
75
89
  rdoc_options: []