GitXplorerGitXplorer
j

mws-templates

public
3 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
a65f10e3d78c964d4160d52245307bc27a7fc508

Added TODO

jjulian7 committed 13 years ago
Unverified
cc4cb70ccf775997b7910cf9bf5c6d825710c1ad

Facelift for rbenv and rails 3.2.1

jjulian7 committed 13 years ago
Unverified
d21d056dc2ce6b17a706ed454fd3c0c387a36333

Updated README.md

jjulian7 committed 14 years ago
Unverified
e25852e10f420652f576b72ec55f86045fad2fe0

Updated mws:vlad

jjulian7 committed 14 years ago
Unverified
af2fe95654f306bf2d2c1752609ad84eeb54e028

Renamed configuration_unicorn.god.erb to configuration_unicorn.god

jjulian7 committed 14 years ago
Unverified
fc760e89262c428cff3cefa86c1c70407b1aeea5

Renamed mws.rb to template.rb

jjulian7 committed 14 years ago

README

The README file for this repository.

Rails3 template used by Magic Workshop Ltd.

Preparation

mkdir rails-nursery && cd rails-nursery
rbenv install 1.9.3-p125
rbenv local 1.9.3-p125
gem install bundler --pre
bundle init
echo 'gem "rails", "3.2.1" # or whatever' >> Gemfile
bundle --path=vendor --binstubs

Usage

/path/to/rails-nursery/bin/rails new <app name> -T -skip-bundle -m http://github.com/julian7/mws-templates/raw/master/template.rb
cd <app name>
rbenv local 1.9.3-p125

rwm-template generators

rwm-template comes in a gem as well, for more rails generators:

  • mws:layout: generates a standard layout we build on.
  • mws:vlad: generates necessary files for deployment.
  • mws:auth: generates basic authentication / authorization template with proper specs.
  • mws:scaffold: our standard crud scaffold (to be exported).

mws:vlad: How to deploy?

Our deployment scheme uses vlad and vlad-git. However, we use rake tasks and rails generators for post-deployment. This rake task (deploy:after_update) does standard stuff like copying configuration files from samples, generates god configurations, clears stylesheet and javascript caches, notifies Hoptoad and New Relic about the deployment. It also restarts required services using god.

Deployment structure

We use the standard vlad (== capistrano) format, with some extra:

/path/to/app/dir    <--- app dir
    .../.rvmrc      <--- we set rvm here, and we don't have to worry about rvmrc trust
    .../current     <--- points to the current release
    .../releases    <--- contains timestamped directories for the last 5 release
    .../scm         <--- used by vlad-git
    .../shared      <--- shared files for ...
        .../bundle  <--- ... bundler
        .../log     <--- ... logs
        .../pids    <--- ... process ID's
        .../system  <--- ... symlinked to public/system
        .../config  <--- ... contains files to be symlinked to config dir

Resources used

For more settings, visit html5boilerplate.com.