Giter Club home page Giter Club logo

rails-templates's Introduction

Rails Application Templates

This is a rails application template for quickly setting up Rails 3 apps.

To Use

Fastest, try it out:

rails new appname --skip-gemfile -JTm tiny.cc/rails3

Slower, installation:

If you want, you can simply download the rails3.rb template file, and feed it the rails command as an argument when you generate a new app:

wget --no-check-certificate 'https://github.com/sid137/rails-templates/raw/master/rails3.rb'
rails new $appname --skip-gemfile -JTm rails3.rb 

Recommended installation, For long term usage:

I added a function to my .zshrc, which gives me shell shortcut to load the rails3.rb template hosted on github.

ZSH function to initialize rails apps with templates file: ~/.zsrhc

function rapp {
    appname=$1
    template=$2
    rails new $appname --skip-gemfile -JTm https://github.com/sid137/rails-templates/raw/master/${template:-rails3}.rb 
}

With this shell command in place you can then rRun the default rails3.rb template by using the shell command % rapp appname

Template Actions

This template carries out the following actions when you run it for a new rails app.

  • Installs a default GEMFILE with my normal gems

  • Installs a HAML based layout, application.html.haml.

    • Layout loads JQuery from Google CDN

    • Stylesheets

    • HTML5 shiv to make older brozswers recognize HTML5 styling

    • sets up favicon and google analytics partial

    • renders flashes in

      tag

  • Default main.sass file which loads things I use

  • Creates a Google Analytics partial

  • Creates a .gitignore

  • Creates a README.md listing next steps to take

  • Creates a SECRETS file listing files to never let sneak into the open public

  • Creates a git repository for project

  • Installs Compass/Sass to manage css

  • Installs rspec and configures it for documentation format

  • Creates rspec directories needed for all testing

  • Creates an empty spec/factories.rb for using Factory Girl

  • Tells git to not ignore empty directories that we want to save

  • uses Bundler to install all gems to the project vendor/bundler directory, along with shortcuts in the bin directory

  • runs ctags to create a ctags file for navigating all of the gems, along with the rails source

  • Adds all files to the git rerpo

  • Finalizes initial commit

  • Creates local branches for staging and development

rails-templates's People

Contributors

sid137 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

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