public
Description: Boilerplate Rails Script for restful-authentication, jQuery/jRails, and shoulda
Homepage:
Clone URL: git://github.com/npverni/rails-boilerplate-script.git
rails-boilerplate-script / rails-boilerplate.sh
100644 54 lines (38 sloc) 1.461 kb
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
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
# Rails Boilerplate Script
# author: nathan verni
# instructions: drop into the root of a new rails project and run 'sh rails-boilerplate.sh;rm rails boilerplate.sh'
 
 
 
 
 
 
#restful-authentication
./script/plugin install git://github.com/technoweenie/restful-authentication.git
./script/generate authenticated user sessions
 
#jRails
./script/plugin install git://github.com/aaronchi/jrails.git
 
#install shoulda, thanks thoughtbot
script/plugin install git://github.com/thoughtbot/shoulda.git
 
 
#uncomment for rspecrspec
#cd vendor/plugins
#git clone git://github.com/dchelimsky/rspec.git
#git clone git://github.com/dchelimsky/rspec-rails.git
#cd rspec
#git checkout 1.1.4
#cd ../rspec-rails
#git checkout 1.1.4
#cd ..
#rm -rf rspec/.git
#rm -rf rspec-rails/.git
#cd ../../
 
#create the databases
rake db:create:all
rake db:migrate
 
#remove the index.html, create a default home controller, create placeholder application.html.erb layout and stylesheets
mv public/index.html public/info.html
script/generate controller welcome index
touch app/views/layouts/application.html.erb
touch public/stylesheets/screen.css
touch public/stylesheets/reset.css
echo "<%= yield %>" > app/views/layouts/application.html.erb
 
#uncomment the default route
sed -e 's/#\( map.root :controller => \"welcome\".*\)/\1/' config/routes.rb > config/routes.new;
mv config/routes.rb config/routes.old;
mv config/routes.new config/routes.rb;
rm config/routes.old;