mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
generate config/spring.rb in new applications [closes #18874]
This commit is contained in:
parent
af2c427c39
commit
b04d07337f
4 changed files with 14 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
* The application generator writes a new file `config/spring.rb`, which tells
|
||||
Spring to watch additional common files.
|
||||
|
||||
*Xavier Noria*
|
||||
|
||||
* The tasks in the rails task namespace is deprecated in favor of app namespace.
|
||||
(e.g. `rails:update` and `rails:template` tasks is renamed to `app:update` and `app:template`.)
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ module Rails
|
|||
template "secrets.yml"
|
||||
template "cable.yml" unless options[:skip_action_cable]
|
||||
template "puma.rb" unless options[:skip_puma]
|
||||
template "spring.rb" if spring_install?
|
||||
|
||||
directory "environments"
|
||||
directory "initializers"
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
%w(
|
||||
.ruby-version
|
||||
.rbenv-vars
|
||||
tmp/restart.txt
|
||||
tmp/caching-dev.txt
|
||||
).each { |path| Spring.watch(path) }
|
|
@ -28,6 +28,7 @@ DEFAULT_APP_FILES = %w(
|
|||
config/locales
|
||||
config/cable.yml
|
||||
config/puma.rb
|
||||
config/spring.rb
|
||||
db
|
||||
lib
|
||||
lib/tasks
|
||||
|
@ -681,6 +682,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
|
|||
def test_skip_spring
|
||||
run_generator [destination_root, "--skip-spring"]
|
||||
|
||||
assert_no_file 'config/spring.rb'
|
||||
assert_file "Gemfile" do |content|
|
||||
assert_no_match(/spring/, content)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue