Subject: | `jifty [model|action] -- name A::B::C` must create lib/$app/[Model|Action]/A/B/C.pm |
The command
jifty [model|action] --name AA::BB::CC
creates lib/$app/[Model|Action]/AA::BB::CC.pm
instead of lib/$app/[Model|Action]/AA/BB/CC.pm
This feature would be nice to have for large applications.
Patches to Jifty::Script::[Model|Action].pm are attached.
Subject: | Model.diff |
*** oldModel.pm 2009-05-01 07:16:31.000000000 +0400
--- newModel.pm 2009-08-14 17:26:02.000000000 +0400
***************
*** 157,164 ****
EOT
! $self->_write("$root/lib/$appclass_path/Model/$model.pm" => $modelFile,
! "$root/t/00-model-$model.t" => $testFile,
);
}
--- 157,166 ----
EOT
! my $path = $model;
! $path =~ s/::/\//g;
! $self->_write("$root/lib/$appclass_path/Model/$path.pm" => $modelFile,
! "$root/t/00-model-$path.t" => $testFile,
);
}
Subject: | Action.diff |
*** oldAction.pm 2009-05-01 07:16:31.000000000 +0400
--- newAction.pm 2009-08-14 17:29:01.000000000 +0400
***************
*** 157,165 ****
use_ok('@{[$appclass]}::Action::@{[$action]}');
EOT
! $self->_write("$root/lib/$appclass_path/Action/$action.pm" => $actionFile,
! "$root/t/00-action-$action.t" => $testFile,
);
}
--- 157,167 ----
use_ok('@{[$appclass]}::Action::@{[$action]}');
EOT
+ my $path = $action;
+ $path =~ s/::/\//g;
! $self->_write("$root/lib/$appclass_path/Action/$path.pm" => $actionFile,
! "$root/t/00-action-$path.t" => $testFile,
);
}