diff --git a/railties/lib/rails/info.rb b/railties/lib/rails/info.rb index 5a496f6536..e9c3ebe685 100644 --- a/railties/lib/rails/info.rb +++ b/railties/lib/rails/info.rb @@ -35,20 +35,6 @@ module Rails end end - def edge_rails_revision(info = git_info) - info[/commit ([a-z0-9-]+)/, 1] || freeze_edge_version - end - - def freeze_edge_version - if File.exist?(rails_vendor_root) - begin - Dir[File.join(rails_vendor_root, 'REVISION_*')].first.scan(/_(\d+)$/).first.first - rescue - Dir[File.join(rails_vendor_root, 'TAG_*')].first.scan(/_(.+)$/).first.first rescue 'unknown' - end - end - end - def to_s column_width = properties.names.map {|name| name.length}.max info = properties.map do |name, value| @@ -75,20 +61,6 @@ module Rails table << '' end end - - protected - def rails_vendor_root - @rails_vendor_root ||= "#{Rails.root}/vendor/rails" - end - - def git_info - env_lang, ENV['LC_ALL'] = ENV['LC_ALL'], 'C' - Dir.chdir(rails_vendor_root) do - silence_stderr { `git log -n 1` } - end - ensure - ENV['LC_ALL'] = env_lang - end end # The Ruby version and platform, e.g. "1.8.2 (powerpc-darwin8.2.0)". @@ -120,11 +92,6 @@ module Rails Rails.configuration.middleware.active.map(&:inspect) end - # The Rails Git revision, if it's checked out into vendor/rails. - property 'Edge Rails revision' do - edge_rails_revision - end - # The application's location on the filesystem. property 'Application root' do File.expand_path(Rails.root) diff --git a/railties/test/rails_info_test.rb b/railties/test/rails_info_test.rb index fc28d7e912..1da66062aa 100644 --- a/railties/test/rails_info_test.rb +++ b/railties/test/rails_info_test.rb @@ -14,27 +14,6 @@ class InfoTest < ActiveSupport::TestCase silence_warnings { load 'rails/info.rb' } end - def test_edge_rails_revision_not_set_when_svn_info_is_empty - Rails::Info.property 'Test that this will not be defined' do - Rails::Info.edge_rails_revision '' - end - assert !property_defined?('Test that this will not be defined') - end - - def test_edge_rails_revision_extracted_from_svn_info - Rails::Info.property 'Test Edge Rails revision' do - Rails::Info.edge_rails_revision <<-EOS - commit 420c4b3d8878156d04f45e47050ddc62ae00c68c - Author: David Heinemeier Hansson - Date: Sun Apr 13 17:33:27 2008 -0500 - - Added Rails.public_path to control where HTML and assets are expected to be loaded from -EOS - end - - assert_property 'Test Edge Rails revision', '420c4b3d8878156d04f45e47050ddc62ae00c68c' - end - def test_property_with_block_swallows_exceptions_and_ignores_property assert_nothing_raised do Rails::Info.module_eval do