From 64fc8963b9998cc833d7f2b04e4b9fef3428b858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 25 Sep 2014 16:20:31 -0300 Subject: [PATCH] Remove unused code --- railties/lib/rails/info.rb | 11 ----------- railties/test/rails_info_test.rb | 13 +------------ 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/railties/lib/rails/info.rb b/railties/lib/rails/info.rb index 1ff1eb0e97..357aebf584 100644 --- a/railties/lib/rails/info.rb +++ b/railties/lib/rails/info.rb @@ -22,17 +22,6 @@ def property(name, value = nil) rescue Exception end - def frameworks - %w( active_record action_pack action_view action_mailer active_support active_model ) - end - - def framework_version(framework) - if Object.const_defined?(framework.classify) - require "#{framework}/version" - framework.classify.constantize.version.to_s - end - end - def to_s column_width = properties.names.map {|name| name.length}.max info = properties.map do |name, value| diff --git a/railties/test/rails_info_test.rb b/railties/test/rails_info_test.rb index 4bec302ff8..92e4af25b5 100644 --- a/railties/test/rails_info_test.rb +++ b/railties/test/rails_info_test.rb @@ -38,21 +38,10 @@ def test_property_with_block end def test_rails_version - assert_property 'Rails version', + assert_property 'Rails version', File.read(File.realpath('../../../RAILS_VERSION', __FILE__)).chomp end - def test_framework_version - assert_property 'Active Support version', ActiveSupport.version.to_s - end - - def test_frameworks_exist - Rails::Info.frameworks.each do |framework| - dir = File.dirname(__FILE__) + "/../../" + framework.delete('_') - assert File.directory?(dir), "#{framework.classify} does not exist" - end - end - def test_html_includes_middleware Rails::Info.module_eval do property 'Middleware', ['Rack::Lock', 'Rack::Static'] -- GitLab