Sow
Tending Project Ecology
Introduction
Sow is a project scaffolding generator. Techincally it is a simple templating system based on eRuby, but it is designed with project templating squarely in mind.
Installation
Install using RubyGems as you would expect:
$ gem install sow
There is no manual install at the moment. This will be fixed in a future release.
Usage
To start a new project simply use:
$ sow myapp
You will see the following outout:
Transferring reap/**/* to myapp/:
create CHANGES
create COPYING
create NOTES
create README
create admin
create admin/config
create admin/pkg
create admin/temps
create admin/temps/lib
create admin/temps/lib/myapp
create admin/temps/lib/myapp/about.rb.erb
create admin/web
create bin
create data
create doc
create doc/rdoc
create doc/ri
create lib
create lib/my-app
create meta
create meta/authors
create meta/created
create meta/description
create meta/email
create meta/homepage
create meta/license
create meta/name
create meta/repository
create meta/status
create meta/title
create meta/version
create test
You need to fix the occurances of 'FIX' in the following files:
README
meta/description
Notice the mention of ‘reap/**/*’. By default Sow scaffolds-out a project layout suited to use by Reap build system. This is a good project layout even if you aren’t using Reap, but you may want to add a standard Rakefile. You can do that will Sow:
$ sow ruby/Rakefile myapp
On the other hand if you just want an old-fashioned Ruby project, you can do:
$ sow ruby myapp
You can change the default project type by editing $HOME/.etc/sow/default_type.
With you project setup, be sure to go over the contents and fine-tune it. In particular, edit the files that contain ‘FIX’ entries.
Sow can continue to be used for in-project templates. To do this, add templates to the temps/ or admin/temps directories, reflecting the same layout of your project. For example:
myapp/
lib/
myapp/
myapp.rb
temps/
lib/
myapp/
myapp.rb.erb
meta/
...
Change into your project directory and run:
$ sow
Project files will be generated based on the templates and metadata entries.
Hoe Users
Hoe users will notice that the sow command that comes with Hoe is overwritten, by Sow. Sow support Hoe projects, so there is nothing lost. Simply use:
$ sow hoe [directory]
Or, to use Hoe as the default edit $HOME/.etc/sow/default_type to contain the work Hoe. Note, the Hoe scaffolding does not support the in-project templating system. To get that you need to create a meta/ direcroty in your project, and a place to store templates, eg. temps/.
Development
Copying
Copyright © 2007, 2008 TigerOps
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
What's New
Two Years?
Can you believe it's been two years? Over two years since I began this crazy eyed journey to create the ultimate Ruby build tool. If I had any idea what I was getting myself into I would likely have ran away screaming, thankful for having saved myself an extrodinarily amount of time. Thankfully I can finally say that day has almost arrived. And about time too. I was starting to get worried ;) The final result turned out to be just a single project, rather three came from the edeavor: Ratch, Sow and Reap.