require 'rails/generators' module Bookends module Generators class InstallGenerator < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) desc "Generates footer's shared html/css" def copy_footer FileUtils.mkdir_p 'app/assets/stylesheets/bookends' FileUtils.mkdir_p 'app/views/bookends' copy_file 'footer.html.erb', 'app/views/bookends/_footer.html.erb' copy_file 'footer.scss', 'app/assets/stylesheets/bookends/_footer.scss' copy_file 'newsletter.js', 'app/assets/javascripts/bookends/newsletter.js' directory 'footer_images' , 'app/assets/images/bookends/footer/' end end end end