Skip to content

Instantly share code, notes, and snippets.

@slawosz
Created May 19, 2010 09:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slawosz/406155 to your computer and use it in GitHub Desktop.
Save slawosz/406155 to your computer and use it in GitHub Desktop.
#This file is for drying end easy maintain template for creating rails application with devise, mongoid and #haml
#Gemfile
apply "http://gist.github.com/raw/406147/edge-template-Gemfile.rb"
# Bundle
run 'bundle install --relock'
# Initialize testing suite
run 'script/rails g rspec:install'
run 'script/rails g cucumber:skeleton --rspec --capybara'
run 'script/rails g mongoid:config'
#change layout to haml
#apply "http://gist.github.com/raw/406165/haml-html5-layout.rb"
#you can also use a bit more usefull layout, with user navigation for devise and css:
apply "http://gist.github.com/raw/406168/haml-html5-layout-with-css.rb"
#generators config
config = <<-CONFIG
config.generators do |g|
g.orm :mongoid
g.template_engine :haml
g.test_framework :rspec, :fixture => false
end
CONFIG
inject_into_file 'config/application.rb', "#{config}", :after => "# end\n", :verbose => true
#devise config
apply "http://gist.github.com/raw/406351/devise-with-mongo-id.rb"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment