-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtemplate.rb
42 lines (32 loc) · 955 Bytes
/
template.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
require 'active_support/core_ext/array/wrap' # Otherwise #environment cries
RECIPE_FILE_PATH = File.join( File.dirname( rails_template ), "recipes" )
RECIPE_HTTP_PATH = "http://github.com/sriedel/rails_app_templates/raw/master/recipes"
RECIPES_TO_APPLY = %w{ rspec cucumber jquery devise bullet capistrano }
# Use recipes on the local filesystem
recipe_path = RECIPE_FILE_PATH
# If you want to get the recipes via HTTP, use this instead of the above:
# recipe_path = RECIPE_HTTP_PATH
#
# Initialize Git Repository
#
git :init
git :add => "."
git :commit => "-m 'initial bare rails project tree'"
RECIPES_TO_APPLY.each do |recipe|
apply File.join( recipe_path, "#{recipe}.rb" )
end
#
# Git GC
#
say "Garbage collecting git repository"
git :gc
#
# Last instructions
#
say <<-EOF
Things left for you to do:
* rails generate devise <Model for Login Data>
* rake db:migrate
* Add 'devise_for :model' to config/routes.rb
* Code stuff
EOF