Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save girishso/464225 to your computer and use it in GitHub Desktop.
Save girishso/464225 to your computer and use it in GitHub Desktop.
###### Usage #######
#
#
# rails blog -m http://gist.github.com/raw_path
#
#
###################
############## generate commands #################
generate("rspec")
generate('cucumber', '--rspec --capybara --spork')
############## commands #################
run "curl -L http://code.jquery.com/jquery-1.4.2.min.js > public/javascripts/jquery.js"
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/**/*
config/database.yml
db/*.sqlite3
END
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
run "rm public/robots.txt"
run "rm public/javascripts/controls.js public/javascripts/dragdrop.js public/javascripts/effects.js public/javascripts/prototype.js"
# Set up git repository
git :init
git :add => '.'
git :commit => "-a -m 'Initial commit'"
# Success!
puts "SUCCESS!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment