Skip to content

rubyworks/quarry

Repository files navigation

Sow

TENDING TO PROJECT ECOLOGY

         ,            __ \/ __
     /\^/`\          /o \{}/ o\   If I had a flower for each time   
    | \/   |         \   ()   /     I thought of you, my garden
    | |    |          `> /\ <`   ,,,     would be full...
    \ \    /  @@@@    (o/\/\o)  {{{}}                 _ _
     '\\//'  @@()@@  _ )    (    ~Y~       @@@@     _{ ' }_
       ||     @@@@ _(_)_   wWWWw .oOOo.   @@()@@   { `.!.` }
       ||     ,/  (_)@(_)  (___) OO()OO    @@@@  _ ',_/Y\_,'
       ||  ,\ | /)  (_)\     Y   'OOOO',,,(\|/ _(_)_ {_,_}
   |\  ||  |\\|// vVVVv`|/@@@@    _ \/{{}}}\| (_)@(_)  |  ,,,
   | | ||  | |;,,,(___) |@@()@@ _(_)_| ~Y~ wWWWw(_)\ (\| {{{}}
   | | || / / {{}}} Y  \| @@@@ (_)#(_) \|  (___)   |  \| /~Y~
    \ \||/ /\\|~Y~ \|/  | \ \/  /(_) |/ |/   Y    \|/  |//\|/
jgs\ `\\//`,.\|/|//.|/\\|/\\|,\|/ //\|/\|.\\\| // \|\\ |/,\|/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

INTRODUCTION

Sow is a project scaffolding system. The system is pluggable and utilizes eRuby templating to make it easy to extend. Sow can be used for any kind of file scaffolding, but it is designed largely with Ruby project needs in mind.

Sow’s plugins are called “seeds”. Sowing requires seeds. Sow comes with an extra large box of seeds to really get those projects blooming!

SOWING SEEDS

General usage follows the pattern:

sow [command] <seed> [*arguments] [*options] [*name=value]

If no command is given, then gen is the default. For instance to scaffold a new, basic ruby project with the name ‘myapp’ in the directory ‘myapp’:

$ mkdir myapp
$ cd myapp
$ sow ruby

By default, Sow’s built-in ruby seed will use the destination’s basename as the project name. If we wished to name the project something other than the destination’s path, we can supply that as an extra argument.

$ sow ruby foo

Or we could supply it via an environment setting.

$ sow ruby name=foo

When creating a new project, having to mkdir and cd is not convenient. For this sow provides the new command. With it we could create an empty project.

$ sow new myapp

Or do the same but also include a seed.

$ sow new myapp ruby

Finally, sow can plant multiple seeds at once by dividing each seed with ‘-’. For example lets say we needs a ruby project with cucumber features and an Apache license.

$ sow new foo ruby - license apache - cucumber

In the is way, sow promotes the use of mirco-scaffolding –seeds can be small and narrowly focused.

Once you have a project, Sow can be used to generate components as well, kind of like script/generate in Rails. For instance, to get a TestUnit starter test file.

$ sow test.testunit mytest

For more details on how to use Sow, what seeds are available and how to build your own seeds, please see the documentation provided on Sow’s website or the Wiki.

CURRENT STATUS

Sow is still a little wet behind the ears, and you might come across the occasional odd behavior. Please report on the Protutils mailing-list. Usually the issue will be something over-looked in a given seed –since they have a lot of flexability in their design. It will take some time and some widespread usage to work out all the corner cases and to bring each to a fine polish.

HOE USERS

*IMPORTANT NOTICE FOR HOE USERS!*

Hoe users will discover that the sow command that comes with Hoe will be clobbered by Sow. This may seem a not-so-nice thing to do, but truth be told Sow is a slightly older project than Hoe (albeit admittedly a very different program originally –what is now called Box). Since there is no command called hoe, it would seem a more logical choice in any case. I am not sure why it wasn’t used in the first place. To play nice, Sow ships with a copy of Hoe’s sow command renamed to hoe. Hoe users can simply use this command instead. Keep in mind however, that updating Hoe can likewise clobber Sow’s sow command.

INSTALLATION

RubyGems Install

Install using RubyGems as you would expect:

$ sudo gem install sow

This will install Sow, it’s Facets dependency if not alreay installed, and a number of built-in seeds. Keep in mind that some seeds come from the packages with which they are associated. For example, the Syckle seed is distributed with the Syckle package.

Site Install

Old-fashion site installs require Ruby Setup. If you don’t have Ruby Setup you can install it via Rubygems:

$ gem install setup

With Setup in place, download the Sow tarball (.tar.gz) and unpack it, then install by invoking setup.rb.

$ tar -xvvzf sow-1.0.0.tar.gz
$ cd sow-1.0.0 
$ sudo setup.rb

If you use Hoe, please see the the important message above before installing.

DEVELOPMENT

Sow is being developed on <a href=“hithub.com”>GitHub</a>, as part of the ProUtils set of project tools. You can browse the Sow project here:

http://github.com/proutils/sow/tree/master

Sow’s public repository can be pulled via:

git://github.com/proutils/sow.git

Please feel free to fork the project and submit pull requests. Discussion of Sow occurs on the ProUtils mailinglist.

http://groups.google.com/group/proutils

Happy hacking!

COPYRIGHT & LICENSE

Copyright © 2007 Thomas Sawyer

This software is distributed under the terms of the Apache 2.0 license.

Please see LICENSE file for details.

About

Tending Project Ecology

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages