Created
March 8, 2009 09:58
-
-
Save brainopia/75610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize git | |
git :init | |
git :submodule => "init" | |
# Link to local copy of edge rails | |
inside('vendor') { run 'ln -s ~/code/rails/rails rails' } | |
# Generate Simple controller | |
generate :controller, :simple | |
route "map.site '/:action/:id', :controller => 'simple'" | |
# Delete unnecessary files | |
run "rm README" | |
run "rm -fr doc" | |
run "rm -fr test" | |
run "rm public/index.html" | |
run "rm public/favicon.ico" | |
run "rm public/robots.txt" | |
run "rm public/images/rails.png" | |
run "rm -f public/javascripts/*" | |
# Download jQuery | |
run "curl -s -L http://jqueryjs.googlecode.com/files/jquery-1.3.2.js > public/javascripts/jquery.js" | |
# Copy database.yml for version control use | |
run "cp config/database.yml config/database.example.yml" | |
# Set up .gitignore files | |
run "touch tmp/.gitignore log/.gitignore" | |
file '.gitignore', <<-END | |
.DS_Store | |
log/*.log | |
log/*.pid | |
db/*.db | |
db/*.sqlite3 | |
db/schema.rb | |
config/database.yml | |
tmp/**/* | |
doc/ | |
test/ | |
END | |
# Install submoduled plugins | |
plugin 'resource_controller', :git => 'git://github.com/giraffesoft/resource_controller.git', :submodule => true | |
plugin 'smurf', :git => 'git://github.com/thumblemonks/smurf.git', :submodule => true | |
plugin 'rails-settings', :git => 'git://github.com/Squeegy/rails-settings.git', :submodule => true | |
generate :settings_migration | |
rake 'db:migrate' | |
file 'config/initializers/settings.rb' | |
# Install render engines | |
gem 'haml' | |
run 'haml --rails .' | |
gem 'chriseppstein-compass', :lib => 'compass' | |
run 'compass --rails -f blueprint --sass-dir app/stylesheets --css-dir public/stylesheets .' | |
# Set up a starting application layout | |
file 'app/views/layouts/application.html.haml', <<-END | |
!!! | |
%html{ html_attrs('ru') } | |
%head | |
%meta{ 'http-equiv' => 'content-type', :content => 'text/html', :charset => 'utf-8' } | |
= stylesheet_link_tag 'screen', :cache => 'base' | |
/[if IE] | |
= stylesheet_link_tag 'ie', :cache => 'ie' | |
%title | |
%body | |
.container | |
= yield | |
= javascript_include_tag 'jquery', :cache => 'base' | |
END | |
# Support for the Russian language | |
gem 'yaroslav-russian', :lib => 'russian' | |
# Prepare testing environment | |
if yes?("Do you want rspec?") | |
gem 'rspec-rails' | |
generate 'rspec' | |
gem 'thoughtbot-factory_girl' | |
gem 'faker' | |
end | |
# Initial git commit | |
git :add => '.' | |
git :commit => "-a -m 'Initial commit'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment