Smutty

MVC Framework

SmuttySmut

smut is a helper script that you'll find in the root of the Smutty folders. It's meant to make it easier for you to do things like create models and controllers, run tests, and hopefully someday other funky stuff. This page shows you some of the things smut can help you with.

Controllers and Models

When you want to create a new Controller or Model you can do this manually by opening your text editor and typing the class definition. But if you like you can ask smut to do this for you. Smut will then make sure all the corrent files and directories are created. Here's an example of how to create a new controller with smut.

$> ./smut controller Post

This simple command will then create an empty controller called PostController in your controllers directory, an ensure that the assumed views/post view folder exists.

Unit Testing

You can also use smut to run any unit testing classes you have created. You do so by issuing the following command (where MyTest is the name of your test class).

./smut test MyTest

Setup

Smut provides a utility for setting up Smutty. It checks through your install and makes sure all the required files and in place, appropriate directories are writable, etc... To invoke it just use the following command.

./smut setup

You can run this any time to make sure your configuration is ok.

Links: Post a comment

Useful Pages

Links