Created
March 17, 2010 21:58
-
-
Save kreas/335771 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Default set of awesome for my rails projects. | |
gem 'RedCloth', :lib => 'redcloth' | |
gem 'haml' | |
gem 'mislav-will_paginate', :lib => 'will_paginate', :source => 'http://gems.github.com' | |
plugin 'ssl_requirement', :git => 'git://github.com/rails/ssl_requirement.git' | |
plugin 'hoptoad_notifier', :git => "git://github.com/thoughtbot/hoptoad_notifier.git" | |
initializer 'hoptoad.rb', <<-FILE | |
HoptoadNotifier.configure do |config| | |
config.api_key = 'HOPTOAD-KEY' | |
end | |
FILE | |
plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git' | |
plugin 'paperclip', :git => 'git://github.com/thoughtbot/paperclip.git' | |
plugin 'role_requirement', :git => 'git://github.com/timcharper/role_requirement.git' | |
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git' | |
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git' | |
# Install gems on local system | |
rake('gems:install', :sudo => true) if yes?('Install gems on local system? (y/n)') | |
# Generate roles for User | |
generate("roles", "Role User") | |
# Generate restful-authentication user and session | |
generate("authenticated", "user session") | |
# Run rspec generator | |
generate("rspec") | |
# Copy database.yml | |
run 'cp config/database.yml config/database.yml.example' | |
# Remove unnecessary Rails files | |
run 'rm README' | |
run 'rm public/index.html' | |
run 'rm public/favicon.ico' | |
run 'rm public/images/rails.png' | |
# Create .gitignore file | |
file '.gitignore', <<-FILE | |
.DS_Store | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
db/*.sqlite3 | |
FILE | |
file 'vendor/plugins/haml/init.rb', <<-FILE | |
begin | |
require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here | |
rescue LoadError | |
begin | |
require 'haml' # From gem | |
rescue LoadError => e | |
# gems:install may be run to install Haml with the skeleton plugin | |
# but not the gem itself installed. | |
# Don't die if this is the case. | |
raise e unless defined?(Rake) && Rake.application.top_level_tasks.include?('gems:install') | |
end | |
end | |
# Load Haml and Sass. | |
# Haml may be undefined if we're running gems:install. | |
Haml.init_rails(binding) if defined?(Haml) | |
FILE | |
# Set up git repository | |
git :init | |
git :add => '.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment