aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-03-13 04:32:45 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-03-13 04:32:45 +0000
commit0631400b4a39e45a248caf4785cb3196f6206e9a (patch)
tree3ce5723cc5ebb757f9baaf6f9d4092f5519c2b91
parentcb6d94cc577370b49aac4ad7d2718e78d350a797 (diff)
downloadrails-0631400b4a39e45a248caf4785cb3196f6206e9a.tar.gz
rails-0631400b4a39e45a248caf4785cb3196f6206e9a.tar.bz2
rails-0631400b4a39e45a248caf4785cb3196f6206e9a.zip
Deprecation: remove deprecated request methods.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6401 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/CHANGELOG2
-rwxr-xr-xactionpack/lib/action_controller.rb1
-rw-r--r--actionpack/lib/action_controller/deprecated_request_methods.rb34
-rw-r--r--actionpack/test/controller/webservice_test.rb9
4 files changed, 1 insertions, 45 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 54b5ca40c6..37783e3752 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,6 +1,6 @@
*SVN*
-* Deprecation: remove deprecated instance variables and redirect methods. [Jeremy Kemper]
+* Deprecation: remove deprecated instance variables, request methods, and redirect methods. [Jeremy Kemper]
* Consistent public/protected/private visibility for chained methods. #7813 [Dan Manges]
diff --git a/actionpack/lib/action_controller.rb b/actionpack/lib/action_controller.rb
index 58aff0922a..cc5ba2b2b2 100755
--- a/actionpack/lib/action_controller.rb
+++ b/actionpack/lib/action_controller.rb
@@ -38,7 +38,6 @@ $:.unshift "#{File.dirname(__FILE__)}/action_controller/vendor/html-scanner"
require 'action_controller/base'
require 'action_controller/request'
-require 'action_controller/deprecated_request_methods'
require 'action_controller/rescue'
require 'action_controller/benchmarking'
require 'action_controller/flash'
diff --git a/actionpack/lib/action_controller/deprecated_request_methods.rb b/actionpack/lib/action_controller/deprecated_request_methods.rb
deleted file mode 100644
index 93663bdda4..0000000000
--- a/actionpack/lib/action_controller/deprecated_request_methods.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-module ActionController
- class AbstractRequest
- # Determine whether the body of a HTTP call is URL-encoded (default)
- # or matches one of the registered param_parsers.
- #
- # For backward compatibility, the post format is extracted from the
- # X-Post-Data-Format HTTP header if present.
- def post_format
- case content_type
- when Mime::XML
- :xml
- when Mime::YAML
- :yaml
- else
- :url_encoded
- end
- end
-
- # Is this a POST request formatted as XML or YAML?
- def formatted_post?
- post? && (post_format == :yaml || post_format == :xml)
- end
-
- # Is this a POST request formatted as XML?
- def xml_post?
- post? && post_format == :xml
- end
-
- # Is this a POST request formatted as YAML?
- def yaml_post?
- post? && post_format == :yaml
- end
- end
-end
diff --git a/actionpack/test/controller/webservice_test.rb b/actionpack/test/controller/webservice_test.rb
index e60e3a84cb..2b50088bb4 100644
--- a/actionpack/test/controller/webservice_test.rb
+++ b/actionpack/test/controller/webservice_test.rb
@@ -98,15 +98,6 @@ class WebServiceTest < Test::Unit::TestCase
assert_nothing_raised { process('POST', 'application/xml', "") }
assert_equal "", @controller.response.body
end
-
- def test_deprecated_request_methods
- process('POST', 'application/x-yaml')
- assert_equal Mime::YAML, @controller.request.content_type
- assert_equal true, @controller.request.post?
- assert_equal :yaml, @controller.request.post_format
- assert_equal true, @controller.request.yaml_post?
- assert_equal false, @controller.request.xml_post?
- end
def test_dasherized_keys_as_xml
ActionController::Base.param_parsers[Mime::XML] = :xml_simple