drd (owner)

Revisions

gist: 76551 Download_button fork
public
Public Clone URL: git://gist.github.com/76551.git
Embed All Files: show embed
shoulda + haml #
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
#Install gems
gem 'mocha'
gem 'thoughtbot-shoulda'
gem 'thoughtbot-factory_girl'
gem 'technicalpickles-shoulda_generator'
gem 'mislav-will_paginate', :version => '~> 2.2.3', :lib => 'will_paginate', :source => 'http://gems.github.com'
gem 'haml'
 
#install plugins
 
file 'vendor/plugins/haml/init.rb', <<-END
require 'rubygems'
begin
require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here
rescue LoadError
require 'haml' # From gem
end
 
# Load Haml and Sass
Haml.init_rails(binding)
END
 
#Configure Application Controller
gsub_file 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1'
 
#Delete all unecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
run "rm public/robots.txt"
 
#Setup git ignore file
file '.gitignore', <<-END
config/database.yml
db/schema.rb
log/*.log
public/stylesheets/*.css
tmp/
END
run 'touch tmp/.gitignore log/.gitignore'
 
#add to git
git :init
git :add => '.'
git :commit => "-a -m 'Initial commit'"