aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/rails
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-02-29 23:34:00 +0100
committerXavier Noria <fxn@hashref.com>2016-02-29 23:36:35 +0100
commitb04d07337fd7bc17e88500e9d6bcd361885a45f8 (patch)
tree8ebe08658e4c548286ae49f003e3b9fb42f61cf0 /railties/lib/rails/generators/rails
parentaf2c427c390b87ea20986f1e82b498068800d775 (diff)
downloadrails-b04d07337fd7bc17e88500e9d6bcd361885a45f8.tar.gz
rails-b04d07337fd7bc17e88500e9d6bcd361885a45f8.tar.bz2
rails-b04d07337fd7bc17e88500e9d6bcd361885a45f8.zip
generate config/spring.rb in new applications [closes #18874]
Diffstat (limited to 'railties/lib/rails/generators/rails')
-rw-r--r--railties/lib/rails/generators/rails/app/app_generator.rb1
-rw-r--r--railties/lib/rails/generators/rails/app/templates/config/spring.rb6
2 files changed, 7 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb
index 7bab3fdf74..562193bc3a 100644
--- a/railties/lib/rails/generators/rails/app/app_generator.rb
+++ b/railties/lib/rails/generators/rails/app/app_generator.rb
@@ -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"
diff --git a/railties/lib/rails/generators/rails/app/templates/config/spring.rb b/railties/lib/rails/generators/rails/app/templates/config/spring.rb
new file mode 100644
index 0000000000..c9119b40c0
--- /dev/null
+++ b/railties/lib/rails/generators/rails/app/templates/config/spring.rb
@@ -0,0 +1,6 @@
+%w(
+ .ruby-version
+ .rbenv-vars
+ tmp/restart.txt
+ tmp/caching-dev.txt
+).each { |path| Spring.watch(path) }