Code Monkey home page Code Monkey logo

sinatra-gen's Introduction

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 sinatra.rubyforge.org

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] [actions] [options]

e.g.

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

Actions

!! NEW as of 0.2.0 (12/23/08)

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 –cap Adds config directory with basic capistrano deploy.rb –scripts Install the rubigen scripts (script/generate, script/destroy) –git /path/to/git Specify a different path for ‘git’ –test=test_framework Specify your testing framework (unit (default)/rspec/spec/shoulda) –views=view_framework Specify your view framework (erb (default)/haml/builder)

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

sinatra-gen's People

Contributors

quirkey avatar

Stargazers

Angus H. avatar Tailor Fontela avatar

Watchers

Tailor Fontela avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.