Skip to content

Commit

Permalink
Update and improve bort, reorganize README a little, and add daring t…
Browse files Browse the repository at this point in the history
…emplate from Peter Cooper
  • Loading branch information
jm committed Dec 23, 2008
1 parent 3b8c177 commit 616e5d9
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 9 deletions.
4 changes: 3 additions & 1 deletion README.markdown
Expand Up @@ -6,4 +6,6 @@ A library of Rails application templates from the community.
Current library
---------------

* bort, entp by Jeremy McAnally
* entp by Jeremy McAnally
* bort by Jeremy McAnally, improved by Pratik Naik (based on bort template by Jim Neath)
* daring by Peter Cooper
34 changes: 26 additions & 8 deletions bort.template
@@ -1,14 +1,32 @@
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git'
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git'
plugin 'exception_notifier', :git => 'git://github.com/rails/exception_notification.git'
plugin 'open_id_authentication', :git => 'git://github.com/rails/open_id_authentication.git'
plugin 'asset_packager', :git => 'http://synthesis.sbecker.net/pages/asset_packager'
plugin 'role_requirement', :git => 'git://github.com/timcharper/role_requirement.git'
plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git'
# bort.rb
# from Jeremy McAnally, Pratik Naik
# based on bort by Jim Neath

gem 'mislav-will-paginate'
inside('vendor') do
run "ln -s ~/commit-rails/rails rails"
end

plugin 'rspec',
:git => 'git://github.com/dchelimsky/rspec.git'
plugin 'rspec-rails',
:git => 'git://github.com/dchelimsky/rspec-rails.git'
plugin 'exception_notifier',
:git => 'git://github.com/rails/exception_notification.git'
plugin 'open_id_authentication',
:git => 'git://github.com/rails/open_id_authentication.git'
plugin 'asset_packager',
:git => 'http://synthesis.sbecker.net/pages/asset_packager'
plugin 'role_requirement',
:git => 'git://github.com/timcharper/role_requirement.git'
plugin 'restful-authentication',
:git => 'git://github.com/technoweenie/restful-authentication.git'

gem 'mislav-will_paginate', :version => '~> 2.2.3',
:lib => 'will_paginate', :source => 'http://gems.github.com'
gem 'rubyist-aasm'
gem 'ruby-openid'

rake("gems:install", :sudo => true)

generate("authenticated", "user session")
generate("rspec")
77 changes: 77 additions & 0 deletions daring.template
@@ -0,0 +1,77 @@
# SUPER DARING APP TEMPLATE 1.0
# from Peter Cooper

# Link to local copy of edge rails
inside('vendor') { run 'ln -s ~/dev/rails/rails rails' }

# Delete unnecessary files
run "rm README"
run "rm public/index.html"
run "rm public/favicon.ico"
run "rm public/robots.txt"
run "rm -f public/javascripts/*"

# Download JQuery
run "curl -L http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js > public/javascripts/jquery.js"
run "curl -L http://jqueryjs.googlecode.com/svn/trunk/plugins/form/jquery.form.js > public/javascripts/jquery.form.js"

# Set up git repository
git :init
git :add => '.'

# Copy database.yml for distribution use
run "cp config/database.yml config/database.yml.example"

# Set up .gitignore files
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

# Install submoduled plugins
plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git', :submodule => true
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git', :submodule => true
plugin 'asset_packager', :git => 'git://github.com/sbecker/asset_packager.git', :submodule => true
plugin 'open_id_authentication', :git => 'git://github.com/rails/open_id_authentication.git', :submodule => true
plugin 'role_requirement', :git => 'git://github.com/timcharper/role_requirement.git', :submodule => true
plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git', :submodule => true
plugin 'acts_as_taggable_redux', :git => 'git://github.com/monki/acts_as_taggable_redux.git', :submodule => true
plugin 'aasm', :git => 'git://github.com/rubyist/aasm.git', :submodule => true

# Install all gems
gem 'thoughtbot-factory_girl', :lib => 'factory_girl', :source => 'http://gems.github.com'
gem 'ruby-openid', :lib => 'openid'
gem 'sqlite3-ruby', :lib => 'sqlite3'
gem 'hpricot', :source => 'http://code.whytheluckystiff.net'
gem 'RedCloth', :lib => 'redcloth'
rake('gems:install', :sudo => true)

# Set up sessions, RSpec, user model, OpenID, etc, and run migrations
rake('db:sessions:create')
generate("authenticated", "user session")
generate("roles", "Role User")
generate("rspec")
rake('acts_as_taggable:db:create')
rake('open_id_authentication:db:create')
rake('db:migrate')

# Set up session store initializer
initializer 'session_store.rb', <<-END
ActionController::Base.session = { :session_key => '_#{(1..6).map { |x| (65 + rand(26)).chr }.join}_session', :secret => '#{(1..40).map { |x| (65 + rand(26)).chr }.join}' }
ActionController::Base.session_store = :active_record_store
END

# Initialize submodules
git :submodule => "init"

# Commit all work so far to the repository
git :add => '.'
git :commit => "-a -m 'Initial commit'"

# Success!
puts "SUCCESS!"
3 changes: 3 additions & 0 deletions entp.template
@@ -1,3 +1,6 @@
# entp.rb
# from Jeremy McAnally

plugin 'rspec', :git => 'git://github.com/dchelimsky/rspec.git'
plugin 'rspec-rails', :git => 'git://github.com/dchelimsky/rspec-rails.git'
plugin 'restful-authentication', :git => 'git://github.com/technoweenie/restful-authentication.git'
Expand Down

0 comments on commit 616e5d9

Please sign in to comment.