Skip to content

Instantly share code, notes, and snippets.

@superp
Created December 27, 2011 13:52
Show Gist options
  • Save superp/1523718 to your computer and use it in GitHub Desktop.
Save superp/1523718 to your computer and use it in GitHub Desktop.
Sunrise CRM scaffold template
gem("mysql2")
gem("devise")
gem("sunrise-cms", :path => '/var/www/plugins/cms/sunrise')
gem("therubyracer", :group => 'development')
gem("mongrel", :version => "1.2.0.pre2", :group => 'development')
# run default generators
generate("devise:install")
generate("acts_as_audited:install")
generate("sunrise:install")
rake("sunrise:install:migrations")
copy_file File.join(destination_root, "config/database.yml.sample"), "config/database.yml"
copy_file File.join(destination_root, "config/application.yml.sample"), "config/application.yml"
# init git
if yes?("Init empty git?")
get "https://gist.github.com/1523312.txt", ".gitignore"
git(:init)
git(:add => ".")
git(:commit => "-am 'inital commit'")
end
# create && migrate database
if yes?("Run db tasks (create && migrate)?")
rake("db:create")
rake("db:migrate")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment