Created
January 7, 2011 18:54
-
-
Save krutten/769913 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
gem "capybara", ">= 0.3.8", :group => [:test, :cucumber] | |
gem "cucumber-rails", ">= 0.3.2", :group => [:test, :cucumber] | |
gem "database_cleaner", ">= 0.5.2", :group => [:test, :cucumber] | |
gem "haml-rails", ">= 0.0.2" | |
gem "launchy", ">= 0.3.5", :group => [:test, :cucumber] | |
gem "rspec-rails", ">= 2.0.0.beta.20", :group => [:test, :cucumber] | |
gem "spork", ">= 0.8.4", :group => [:test, :cucumber] | |
gem "devise" | |
gem "hpricot" | |
gem "ruby_parser" | |
generators = <<-GENERATORS | |
config.generators do |g| | |
g.template_engine :haml | |
g.test_framework :rspec, :fixture => true | |
g.intergration_tool :rspec | |
end | |
GENERATORS | |
application generators | |
get "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js", "public/javascripts/jquery.js" | |
get "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js", "public/javascripts/jquery-ui.js" | |
get "http://github.com/rails/jquery-ujs/raw/master/src/rails.js", "public/javascripts/rails.js" | |
gsub_file 'config/application.rb', 'config.action_view.javascript_expansions[:defaults] = %w()', 'config.action_view.javascript_expansions[:defaults] = %w(jquery.js jquery-ui.js rails.js)' | |
layout = <<-LAYOUT | |
!!! | |
%html | |
%head | |
%title #{app_name.humanize} | |
= stylesheet_link_tag :all | |
= javascript_include_tag :defaults | |
= csrf_meta_tag | |
%body | |
= yield | |
LAYOUT | |
remove_file "app/views/layouts/application.html.erb" | |
create_file "app/views/layouts/application.html.haml", layout | |
create_file "log/.gitkeep" | |
create_file "tmp/.gitkeep" | |
file '.gitignore', <<-FILE | |
.DS_Store | |
.bundle/* | |
log/*.log | |
tmp/**/* | |
config/database.yml | |
db/*.sqlite3 | |
public/uploads/* | |
gems/* | |
!gems/cache | |
!gems/bundler | |
FILE | |
run "cp config/database.yml config/database.yml.example" | |
remove_file "README" | |
remove_file "public/index.html" | |
remove_file "public/images/rails.png" | |
run 'rails generate rspec:install' | |
run 'rails generate cucumber:install --capybara --rspec' | |
run 'rails generate devise:install' | |
run 'rails generate devise:views' | |
gsub_file 'config/environments/development.rb', /# Don't care if the mailer can't send/, '### ActionMailer Config' | |
gsub_file 'config/environments/development.rb', /config.action_mailer.raise_delivery_errors = false/ do | |
<<-RUBY | |
config.action_mailer.default_url_options = { :host => 'localhost:3000' } | |
# A dummy setup for development - no deliveries, but logged | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.perform_deliveries = false | |
config.action_mailer.raise_delivery_errors = true | |
config.action_mailer.default :charset => "utf-8" | |
RUBY | |
end | |
gsub_file 'config/environments/production.rb', /config.i18n.fallbacks = true/ do | |
<<-RUBY | |
config.i18n.fallbacks = true | |
config.action_mailer.default_url_options = { :host => 'yourhost.com' } | |
### ActionMailer Config | |
# Setup for production - deliveries, no errors raised | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.perform_deliveries = true | |
config.action_mailer.raise_delivery_errors = false | |
config.action_mailer.default :charset => "utf-8" | |
RUBY | |
end | |
run 'rails generate devise Admin' | |
run 'rails generate devise Usuario' | |
git :init | |
git :submodule => "init" | |
git :add => "." | |
git :commit => "-m 'Commit inicial'" | |
docs = <<-DOCS | |
Run the following commands to complete the setup of #{app_name.humanize}: | |
% cd #{app_name} | |
% bundle install | |
DOCS | |
log docs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment