Sha256: 2aee02127fd386aca56fb4131d5b6f8acf34fe1627ee695f18817aa59124d845

Contents?: true

Size: 1.16 KB

Versions: 7

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
    app/assets/images/rails.png
  }.each { |file| remove_file file }

  # add placeholder READMEs
  get "https://raw.github.com/RailsApps/rails3-application-templates/master/files/sample_readme.txt", "README"
  get "https://raw.github.com/RailsApps/rails3-application-templates/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

7 entries across 7 versions & 1 rubygems

Version Path
rails_apps_composer-1.1.6 recipes/cleanup.rb
rails_apps_composer-1.1.5 recipes/cleanup.rb
rails_apps_composer-1.1.4 recipes/cleanup.rb
rails_apps_composer-1.1.3 recipes/cleanup.rb
rails_apps_composer-1.1.2 recipes/cleanup.rb
rails_apps_composer-1.1.1 recipes/cleanup.rb
rails_apps_composer-1.1.0 recipes/cleanup.rb