Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rails::Info doesn't require version for unwanted frameworks

[#3124 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
commit 6bf17770af2a563b037b961a8dbe84f63f9c929c 1 parent 6fdfe4c
@gbuesing gbuesing authored jeremy committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 railties/builtin/rails_info/rails/info.rb
View
6 railties/builtin/rails_info/rails/info.rb
@@ -25,8 +25,10 @@ def frameworks
end
def framework_version(framework)
- require "#{framework}/version"
- "#{framework.classify}::VERSION::STRING".constantize
+ if Object.const_defined?(framework.classify)
+ require "#{framework}/version"
+ "#{framework.classify}::VERSION::STRING".constantize
+ end
end
def edge_rails_revision(info = git_info)
Please sign in to comment.
Something went wrong with that request. Please try again.