@@ -40,7 +40,14 @@ class BakeShell extends Shell {
40
40
public $ tasks = array ('Project ' , 'DbConfig ' , 'Model ' , 'Controller ' , 'View ' , 'Plugin ' , 'Fixture ' , 'Test ' );
41
41
42
42
/**
43
- * Override loadTasks() to handle paths
43
+ * The connection being used.
44
+ *
45
+ * @var string
46
+ */
47
+ public $ connection = 'default ' ;
48
+
49
+ /**
50
+ * Assign $this->connection to the active task if a connection param is set.
44
51
*
45
52
*/
46
53
public function startup () {
@@ -121,7 +128,6 @@ public function main() {
121
128
*
122
129
*/
123
130
public function all () {
124
- $ this ->hr ();
125
131
$ this ->out ('Bake All ' );
126
132
$ this ->hr ();
127
133
@@ -157,6 +163,7 @@ public function all() {
157
163
158
164
if ($ modelBaked && $ modelExists === false ) {
159
165
$ this ->out (sprintf (__ ('%s Model was baked. ' ), $ model ));
166
+
160
167
if ($ this ->_checkUnitTest ()) {
161
168
$ this ->Model ->bakeFixture ($ model );
162
169
$ this ->Model ->bakeTest ($ model );
@@ -166,16 +173,16 @@ public function all() {
166
173
167
174
if ($ modelExists === true ) {
168
175
$ controller = $ this ->_controllerName ($ name );
176
+ $ this ->out (sprintf (__ ('Baking %s Controller... ' , 1 ), $ controller ));
169
177
if ($ this ->Controller ->bake ($ controller , $ this ->Controller ->bakeActions ($ controller ))) {
170
- $ this ->out (sprintf (__ ('%s Controller was baked. ' ), $ name ));
171
178
if ($ this ->_checkUnitTest ()) {
172
179
$ this ->Controller ->bakeTest ($ controller );
173
180
}
174
181
}
175
182
if (App::import ('Controller ' , $ controller )) {
176
183
$ this ->View ->args = array ($ controller );
177
184
$ this ->View ->execute ();
178
- $ this ->out (sprintf (__ ('%s Views were baked. ' ), $ name ));
185
+ $ this ->out (sprintf (__ ('%s Views were baked. ' ), $ controller ));
179
186
}
180
187
$ this ->out (__ ('Bake All complete ' ));
181
188
array_shift ($ this ->args );
0 commit comments