Giter Club home page Giter Club logo

rails_templates's Introduction

Install

Once Rails has been fixed to allow https URIs to be supplied for rails templates you can add this function to your bash profile, zshrc or what ever:

Looks like 3.0.4: rails.lighthouseapp.com/projects/8994/tickets/5926-bug-patch-allow-https-uris-to-be-supplied-for-rails-templates

function railsapp {
  template=$1
  appname=$2
  shift 2
  rails $appname -m https://github.com/darrenterhune/rails_templates/raw/master/$template.rb $@
}

For now you will have to clone or download these templates to get them to work.

Just run it now!

You can then use this “railsapp” command instead of the traditional “rails” one by passing the template then the app as arguments:

After Rails has been fixed:

railsapp base appname
railsapp cssgrid appname

Before Rails has been fixed:

You first need to clone this repository or download these templates, then you can run:

rails appname -m /Users/path/to/base.rb
rails appname -m /Users/path/to/cssgrid.rb
rails appname -m /Users/path/to/boilerplate.rb
rails appname -m /Users/path/to/jquery.rb

What does it do?

base.rb

1. Creates README.rdoc (with default info for our system - change to your liking)
2. Removes public/index.html
3. Removes prototype javascript cause we like jquery better
4. Sets up basic app/views/layouts/application.html.erb file
5. Creates config/initializers/load_config.rb to load up the app config.yml file
6. Asks a bunch of app specific questions like what gems, plugins, configurations you would like
7. Capifies your app for deployment with dreamhost if wanted
8. Sets up git and commits initial commits
9. Sets up restul-authentication if you want

cssgrid.rb cssgrid.net by @andytlr

1. Does everything base.rb does above if wanted otherwise just installs cssgrid 
2. Downloads http://cssgrid.net extracts, moves files and cleans up archive and files
3. Asks some questions and sets up the default app/views/layouts/application.html.erb file

If you use cssgrid.rb you must attribute the author: @andytlr cssgrid.net

boilerplate.rb html5boilerplate.com/ @paul_irish

1. Does everthing base.rb does above if wanted otherwise just installs boilerplate
2. Clones https://github.com/paulirish/html5-boilerplate, moves files and cleans up repos and files
3. Asks some questions and sets up the default app/views/layouts/application.html.erb file

jquery.rb

1. Removes prototype but asks first!
2. Fetches latest jQuery and installs it
3. Commits the changes if you have git and are tracking your app

Contributors

These people have either a) helped b) I’m using their badass html/css template code:

Andy Taylor, Ryan Bates, Paul Irish

Copyright and License

Copyright © 2010 Darren Terhune

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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.