Skip to content

Commit

Permalink
Proper parser selection
Browse files Browse the repository at this point in the history
  • Loading branch information
inossidabile committed May 15, 2013
1 parent 71769c7 commit cafe07d
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 65 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.7.1

* Parser switcher [@inossidabile][]
* Namespaces support patched [@inossidabile][]

## 0.7.0

* WSDL Document mode support [@gorism][]
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source "http://rubygems.org"
gemspec

gem 'wasabi'
gem 'savon'
gem 'savon', '>= 2.0.0'
gem 'httpi', :git => 'git://github.com/savonrb/httpi.git'

gem 'bundler', '~> 1.3.0'
Expand Down
140 changes: 77 additions & 63 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,136 +1,150 @@
GIT
remote: git://github.com/savonrb/httpi.git
revision: 6536d498160ecb0e969bb161ad091c49493f6bc2
revision: 8fe93587ec4f4558ba0bf660b37d2b8c540bd7c4
specs:
httpi (2.0.0)
httpi (2.0.2)
rack
rubyntlm

PATH
remote: .
specs:
wash_out (0.7.0)
nori (~> 2.0.0)
wash_out (0.7.1)
nori (>= 2.0.0)

GEM
remote: http://rubygems.org/
specs:
actionpack (3.2.9)
activemodel (= 3.2.9)
activesupport (= 3.2.9)
actionpack (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.0)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.9)
activesupport (= 3.2.9)
activemodel (3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
activesupport (3.2.9)
i18n (~> 0.6)
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
akami (1.2.0)
gyoku (>= 0.4.0)
nokogiri (>= 1.4.0)
appraisal (0.5.1)
appraisal (0.5.2)
bundler
rake
builder (3.0.4)
coderay (1.0.8)
coderay (1.0.9)
colored (1.2)
diff-lcs (1.1.3)
diff-lcs (1.2.4)
erubis (2.7.0)
guard (1.6.1)
listen (>= 0.6.0)
ffi (1.8.1)
ffi (1.8.1-java)
formatador (0.2.4)
guard (1.8.0)
formatador (>= 0.2.4)
listen (>= 1.0.0)
lumberjack (>= 1.0.2)
pry (>= 0.9.10)
thor (>= 0.14.6)
guard-rspec (2.3.3)
guard (>= 1.1)
rspec (~> 2.11)
guard-rspec (3.0.0)
guard (>= 1.8)
rspec (~> 2.13)
gyoku (1.0.0)
builder (>= 2.1.2)
hike (1.2.1)
hike (1.2.2)
i18n (0.6.1)
journey (1.0.4)
json (1.7.5)
json (1.7.5-java)
listen (0.6.0)
lumberjack (1.0.2)
json (1.8.0)
json (1.8.0-java)
listen (1.1.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
lumberjack (1.0.3)
method_source (0.8.1)
multi_json (1.5.0)
nokogiri (1.5.6)
nokogiri (1.5.6-java)
nori (2.0.0)
pry (0.9.10)
multi_json (1.7.3)
nokogiri (1.5.9)
nokogiri (1.5.9-java)
nori (2.1.0)
pry (0.9.12.2)
coderay (~> 1.0.5)
method_source (~> 0.8)
slop (~> 3.3.1)
pry (0.9.10-java)
slop (~> 3.4)
pry (0.9.12.2-java)
coderay (~> 1.0.5)
method_source (~> 0.8)
slop (~> 3.3.1)
slop (~> 3.4)
spoon (~> 0.0)
rack (1.4.1)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-ssl (1.3.2)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
rack (>= 1.0)
railties (3.2.9)
actionpack (= 3.2.9)
activesupport (= 3.2.9)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (10.0.4)
rb-fsevent (0.9.2)
rdoc (3.12)
rb-fsevent (0.9.3)
rb-inotify (0.9.0)
ffi (>= 0.5.0)
rb-kqueue (0.2.0)
ffi (>= 0.5.0)
rdoc (3.12.2)
json (~> 1.4)
rspec (2.12.0)
rspec-core (~> 2.12.0)
rspec-expectations (~> 2.12.0)
rspec-mocks (~> 2.12.0)
rspec-core (2.12.2)
rspec-expectations (2.12.1)
diff-lcs (~> 1.1.3)
rspec-mocks (2.12.1)
rspec-rails (2.12.0)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
rspec-rails (2.13.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.12.0)
rspec-expectations (~> 2.12.0)
rspec-mocks (~> 2.12.0)
savon (2.0.2)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rubyntlm (0.3.1)
savon (2.2.0)
akami (~> 1.2.0)
builder (>= 2.1.2)
gyoku (~> 1.0.0)
httpi (~> 2.0.0)
httpi (~> 2.0.2)
nokogiri (>= 1.4.0)
nori (~> 2.0.0)
wasabi (~> 3.0.0)
nori (~> 2.1.0)
wasabi (~> 3.1.0)
simplecov (0.7.1)
multi_json (~> 1.0)
simplecov-html (~> 0.7.1)
simplecov-html (0.7.1)
simplecov-summary (0.0.4)
colored
simplecov
slop (3.3.3)
spoon (0.0.1)
slop (3.4.5)
spoon (0.0.4)
ffi
sprockets (2.2.2)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
thor (0.16.0)
tilt (1.3.3)
tzinfo (0.3.35)
wasabi (3.0.0)
thor (0.18.1)
tilt (1.4.1)
tzinfo (0.3.37)
wasabi (3.1.0)
httpi (~> 2.0)
nokogiri (>= 1.4.0)

Expand All @@ -147,7 +161,7 @@ DEPENDENCIES
pry
rb-fsevent
rspec-rails
savon
savon (>= 2.0.0)
simplecov
simplecov-summary
tzinfo
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Use `config.wash_out...` inside your environment configuration to setup WashOut.

Available properties are:

* **parser**: XML parser to use – `:rexml` or `:nokogiri`. The first one is default but the latter is much faster. Be sure to add `gem nokogiri` if you want to use it.
* **style**: sets WSDL style. Supported values are: 'document' and 'rpc'.
* **catch_xml_errors**: intercept Rails parsing exceptions to return correct XML response for corrupt XML input. Default is `false`.
* **namespace**: SOAP namespace to use. Default is `urn:WashOut`.
Expand Down
1 change: 1 addition & 0 deletions lib/wash_out/dispatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class ProgrammerError < Exception; end
# This filter parses the SOAP request and puts it into +params+ array.
def _parse_soap_parameters
parser = Nori.new(
:parser => WashOut::Engine.parser,
:strip_namespaces => true,
:advanced_typecasting => true,
:convert_tags_to => ( WashOut::Engine.snakecase_input ? lambda { |tag| tag.snakecase.to_sym } \
Expand Down
3 changes: 3 additions & 0 deletions lib/wash_out/engine.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module WashOut
class Engine < ::Rails::Engine
class << self
attr_accessor :parser
attr_accessor :namespace
attr_accessor :style
attr_accessor :snakecase, :camelize_output
Expand All @@ -9,6 +10,8 @@ class << self
attr_accessor :catch_xml_errors
end

self.parser = :rexml

self.namespace = 'urn:WashOut'
self.style = 'rpc'
self.snakecase = nil
Expand Down
2 changes: 1 addition & 1 deletion wash_out.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Gem::Specification.new do |s|
s.files = `git ls-files`.split("\n")
s.require_paths = ["lib"]

s.add_dependency("nori", "~> 2.0.0")
s.add_dependency("nori", ">= 2.0.0")
end

0 comments on commit cafe07d

Please sign in to comment.