lib/generators/katapult/basics/basics_generator.rb in katapult-0.1.0 vs lib/generators/katapult/basics/basics_generator.rb in katapult-0.1.1

- old
+ new

@@ -8,10 +8,14 @@ desc 'Generate basics like test directories and gems' source_root File.expand_path('../templates', __FILE__) + def write_ruby_version + template '.ruby-version' + end + def write_database_ymls template 'config/database.yml', force: true template 'config/database.sample.yml' end @@ -26,10 +30,16 @@ template 'Gemfile', force: true end def bundle_install bundle 'install' + + # There is a bug in the current version of Compass, so we use an older + # one in our Gemfile template. Since its dependencies "sprockets" and + # "sass-rails" are already in the Gemfile.lock (from installing Rails), + # we need to explicitly update them. + bundle 'update sprockets sass-rails' end def remove_turbolinks_js gsub_file 'app/assets/javascripts/application.js', "//= require turbolinks\n", '' end @@ -75,9 +85,17 @@ # def install_capistrano # capify! # template 'config/deploy.rb' # end + + def print_instructions + puts <<-INSTRUCTIONS.strip_heredoc + + Next step: Model your application in lib/katapult/application_model.rb and + trigger the code generation by running `katapult fire`. + INSTRUCTIONS + end private def app_name File.basename(Dir.pwd)