karmi (owner)

Forks

Revisions

gist: 175510 Download_button fork
public
Description:
Minimal Rails app template (Git setup, Gems)
Public Clone URL: git://gist.github.com/175510.git
Embed All Files: show embed
minimal_rails_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
# Delete/Move Rails default files
log 'moving', 'Rails default files'
run "mv README doc/README_FOR_RAILS"
run "rm public/index.html"
 
# Copy database.yml
log "copying", "database.yml"
run "cp config/database.yml config/database.example.yml"
 
# Set up .gitignore files
log 'creating', '.gitignore files'
run "touch tmp/.gitignore log/.gitignore vendor/.gitignore"
file '.gitignore', <<-END
.DS_Store
*/.DS_Store
log/*
!log/.gitignore
tmp/**/*
!tmp/.gitignore
config/database.yml
db/*.sqlite3
doc/**/*
public/system/**/*
END
 
# Set up git repository
log 'initializing', 'Git repository'
git :init
git :add => '.'
git :commit => "-a -m 'Initial commit -- Blank Rails application'"
 
# Install Rubygems
log 'configure', 'rubygems'
gem 'sqlite3-ruby', :lib => 'sqlite3'
gem 'thoughtbot-factory_girl', :lib => 'factory_girl', :source => 'http://gems.github.com'
gem 'thoughtbot-shoulda', :lib => 'shoulda', :source => 'http://gems.github.com'
 
git :add => '.'
git :commit => "-m 'Added gems configuration'"
 
# Create bootstrap Rake tasks
log 'creating', 'bootstrap Rake tasks'
rakefile "bootstrap.rake", <<CODE
namespace :app do
task :bootstrap do
end
task :install do
end
end
CODE
 
git :add => '.'
git :commit => "-m 'Created bootstrap tasks'"
 
log ' *** ALL DONE ***'