public
Description: Rubigen based generator for new sinatra projects
Homepage: http://code.quirkey.com/sinatra-gen
Clone URL: git://github.com/quirkey/sinatra-gen.git
quirkey (author)
Wed Apr 29 14:19:43 -0700 2009
commit  f3a8091a66fb8d3d381595ff1f7a0845cb975926
tree    00c9e7e38907df3ffbd25e47b0855af249e9d4e4
parent  3cc8315cde62a10f52d1777a2be9427c2935caec
name age message
file .gitignore Sat Dec 13 12:43:04 -0800 2008 Fixed error in Rakefile [quirkey]
file History.txt Loading commit data...
file LICENSE Fri Feb 13 08:45:10 -0800 2009 Added the MIT LICENSE [quirkey]
file Manifest.txt
file PostInstall.txt Sat Dec 13 13:44:07 -0800 2008 Updating README [quirkey]
file README.rdoc
file Rakefile
directory app_generators/
directory bin/ Tue Dec 16 09:41:26 -0800 2008 Fixed -v task for bin (require file was off) Tr... [quirkey]
directory lib/
directory script/ Sat Dec 13 08:07:44 -0800 2008 Initial Commit (newgem) [quirkey]
file sinatra-gen.gemspec
directory test/
README.rdoc

sinatra-gen

github.com/quirkey/sinatra-gen

DESCRIPTION:

sinatra-gen generates a common file structure and basic app files for a web app utilizing the sinatra framework. For more information on sinatra, check out sinatrarb.com

SYNOPSIS:

sinatra-gen has a bunch of different options (based loosley on merb-gen) to try to not lock the user into any specific frameworks/dev practices.

Run:

  sinatra-gen [appname] [options] [paths]

e.g.

  sinatra-gen mysinatrapp --vendor --init --test=shoulda --views=haml get:/ post:/:id

Actions

For even faster app development you specify actions to include in your app when generating. Actions are written out as

  http_method:path

And are seperated by spaces. For example:

  get:/ post:/:id put:/update/*

Will be added you your app as:

  get '/' do
  end

  post '/:id' do
  end

  put '/update/*' do
  end

It will also generate test skeletons in the test framework of your choosing.

Options

(can also be obtained by running sinatra-gen with no arguments):

    -v, --version                    Show the sinatra-gen version number and quit.
    -d, --vendor                     Extract the latest sinatra to vendor/sinatra
        --tiny                       Only create the minimal files.
        --init                       Initialize a git repository
        --heroku                     Create a Heroku app (also runs 'git init').
 Optionally, specify the path to the heroku bin
        --cap                        Adds config directory with basic capistrano deploy.rb
        --scripts                    Install the rubigen scripts (script/generate, script/destroy)
        --test=test_framework        Specify your testing framework (bacon (default)/rspec/spec/shoulda/test)
        --views=view_framework       Specify your view framework (haml (default)/erb/builder)

General Options:

    -h, --help                       Show this help message and quit.
    -p, --pretend                    Run but do not make any changes.
    -f, --force                      Overwrite files that already exist.
    -s, --skip                       Skip files that already exist.
    -q, --quiet                      Suppress normal output.
    -t, --backtrace                  Debugging: show backtrace on errors.
    -c, --svn                        Modify files with subversion. (Note: svn must be in path)
    -g, --git                        Modify files with git. (Note: git must be in path)

The —tiny option will create no directories. Just an app.rb, a Rakefile, and a config.ru (Rackup file)

ACKNOWLEDGEMENTS:

Big props to the Sinatra developers (github.com/bmizerany/sinatra/). Also, thanks to Dr. Nic (github.com/drnic) for the Rubigen and Newgem libraries

REQUIREMENTS:

To use the —vendor option, git must be installed. To run the app without using the vendor option, the sinatra gem must be installed.

INSTALL:

  sudo gem install sintra-gen

You can also install directly from github:

  sudo gem install quirkey-sinatra-gen -s http://gems.github.com