Skip to content
Browse files

Rename Rails::Info.components to frameworks

  • Loading branch information...
1 parent 104f3a5 commit a5870d43e3aac4ae02a650d0112b305c6a3d9114 @jeremy jeremy committed Nov 24, 2008
Showing with 13 additions and 13 deletions.
  1. +8 −8 railties/builtin/rails_info/rails/info.rb
  2. +5 −5 railties/test/rails_info_test.rb
View
16 railties/builtin/rails_info/rails/info.rb
@@ -20,13 +20,13 @@ def property(name, value = nil)
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 @@ def git_info
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
10 railties/test/rails_info_test.rb
@@ -61,14 +61,14 @@ def test_property_with_block
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

0 comments on commit a5870d4

Please sign in to comment.
Something went wrong with that request. Please try again.