aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-02-10 00:22:42 +0100
committerXavier Noria <fxn@hashref.com>2016-02-10 00:45:19 +0100
commit00a5eb6aeb1277472da5fe9e7dd02d003c766b13 (patch)
tree444bccc9ddceb070661a24775dcf60930f98d6e1 /railties
parentde6ad5665d2679944a9ee9407826ba88395a1003 (diff)
downloadrails-00a5eb6aeb1277472da5fe9e7dd02d003c766b13.tar.gz
rails-00a5eb6aeb1277472da5fe9e7dd02d003c766b13.tar.bz2
rails-00a5eb6aeb1277472da5fe9e7dd02d003c766b13.zip
include spring-watcher-listen in the Gemfile of new applications
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG.md5
-rw-r--r--railties/lib/rails/generators/rails/app/templates/Gemfile3
-rw-r--r--railties/test/generators/app_generator_test.rb1
3 files changed, 9 insertions, 0 deletions
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index 65fedbd659..2506baac16 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,3 +1,8 @@
+* The Gemfiles of new applications include spring-watcher-listen on Linux and
+ Mac OS X (unless --skip-spring).
+
+ *Xavier Noria*
+
* New applications are generated with the evented file system monitor enabled
on Linux and Mac OS X.
diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile
index c816c9e7e0..c3fad31f23 100644
--- a/railties/lib/rails/generators/rails/app/templates/Gemfile
+++ b/railties/lib/rails/generators/rails/app/templates/Gemfile
@@ -44,6 +44,9 @@ group :development do
<% if spring_install? -%>
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
+<% if os_supports_listen_out_of_the_box? -%>
+ gem 'spring-watcher-listen', '~> 2.0.0'
+<% end -%>
<% end -%>
end
<% end -%>
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index f4d0b15546..be05e779ea 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -483,6 +483,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
run_generator
if RbConfig::CONFIG['host_os'] =~ /darwin|linux/
assert_gem 'listen'
+ assert_gem 'spring-watcher-listen'
else
assert_file 'Gemfile' do |content|
assert_no_match(/listen/, content)