aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/lib/active_record/model_schema.rb4
-rw-r--r--activesupport/test/dependencies_test.rb4
-rw-r--r--railties/CHANGELOG.md7
-rw-r--r--railties/lib/rails/generators/app_base.rb12
4 files changed, 15 insertions, 12 deletions
diff --git a/activerecord/lib/active_record/model_schema.rb b/activerecord/lib/active_record/model_schema.rb
index 75adcccce6..3674f672cb 100644
--- a/activerecord/lib/active_record/model_schema.rb
+++ b/activerecord/lib/active_record/model_schema.rb
@@ -328,12 +328,8 @@ module ActiveRecord
@default_attributes = nil
@inheritance_column = nil unless defined?(@explicit_inheritance_column) && @explicit_inheritance_column
@attributes_builder = nil
- @column_names = nil
- @attribute_types = nil
@columns = nil
@columns_hash = nil
- @content_columns = nil
- @default_attributes = nil
@attribute_names = nil
end
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb
index 702e26859a..4a1d90bfd6 100644
--- a/activesupport/test/dependencies_test.rb
+++ b/activesupport/test/dependencies_test.rb
@@ -160,7 +160,7 @@ class DependenciesTest < ActiveSupport::TestCase
def test_ensures_the_expected_constant_is_defined
with_autoloading_fixtures do
e = assert_raise(LoadError) { Typo }
- assert_match %r{Unable to autoload constant Typo, expected .*activesupport/test/autoloading_fixtures/typo.rb to define it}, e.message
+ assert_match %r{Unable to autoload constant Typo, expected .*/test/autoloading_fixtures/typo.rb to define it}, e.message
end
end
@@ -178,7 +178,7 @@ class DependenciesTest < ActiveSupport::TestCase
assert_equal 1, TypO
e = assert_raise(LoadError) { Typo }
- assert_match %r{Unable to autoload constant Typo, expected .*activesupport/test/autoloading_fixtures/typo.rb to define it}, e.message
+ assert_match %r{Unable to autoload constant Typo, expected .*/test/autoloading_fixtures/typo.rb to define it}, e.message
end
end
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index a181823576..e60feed15f 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -1,3 +1,10 @@
+* Print `bundle install` output in `rails new` as soon as it's available
+
+ Running `rails new` will now print the output of `bundle install` as
+ it is available, instead of waiting until all gems finish installing.
+
+ *Max Holder*
+
* Respect `pluralize_table_names` when generating fixture file.
Fixes #19519.
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 813f8b21fd..10deeb0ba2 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -315,10 +315,6 @@ module Rails
# its own vendored Thor, which could be a different version. Running both
# things in the same process is a recipe for a night with paracetamol.
#
- # We use backticks and #print here instead of vanilla #system because it
- # is easier to silence stdout in the existing test suite this way. The
- # end-user gets the bundler commands called anyway, so no big deal.
- #
# We unset temporary bundler variables to load proper bundler and Gemfile.
#
# Thanks to James Tucker for the Gem tricks involved in this call.
@@ -326,8 +322,12 @@ module Rails
require 'bundler'
Bundler.with_clean_env do
- output = `"#{Gem.ruby}" "#{_bundle_command}" #{command}`
- print output unless options[:quiet]
+ full_command = %Q["#{Gem.ruby}" "#{_bundle_command}" #{command}]
+ if options[:quiet]
+ system(full_command, out: File::NULL)
+ else
+ system(full_command)
+ end
end
end