Sha256: bb7ba526ad9aa0cf172005fdd385253d5616b5c6b93f61bba0fb22250e736680

Contents?: true

Size: 1.16 KB

Versions: 3

Compression:

Stored size: 1.16 KB

Contents

# Application template recipe for the rails_apps_composer. Check for a newer version here:
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/cleanup.rb

after_bundler do

  say_wizard "Cleanup recipe running 'after bundler'"

  # remove unnecessary files
  %w{
    README
    doc/README_FOR_APP
    public/index.html
    public/images/rails.png
  }.each { |file| remove_file file }

  # add placeholder READMEs
  get "https://github.com/RailsApps/rails3-application-templates/raw/master/files/sample_readme.txt", "README"
  get "https://github.com/RailsApps/rails3-application-templates/raw/master/files/sample_readme.textile", "README.textile"
  gsub_file "README", /App_Name/, "#{app_name.humanize.titleize}"
  gsub_file "README.textile", /App_Name/, "#{app_name.humanize.titleize}"

  # remove commented lines from Gemfile
  # thanks to https://github.com/perfectline/template-bucket/blob/master/cleanup.rb
  gsub_file "Gemfile", /#.*\n/, "\n"
  gsub_file "Gemfile", /\n+/, "\n"

end

__END__

name: Cleanup
description: "Remove unnecessary files left over from generating a new Rails app."
author: RailsApps

category: other
tags: [utilities, configuration]

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails_apps_composer-1.0.5 recipes/cleanup.rb
rails_apps_composer-1.0.4 recipes/cleanup.rb
rails_apps_composer-1.0.3 recipes/cleanup.rb