From 159a1210444e30f165bd546506f5d3fabc5c779f Mon Sep 17 00:00:00 2001 From: Daniel Colson Date: Thu, 1 Aug 2019 17:42:44 -0400 Subject: Remove duplicate method definition no_color! is already defined in [`Rails::Command::Behavior`][behavior], which gets [included into `Rails:Generators`][include]. This duplication came about in 6813edc7d9 when we introduced the Thor command structure. We have [test coverage][] to ensure this method still behaves correctly on `Rails:Generators`. [behavior]: https://github.com/rails/rails/blob/f7e91c7224560fbd3e95c238a0e8bb362799bcb7/railties/lib/rails/command/behavior.rb#L12-L14 [include]: https://github.com/rails/rails/blob/f7e91c7224560fbd3e95c238a0e8bb362799bcb7/railties/lib/rails/generators.rb#L18 [test coverage]: https://github.com/rails/rails/blob/f7e91c7224560fbd3e95c238a0e8bb362799bcb7/railties/test/generators_test.rb#L163-L168 --- railties/lib/rails/generators.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 436315ce1e..aa7ef1077e 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -128,11 +128,6 @@ module Rails end end - # Remove the color from output. - def no_color! - Thor::Base.shell = Thor::Shell::Basic - end - # Returns an array of generator namespaces that are hidden. # Generator namespaces may be hidden for a variety of reasons. # Some are aliased such as "rails:migration" and can be -- cgit v1.2.3