Giter Club home page Giter Club logo

sinagen's Introduction

Sinagen - A Sinatra app generator

This gem generates an application skeleton for developing Sinatra apps. The application can then be deployed directly to Heroku

Installation

gem install sinagen

Usage

Create an app folder, where NAME is the project name

sinagen NAME

What it does

When you run the sinagen command, it generates a project directory and carries out the following tasks:

  • Creates the root project directory with a NAME.rb sinatra file, a Gemfile, and a config.ru file. The Sinatra app uses a "modular" format (as opposed to a Classic top-level format. See Sinatra Readme: Modular vs. Classic for details)

  • Sets up Rspec for the Sinatra app to use for development

  • Installs the Compass CSS framework for sass and simple css layouts

  • Initializes a git repository in the app directory, and makes an initial commit of all the files, and creates a .gitignore

  • Runs a simple rspec test, spec/setup_spec.rb, to make sure that the setup as gone properly, and that the app loads and runs on your system

  • runs 'bundle install' to install the necessary gems and generate the Gemfile.lock

The sinagen command generates the following layout in the project directory called NAME

project/
    README.md
    config.rb                # Compass configuration
    config.ru                # For rack
    Gemfile                  # Some basic gems prefilled
    Gemfile.lock
    .git/                   
    .gitignore      
    .rspec                   # Rspec config file
    public/
        images/
        stylesheets/         # CSS files generated from compiled sass
            ie.css
            print.css
            screen.css
            main.css
    spec/
        spec_helper.rb        
        setup_spec.rb        # Test app setup
    .sass-cache              # Compass tmp files, under gitignore
    view/
        stylesheets/
            ie.sass
            print.sass
            screen.sass
            main.sass
                partials/
                    _base.sass

The Sinatra App

This app:

  • Contains an inline haml layout.haml, which loads JQuery from the Google CDN, HTML5 Shiv, and IE9.js for HTML5 compatibility

  • has Compass configured for css generation. To generate css run

    compass compile .

  • uses Rspec for testing

To Deploy to Heroku

Follow the typical Heroku deployment instructions to deploy to heroku

heroku create appname

git push heroku master

Todo

Alot..

Limitations

Developed on ruby 1.9.2. Probably does not work on earlier versions of Ruby

No tests yet

Pre-alpha....

== Contributing to sinagen

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
  • Fork the project
  • Start a feature/bugfix branch
  • Commit and push until you are happy with your contribution
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

== Copyright

Copyright (c) 2011 Sidney Burks. See LICENSE.txt for further details.

sinagen's People

Contributors

sid137 avatar

Stargazers

 avatar Puru Dahal avatar  avatar Leandro avatar

Watchers

 avatar James Cloos 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.