require File.dirname(__FILE__) + '/../../slices/version' # Remove files remove_file "README.rdoc" remove_file "public/index.html" remove_file "public/404.html" remove_file "public/422.html" remove_file "public/500.html" remove_file "public/favicon.ico" remove_dir "doc" create_file "public/favicon.ico" file "README.md", <<-END # #{app_const_base} Built with [Slices](http://slices.withassociates.com). Need help? See the [Slices wiki](https://github.com/withassociates/slices/wiki). END # Set up .gitignore files remove_file ".gitignore" file ".gitignore", <<-END .DS_Store *.swp .bundle .sass-cache coverage db/*.sqlite3 db/*development* db/*production* db/*test* db/mongod.lock log/*.log public/assets public/cache public/system tmp END # mongoid.yml file "config/mongoid.yml", <<-END development: host: localhost database: #{app_name}_development test: host: localhost database: #{app_name}_test production: host: localhost database: #{app_name}_development END initializer "slices.rb", <<-END # Slices::Config.add_asset_styles( # slice_full_width: '945x496>', # avatar: '30x30#', # ) # Configure the Google Apps domain to use for quick auth. # Press the '=' key on the admin sign-in screen to authenticate via # a Google Apps account within the domain configured here. # Slices::Config.google_apps_domain = 'example.com' ActionView::Base.send(:include, AssetsHelper) END # Gemfile run "rm Gemfile" file "Gemfile", <<-END source 'https://rubygems.org' gem 'slices', git: 'git@github.com:withassociates/slices.git', tag: 'v#{Slices::VERSION}' group :assets do gem 'sass-rails' gem 'therubyracer' gem 'uglifier' end group :development do gem 'capistrano', require: false gem 'foreman', require: false gem 'unicorn', require: false end group :test do gem 'capybara' gem 'database_cleaner' gem 'launchy' gem 'rspec-rails' end END # Generate example slices generate("slice text text:text") generate("slice images images:attachments") # Default layout remove_file "app/views/layouts/application.html.erb" file "app/views/layouts/default.html.erb", <<-END
<%= render "shared/head" %>