Created
October 14, 2009 02:22
-
-
Save TMorgan99/209727 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
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
## This is the template to generate HOBO app | |
# you can change the name of this model | |
user_model = "user" | |
# ================ | |
log '== PATCH ' | |
# ================ | |
FileUtils.rm 'public/index.html' rescue nil | |
FileUtils.touch 'public/stylesheets/application.css' | |
gsub_file 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1' | |
# ================ | |
log '== GEM ' | |
# ================ | |
gem :hobo | |
rake 'gems:install', :env => 'test' | |
rake 'gems:install gems:unpack' | |
# ================ | |
log '== PLUGIN ' | |
# ================ | |
# List any plugins you need here. | |
# ================ | |
log '== GENERATE ' | |
# ================ | |
# generate :session_migration | |
# Replicate the sequence of the hobo command ... | |
generate :hobo, '--add-gem --add-routes' | |
generate :hobo_rapid, '--import-tags' | |
generate :hobo_front_controller, 'front --delete-index --add-routes' | |
generate :hobo_user_model, user_model | |
generate :hobo_user_controller, user_model | |
# ================ | |
log '== RESOURCES' | |
# ================ | |
## These next sections from the Agility project... | |
# generate :hobo_model_resource, 'project name:string' | |
# et.c | |
# ================ | |
log '== ASSOCIATE ' | |
# ================ | |
# fields_block=/(^\s*fields do$.*?^\s*end$)/m | |
# | |
# gsub_file 'app/models/project.rb', fields_block, '\1 | |
# | |
# has_many :stories, :dependent => :destroy' | |
# ================ | |
log '== MIGRATE ' | |
# ================ | |
rake 'db:migrate' | |
run 'yes "" |generate hobo_migration --generate' | |
rake 'db:migrate db:test:prepare' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment