recipes/cleanup.rb in rails_apps_composer-1.1.6 vs recipes/cleanup.rb in rails_apps_composer-1.1.7
- old
+ new
@@ -17,14 +17,18 @@
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
+ # remove commented lines and multiple blank 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"
+ gsub_file 'Gemfile', /#.*\n/, "\n"
+ gsub_file 'Gemfile', /\n^\s*\n/, "\n"
+ # remove commented lines and multiple blank lines from config/routes.rb
+ gsub_file 'config/routes.rb', / #.*\n/, "\n"
+ gsub_file 'config/routes.rb', /\n^\s*\n/, "\n"
+
end
__END__
name: Cleanup