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

Remove unneeded requires

We should not require all the core extensions inside the frameworks.
The logger is already defined in the Action View framework.
This commit is contained in:
Rafael Mendonça França 2012-09-05 11:05:50 -03:00
parent 91183baa6d
commit a227359c62

View file

@ -1,6 +1,3 @@
require 'active_support/core_ext'
require 'logger'
module ActionView
class Digestor
EXPLICIT_DEPENDENCY = /# Template Dependency: ([^ ]+)/
@ -61,7 +58,7 @@ module ActionView
def logical_name
name.gsub(%r|/_|, "/")
end
def directory
name.split("/").first
end
@ -74,7 +71,6 @@ module ActionView
@source ||= finder.find(logical_name, [], partial?, formats: [ format ]).source
end
def dependency_digest
dependencies.collect do |template_name|
Digestor.digest(template_name, format, finder, partial: true)
@ -92,7 +88,7 @@ module ActionView
# render("headline") => render("message/headline")
collect { |name| name.include?("/") ? name : "#{directory}/#{name}" }.
# replace quotes from string renders
collect { |name| name.gsub(/["']/, "") }
end
@ -101,4 +97,4 @@ module ActionView
source.scan(EXPLICIT_DEPENDENCY).flatten.uniq
end
end
end
end