Skip to content

DohMoose/rails-templates

 
 

Repository files navigation

rails-templates

This is a collection of rails application templates that are designed to get a rails application with datamapper up and running quickly. Currently, these templates are only compatible with rails3.

If you have rails3 installed on your system, creating a datamapper app on rails3 is as easy as issuing one command.

rails dm_rails3_app -m http://github.com/snusnu/rails-templates/raw/master/dm_rails_master.rb

If you don’t have rails3 installed, the following should get you going.

gem update --system # We need rubygems-1.3.6 for the command below to work
gem install rails --pre

That’s it. Have fun!

rspec support

Currently, rspec-rails isn’t yet fully compatible with rails3 and not yet completely ORM agnostic. Preliminary support is available though.

Developing and testing rails-templates

The project includes a Gemfile that contains one single line of code:

gem 'sinatra', '~> 1.0a', :git => 'git://github.com/sinatra/sinatra.git'

This enables a complete development environment on top pf sinatra simply by running

bundle install
bundle exec ruby dev_server.rb

Once the dev server is running, use al local URL when testing the app generation. All files in the project directory are served by sinatra.

rails dm_rails3_app -m http://localhost:4567/dm_rails_master.rb

The sinatra service simply replaces the github URLs with local ones, thus allowing to test the application template without constantly pushing fixes to github. This got annoying.

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 Martin Gamsjaeger (snusnu). See LICENSE for details.

About

A collection of rails3 application templates for datamapper.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%