ariejan (owner)

Revisions

gist: 181167 Download_button fork
public
Description:
Rails 2.3.x template
Public Clone URL: git://gist.github.com/181167.git
Embed All Files: show embed
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# This Rails 2.3.x template will create a new git-based Rails project
# with Cucumber, RSpec and Remarkable pre-installed and ready to go.
#
# (C) 2009 under the MIT License by Ariejan de Vroom <ariejan@ariejan.net>
#
# USAGE:
# rails -d mysql -m http://gist.github.com/181167.txt APP_NAME
 
 
# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
run "rm public/robots.txt"
run "rm -f public/javascripts/*"
 
# Set up git repository
git :init
 
# Copy database.yml for distribution use
run "cp config/database.yml config/database.yml.example"
  
# Create the database, if necessary
run "rake db:create:all"
 
# Set up .gitignore files
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"
run %{find . -type d -empty | grep -v "vendor" | grep -v ".git" | grep -v "tmp" | xargs -I xxx touch xxx/.gitignore}
file '.gitignore', <<-END
.DS_Store
log/*.log
tmp/**/*
tmp/restart.txt
config/database.yml
db/*.sqlite3
END
 
# Install gems
gem 'settingslogic'
gem 'factory_girl', :lib => false, :source => 'http://gemcutter.org'
gem 'remarkable_rails', :lib => false
gem 'remarkable_activerecord', :lib => false
gem 'cucumber', :lib => false
gem 'rspec', :lib => false
gem 'rspec-rails', :lib => false
gem 'haml'
 
# Plugins
plugin 'bootstrapper', :git => 'git://github.com/sevenwire/bootstrapper.git'
 
# Install any missing gems.
rake "gems:install", :sudo => true
 
# Set up sessions, RSpec and Cucumber
generate "rspec"
generate "cucumber"
 
# Setup HAML
run "haml --rails ."
 
# Commit all work so far to the repository
git :add => '.'
git :commit => "-a -m 'Generated new rails project from http://gist.github.com/gists/181167'"
 
# Success!