From 00a5eb6aeb1277472da5fe9e7dd02d003c766b13 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Wed, 10 Feb 2016 00:22:42 +0100 Subject: include spring-watcher-listen in the Gemfile of new applications --- railties/CHANGELOG.md | 5 +++++ railties/lib/rails/generators/rails/app/templates/Gemfile | 3 +++ railties/test/generators/app_generator_test.rb | 1 + 3 files changed, 9 insertions(+) (limited to 'railties') 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) -- cgit v1.2.3