From a227359c6289613c870c8bb1481754ab00325c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 5 Sep 2012 11:05:50 -0300 Subject: Remove unneeded requires We should not require all the core extensions inside the frameworks. The logger is already defined in the Action View framework. --- actionpack/lib/action_view/digestor.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'actionpack/lib/action_view/digestor.rb') diff --git a/actionpack/lib/action_view/digestor.rb b/actionpack/lib/action_view/digestor.rb index 2d7ba856d5..36bdb706b3 100644 --- a/actionpack/lib/action_view/digestor.rb +++ b/actionpack/lib/action_view/digestor.rb @@ -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 \ No newline at end of file +end -- cgit v1.2.3