Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove unused code
  • Loading branch information
rafaelfranca committed Sep 25, 2014
1 parent 2922f63 commit 64fc896
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
11 changes: 0 additions & 11 deletions railties/lib/rails/info.rb
Expand Up @@ -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|
Expand Down
13 changes: 1 addition & 12 deletions railties/test/rails_info_test.rb
Expand Up @@ -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']
Expand Down

0 comments on commit 64fc896

Please sign in to comment.