Skip to content
Permalink
Browse files

generate config/spring.rb in new applications [closes #18874]

  • Loading branch information
fxn committed Feb 29, 2016
1 parent af2c427 commit b04d07337fd7bc17e88500e9d6bcd361885a45f8
@@ -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 @@ def config
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 @@
config/locales
config/cable.yml
config/puma.rb
config/spring.rb
db
lib
lib/tasks
@@ -681,6 +682,7 @@ def test_spring_no_fork
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

0 comments on commit b04d073

Please sign in to comment.