1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Rename Rails::Info.components to frameworks

This commit is contained in:
Jeremy Kemper 2008-11-24 18:47:42 -08:00
parent 104f3a5776
commit a5870d43e3
2 changed files with 13 additions and 13 deletions

View file

@ -20,13 +20,13 @@ module Rails
rescue Exception
end
def components
def frameworks
%w( active_record action_pack active_resource action_mailer active_support )
end
def component_version(component)
require "#{component}/version"
"#{component.classify}::VERSION::STRING".constantize
def framework_version(framework)
require "#{framework}/version"
"#{framework.classify}::VERSION::STRING".constantize
end
def edge_rails_revision(info = git_info)
@ -90,11 +90,11 @@ module Rails
Rails::VERSION::STRING
end
# Versions of each Rails component (Active Record, Action Pack,
# Versions of each Rails framework (Active Record, Action Pack,
# Active Resource, Action Mailer, and Active Support).
components.each do |component|
property "#{component.titlecase} version" do
component_version(component)
frameworks.each do |framework|
property "#{framework.titlecase} version" do
framework_version(framework)
end
end

View file

@ -61,14 +61,14 @@ EOS
assert_property 'Goodbye', 'World'
end
def test_component_version
def test_framework_version
assert_property 'Active Support version', ActiveSupport::VERSION::STRING
end
def test_components_exist
Rails::Info.components.each do |component|
dir = File.dirname(__FILE__) + "/../../" + component.gsub('_', '')
assert File.directory?(dir), "#{component.classify} does not exist"
def test_frameworks_exist
Rails::Info.frameworks.each do |framework|
dir = File.dirname(__FILE__) + "/../../" + framework.gsub('_', '')
assert File.directory?(dir), "#{framework.classify} does not exist"
end
end