Start using actionpack-xml_parser as a gem

XML param parsing was removed from rails 4. We may need to look into dropping support 
for xml api perhaps in favor of a good json api
This commit is contained in:
Reinier Balt 2013-05-13 15:36:33 +02:00
parent 08498fee4f
commit 7465ecce26
5 changed files with 12 additions and 2 deletions

View file

@ -7,6 +7,7 @@ gem 'coffee-rails', '~>4.0'
# add these gems to help with the transition:
gem 'protected_attributes'
gem 'rails-observers'
gem 'actionpack-xml_parser', github: 'rails/actionpack-xml_parser'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer'

View file

@ -1,3 +1,10 @@
GIT
remote: git://github.com/rails/actionpack-xml_parser.git
revision: 13b8750446f472d7d5191d79eee2209dbff675d6
specs:
actionpack-xml_parser (0.1.0)
actionpack (~> 4.0.0.beta)
GEM
remote: https://rubygems.org/
specs:
@ -190,6 +197,7 @@ PLATFORMS
DEPENDENCIES
RedCloth
aasm
actionpack-xml_parser!
acts_as_list
aruba
bcrypt-ruby

View file

@ -64,5 +64,6 @@ module Tracksapp
# allow onenote:// and message:// as protocols for urls
config.action_view.sanitized_allowed_protocols = 'onenote', 'message'
config.middleware.insert_after ActionDispatch::ParamsParser, ActionDispatch::XmlParamsParser
end
end

View file

@ -1,6 +1,6 @@
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
class TodoXmlApiTest < ActionController::IntegrationTest
class TodoXmlApiTest < ActionDispatch::IntegrationTest
@@valid_postdata = "<todo><description>this will succeed</description><context_id type='integer'>10</context_id><project_id type='integer'>4</project_id></todo>"
def setup

View file

@ -1,6 +1,6 @@
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
class UsersXmlApiTest < ActionController::IntegrationTest
class UsersXmlApiTest < ActionDispatch::IntegrationTest
@@foobar_postdata = "<user><login>foo</login><password>bar</password></user>"
@@johnny_postdata = "<user><login>johnny</login><password>barracuda</password></user>"