lib/bearonrails/app_builder.rb in bearonrails-0.1.1 vs lib/bearonrails/app_builder.rb in bearonrails-0.2.0

- old
+ new

@@ -22,10 +22,30 @@ def add_rubocop_config copy_file '.rubocop.yml', '.rubocop.yml' end + def add_new_relic_config + copy_file 'config/newrelic.yml', 'config/newrelic.yml' + + replace_in_file( + '.env', + /change-this-to-your-app-name/m, + "#{app_name}" + ) + end + + def add_dot_env + copy_file '.env', '.env' + + inject_into_file( + 'config/application.rb', + "Dotenv.load\n\n", + before: /^module/ + ) + end + def install_rspec run 'bundle exec rails g rspec:install' end def add_rspec_helper_addon @@ -42,17 +62,9 @@ replace_in_file( 'config/routes.rb', /Rails\.application\.routes\.draw do.*end/m, "Rails.application.routes.draw do\nend" ) - end - - def add_pryrc - copy_file '.pryrc', '.pryrc' - end - - def add_pry_config - copy_file 'config/initializers/pry.rb', 'config/initializers/pry.rb' end private def replace_in_file(relative_path, find, replace)