Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move action_controller/vendor/html-scanner to action_view

This is another step in moving Action View's dependencies in Action Pack
to Action View itself. Also, HtmlScanner seems to be better suited for
views rather than controllers.
  • Loading branch information...
commit ba83aa7f03d2742dd242a45229e0f67785871515 1 parent 4efad29
Piotr Sarnacki drogus authored
2  actionpack/lib/action_controller.rb
View
@@ -59,7 +59,7 @@ def self.eager_load!
# All of these simply register additional autoloads
require 'action_view'
-require 'action_controller/vendor/html-scanner'
+require 'action_view/vendor/html-scanner'
# Common Active Support usage in Action Controller
require 'active_support/core_ext/class/attribute_accessors'
22 actionpack/lib/action_controller/vendor/html-scanner.rb
View
@@ -1,20 +1,4 @@
-$LOAD_PATH << "#{File.dirname(__FILE__)}/html-scanner"
+require 'action_view/vendor/html-scanner'
+require 'active_support/deprecation'
-module HTML
- extend ActiveSupport::Autoload
-
- eager_autoload do
- autoload :CDATA, 'html/node'
- autoload :Document, 'html/document'
- autoload :FullSanitizer, 'html/sanitizer'
- autoload :LinkSanitizer, 'html/sanitizer'
- autoload :Node, 'html/node'
- autoload :Sanitizer, 'html/sanitizer'
- autoload :Selector, 'html/selector'
- autoload :Tag, 'html/node'
- autoload :Text, 'html/node'
- autoload :Tokenizer, 'html/tokenizer'
- autoload :Version, 'html/version'
- autoload :WhiteListSanitizer, 'html/sanitizer'
- end
-end
+ActiveSupport::Deprecation.warn 'vendored html-scanner was moved to action_view, please require "action_view/vendor/html-scanner" instead'
2  actionpack/lib/action_dispatch/testing/assertions/dom.rb
View
@@ -1,4 +1,4 @@
-require 'action_controller/vendor/html-scanner'
+require 'action_view/vendor/html-scanner'
module ActionDispatch
module Assertions
3  actionpack/lib/action_dispatch/testing/assertions/selector.rb
View
@@ -1,4 +1,5 @@
-require 'action_controller/vendor/html-scanner'
+require 'action_view/vendor/html-scanner'
+require 'active_support/core_ext/object/inclusion'
#--
# Copyright (c) 2006 Assaf Arkin (http://labnotes.org)
2  actionpack/lib/action_dispatch/testing/assertions/tag.rb
View
@@ -1,4 +1,4 @@
-require 'action_controller/vendor/html-scanner'
+require 'action_view/vendor/html-scanner'
module ActionDispatch
module Assertions
2  actionpack/lib/action_view/helpers/sanitize_helper.rb
View
@@ -1,5 +1,5 @@
require 'active_support/core_ext/object/try'
-require 'action_controller/vendor/html-scanner'
+require 'action_view/vendor/html-scanner'
module ActionView
# = Action View Sanitize Helpers
20 actionpack/lib/action_view/vendor/html-scanner.rb
View
@@ -0,0 +1,20 @@
+$LOAD_PATH << "#{File.dirname(__FILE__)}/html-scanner"
+
+module HTML
+ extend ActiveSupport::Autoload
+
+ eager_autoload do
+ autoload :CDATA, 'html/node'
+ autoload :Document, 'html/document'
+ autoload :FullSanitizer, 'html/sanitizer'
+ autoload :LinkSanitizer, 'html/sanitizer'
+ autoload :Node, 'html/node'
+ autoload :Sanitizer, 'html/sanitizer'
+ autoload :Selector, 'html/selector'
+ autoload :Tag, 'html/node'
+ autoload :Text, 'html/node'
+ autoload :Tokenizer, 'html/tokenizer'
+ autoload :Version, 'html/version'
+ autoload :WhiteListSanitizer, 'html/sanitizer'
+ end
+end
0  ...n_controller/vendor/html-scanner/html/document.rb → .../action_view/vendor/html-scanner/html/document.rb
View
File renamed without changes
0  ...ction_controller/vendor/html-scanner/html/node.rb → .../lib/action_view/vendor/html-scanner/html/node.rb
View
File renamed without changes
0  ..._controller/vendor/html-scanner/html/sanitizer.rb → ...action_view/vendor/html-scanner/html/sanitizer.rb
View
File renamed without changes
0  ...n_controller/vendor/html-scanner/html/selector.rb → .../action_view/vendor/html-scanner/html/selector.rb
View
File renamed without changes
0  ..._controller/vendor/html-scanner/html/tokenizer.rb → ...action_view/vendor/html-scanner/html/tokenizer.rb
View
File renamed without changes
0  ...on_controller/vendor/html-scanner/html/version.rb → ...b/action_view/vendor/html-scanner/html/version.rb
View
File renamed without changes
2  actionpack/test/controller/action_pack_assertions_test.rb
View
@@ -1,5 +1,5 @@
require 'abstract_unit'
-require 'action_controller/vendor/html-scanner'
+require 'action_view/vendor/html-scanner'
require 'controller/fake_controllers'
class ActionPackAssertionsController < ActionController::Base
2  actionpack/test/controller/integration_test.rb
View
@@ -1,6 +1,6 @@
require 'abstract_unit'
require 'controller/fake_controllers'
-require 'action_controller/vendor/html-scanner'
+require 'action_view/vendor/html-scanner'
class SessionTest < ActiveSupport::TestCase
StubApp = lambda { |env|
2  actionpack/test/controller/selector_test.rb
View
@@ -5,7 +5,7 @@
require 'abstract_unit'
require 'controller/fake_controllers'
-require 'action_controller/vendor/html-scanner'
+require 'action_view/vendor/html-scanner'
class SelectorTest < ActiveSupport::TestCase
#
Please sign in to comment.
Something went wrong with that request. Please try again.