diff --git a/Gemfile b/Gemfile index 4bdb5a4986e..2fdcec062c4 100644 --- a/Gemfile +++ b/Gemfile @@ -60,7 +60,6 @@ instance_eval File.read local_gemfile if File.exist? local_gemfile group :test do # FIX: Our test suite isn't ready to run in random order yet gem 'minitest', '< 5.3.4' - gem 'method_source' platforms :mri_19 do gem 'ruby-prof', '~> 0.11.2' diff --git a/Gemfile.lock b/Gemfile.lock index 1139e05aa54..cd360958d30 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -87,6 +87,7 @@ PATH railties (5.0.0.alpha) actionpack (= 5.0.0.alpha) activesupport (= 5.0.0.alpha) + method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) @@ -261,7 +262,6 @@ DEPENDENCIES json kindlerb (= 0.1.1) mail! - method_source minitest (< 5.3.4) mocha (~> 0.14) mysql (>= 2.9.0) diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index 82a03153790..c11bb58bfa8 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -36,10 +36,6 @@ group :development, :test do # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' <% end -%> - - # Adds `Method#source` and `Method#comment` to get the source code of a - # method from the console - gem 'method_source' <% end -%> end <% if RUBY_PLATFORM.match(/bccwin|cygwin|emx|mingw|mswin|wince|java/) -%> diff --git a/railties/railties.gemspec b/railties/railties.gemspec index 5d79325a7af..001882fdc6b 100644 --- a/railties/railties.gemspec +++ b/railties/railties.gemspec @@ -28,6 +28,7 @@ Gem::Specification.new do |s| s.add_dependency 'rake', '>= 0.8.7' s.add_dependency 'thor', '>= 0.18.1', '< 2.0' + s.add_dependency 'method_source' s.add_development_dependency 'actionview', version end diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 4c5dd70a88b..00a79322673 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -443,13 +443,6 @@ class AppGeneratorTest < Rails::Generators::TestCase end end - def test_inclusion_of_method_source - run_generator - assert_file "Gemfile" do |content| - assert_gem 'method_source' - end - end - def test_template_from_dir_pwd FileUtils.cd(Rails.root) assert_match(/It works from file!/, run_generator([destination_root, "-m", "lib/template.rb"]))