Skip to content

Instantly share code, notes, and snippets.

@bianster
Created November 22, 2009 03:46
Show Gist options
  • Select an option

  • Save bianster/240411 to your computer and use it in GitHub Desktop.

Select an option

Save bianster/240411 to your computer and use it in GitHub Desktop.
class String
def blank?
self.nil? || self == ''
end
end
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git'
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git'
plugin 'cucumber', :git => 'git://github.com/aslakhellesoy/cucumber.git'
plugin 'exception_notifier', :git => 'git://github.com/rails/exception_notification.git'
plugin 'factory_girl', :git => 'git://github.com/thoughtbot/factory_girl.git'
generate('rspec')
generate('cucumber')
rake('rails:freeze:gems')
file '.gitignore', <<-FILE
.DS_Store
FILE
run('rm public/index.html')
run('rm public/images/rails.png')
run('mv config/database.yml config/database.yml.example')
run('capify .')
%w(
app/models
app/views/layouts
db
lib/tasks
public/images
public/stylesheets
test/fixtures
test/functional
test/integration
test/unit
tmp/cache
tmp/pids
tmp/sessions
tmp/sockets).each do |dir|
run("touch #{File.join(dir, '.gitignore')}")
end
file 'log/.gitignore', <<-FILE
*.log
FILE
defaults = {
:name => 'Douglas Tan',
:email => 'douglas@connascence.com'
}
commit_name = (name = ask("Please provide the committer's name [#{defaults[:name]}]:")).blank? ? defaults[:name]: name
commit_email = (email = ask("Please provide the committer's email [#{defaults[:email]}]:")).blank? ? defaults[:email]: email
git :init
git :add => '.'
git :config => "user.name '#{commit_name}'"
git :config => "user.email #{commit_email}"
git :commit => '-a -m "Bootstrap Application"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment