remove_file 'public/index.html' end def create_partials_directory empty_directory 'app/views/application' empty_directory 'app/views/pages' empty_directory 'app/views/common' end def use_mysql_config_template template 'mysql_database.yml.erb', 'config/database.yml',:force => true template 'mysql_database.yml.erb', 'config/database.yml.example', :force => true # ..... end def add_custom_gems additions_path = find_in_source_paths 'Gemfile_additions' new_gems = File.open(additions_path).read inject_into_file 'Gemfile', "\n#{new_gems}", :after => /gem 'jquery-rails'/ end def setup_stylesheets copy_file 'app/assets/stylesheets/application.css', 'app/assets/stylesheets/application.css.scss' remove_file 'app/assets/stylesheets/application.css' concat_file 'import_scss_styles', 'app/assets/stylesheets/application.css.scss' end end end Thor 12年12月7⽇日星期五