recipes/cleanup.rb in rails_apps_composer-1.0.5 vs recipes/cleanup.rb in rails_apps_composer-1.0.6
- old
+ new
@@ -8,15 +8,24 @@
# remove unnecessary files
%w{
README
doc/README_FOR_APP
public/index.html
- public/images/rails.png
}.each { |file| remove_file file }
-
+
+ if recipes.include? 'rails 3.0'
+ %w{
+ public/images/rails.png
+ }.each { |file| remove_file file }
+ else
+ %w{
+ app/assets/images/rails.png
+ }.each { |file| remove_file file }
+ end
+
# 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"
+ 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