mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01: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:
|
# add these gems to help with the transition:
|
||||||
gem 'protected_attributes'
|
gem 'protected_attributes'
|
||||||
gem 'rails-observers'
|
gem 'rails-observers'
|
||||||
|
gem 'actionpack-xml_parser', github: 'rails/actionpack-xml_parser'
|
||||||
|
|
||||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||||
gem 'therubyracer'
|
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
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
|
|
@ -190,6 +197,7 @@ PLATFORMS
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
RedCloth
|
RedCloth
|
||||||
aasm
|
aasm
|
||||||
|
actionpack-xml_parser!
|
||||||
acts_as_list
|
acts_as_list
|
||||||
aruba
|
aruba
|
||||||
bcrypt-ruby
|
bcrypt-ruby
|
||||||
|
|
|
||||||
|
|
@ -64,5 +64,6 @@ module Tracksapp
|
||||||
# allow onenote:// and message:// as protocols for urls
|
# allow onenote:// and message:// as protocols for urls
|
||||||
config.action_view.sanitized_allowed_protocols = 'onenote', 'message'
|
config.action_view.sanitized_allowed_protocols = 'onenote', 'message'
|
||||||
|
|
||||||
|
config.middleware.insert_after ActionDispatch::ParamsParser, ActionDispatch::XmlParamsParser
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
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>"
|
@@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
|
def setup
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require File.expand_path(File.dirname(__FILE__) + '/../test_helper')
|
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>"
|
@@foobar_postdata = "<user><login>foo</login><password>bar</password></user>"
|
||||||
@@johnny_postdata = "<user><login>johnny</login><password>barracuda</password></user>"
|
@@johnny_postdata = "<user><login>johnny</login><password>barracuda</password></user>"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue