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:
parent
91183baa6d
commit
a227359c62
1 changed files with 3 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue