diff options
author | Genadi Samokovarov <gsamokovarov@gmail.com> | 2016-07-21 10:46:12 +0300 |
---|---|---|
committer | Genadi Samokovarov <gsamokovarov@gmail.com> | 2016-07-21 10:46:12 +0300 |
commit | e072db77378cad43e720482d0d31297ebb7602c6 (patch) | |
tree | 106d104327b0ea2195047ed617c9b5106e3bd9ab | |
parent | cf5bc0dd5359e61dcb93e719279c7198e68a0eb8 (diff) | |
download | rails-e072db77378cad43e720482d0d31297ebb7602c6.tar.gz rails-e072db77378cad43e720482d0d31297ebb7602c6.tar.bz2 rails-e072db77378cad43e720482d0d31297ebb7602c6.zip |
Enforce minimal web-console version for Rails 5
I dropped the version constraint in web-console with the idea it will be
easier to upgrade the console between Rails releases. However, issues
like #25899 started popping up.
I'm reintroducing the constraint, but this time, I don't set an upper
limit to the major version. This will keep the web-console in a version
that always works for the current Rails version and can be easily
upgraded to the last one with `bundle update`.
We may need to backport this for Rails 5.0.1.
Fixes #25899.
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/Gemfile | 2 | ||||
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index 86143ca1f1..7af5fcd3c1 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -35,7 +35,7 @@ group :development do <%- if options.dev? || options.edge? -%> gem 'web-console', github: 'rails/web-console' <%- else -%> - gem 'web-console' + gem 'web-console', '>= 3.3.0' <%- end -%> <%- end -%> <% if depend_on_listen? -%> diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 50751368c8..b968f9f207 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -574,7 +574,7 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file "Gemfile" do |content| assert_match(/gem 'web-console',\s+github: 'rails\/web-console'/, content) - assert_no_match(/\Agem 'web-console'\z/, content) + assert_no_match(/\Agem 'web-console', '>= 3.3.0'\z/, content) end end @@ -583,7 +583,7 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file "Gemfile" do |content| assert_match(/gem 'web-console',\s+github: 'rails\/web-console'/, content) - assert_no_match(/\Agem 'web-console'\z/, content) + assert_no_match(/\Agem 'web-console', '>= 3.3.0'\z/, content) end end |