Name

falsework–A primitive scaffold generator for writing CLI programs.

Synopsis

falsework [options] command ...

Description

The falsework utility ships with 2 templates: ruby-cli and c-glib.

Initially the template spec was designed only for Ruby projects but later (from version 1.3.0) hard-coded Ruby staff was removed which added more flexibility.

Generated projects are not dependent on falsework. The utility can also add skeletons for tests end executables after the project generation.

Ruby Template

… is default. It generates a scaffold which has:

  • auto-created git (but not github) project;

  • gemspec (a file list is pulled from the git repository), doc, test targets; build, install & release bundler targets.

  • easy to use configuration parser/loader. This includes auto-scanning for:

    • env variable(s);

    • the flat YAML configuration file;

    • the command line.

  • an ability to pick up a user name & an email for a github project.

Version & name of your project can be located at generated myproject/lib/myproject/meta.rb file.

Options

Run

$ falsework -h

to read all possible commands & global options. All of them, except new & list, work from the root project directory.

Some of the commands support -h option too, for example:

$ falsework upgrade -h

Examples

Create a new project:

$ falsework -v new foobar

Add another CL util to the existing project:

$ pwd
.../foobar
$ falsework exe foo

(It will appear in bin/ sub-directory.)

Add another test file:

$ falsework test foo

(It will appear in test/ sub-directory.)

Create a project from another template:

$ falsework -t c-glib -v new foo-bar

Bugs

While falsework supports symlinks in templates, rubygems replaces symlinks with its corresponding source files. That is why you’ll get 2 README.rdoc files in generated project when it was intended to have 1 in doc sub-directory and the symlink to it in the root project directory.

If you think that this is pathetic, then just grab the source of falsework, place its directory somewhere, create a symlink to /where/is/your/clone/falsework/bin/falsework file in one of your PATH directories and forget about the gem and this bug.