mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
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:
parent
08498fee4f
commit
7465ecce26
5 changed files with 12 additions and 2 deletions
1
Gemfile
1
Gemfile
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue