Skip to content

Commit cafe07d

Browse files
committed
Proper parser selection
1 parent 71769c7 commit cafe07d

File tree

7 files changed

+89
-65
lines changed

7 files changed

+89
-65
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.7.1
4+
5+
* Parser switcher [@inossidabile][]
6+
* Namespaces support patched [@inossidabile][]
7+
38
## 0.7.0
49

510
* WSDL Document mode support [@gorism][]

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source "http://rubygems.org"
33
gemspec
44

55
gem 'wasabi'
6-
gem 'savon'
6+
gem 'savon', '>= 2.0.0'
77
gem 'httpi', :git => 'git://github.com/savonrb/httpi.git'
88

99
gem 'bundler', '~> 1.3.0'

Gemfile.lock

+77-63
Original file line numberDiff line numberDiff line change
@@ -1,136 +1,150 @@
11
GIT
22
remote: git://github.com/savonrb/httpi.git
3-
revision: 6536d498160ecb0e969bb161ad091c49493f6bc2
3+
revision: 8fe93587ec4f4558ba0bf660b37d2b8c540bd7c4
44
specs:
5-
httpi (2.0.0)
5+
httpi (2.0.2)
66
rack
7+
rubyntlm
78

89
PATH
910
remote: .
1011
specs:
11-
wash_out (0.7.0)
12-
nori (~> 2.0.0)
12+
wash_out (0.7.1)
13+
nori (>= 2.0.0)
1314

1415
GEM
1516
remote: http://rubygems.org/
1617
specs:
17-
actionpack (3.2.9)
18-
activemodel (= 3.2.9)
19-
activesupport (= 3.2.9)
18+
actionpack (3.2.13)
19+
activemodel (= 3.2.13)
20+
activesupport (= 3.2.13)
2021
builder (~> 3.0.0)
2122
erubis (~> 2.7.0)
2223
journey (~> 1.0.4)
23-
rack (~> 1.4.0)
24+
rack (~> 1.4.5)
2425
rack-cache (~> 1.2)
2526
rack-test (~> 0.6.1)
2627
sprockets (~> 2.2.1)
27-
activemodel (3.2.9)
28-
activesupport (= 3.2.9)
28+
activemodel (3.2.13)
29+
activesupport (= 3.2.13)
2930
builder (~> 3.0.0)
30-
activesupport (3.2.9)
31-
i18n (~> 0.6)
31+
activesupport (3.2.13)
32+
i18n (= 0.6.1)
3233
multi_json (~> 1.0)
3334
akami (1.2.0)
3435
gyoku (>= 0.4.0)
3536
nokogiri (>= 1.4.0)
36-
appraisal (0.5.1)
37+
appraisal (0.5.2)
3738
bundler
3839
rake
3940
builder (3.0.4)
40-
coderay (1.0.8)
41+
coderay (1.0.9)
4142
colored (1.2)
42-
diff-lcs (1.1.3)
43+
diff-lcs (1.2.4)
4344
erubis (2.7.0)
44-
guard (1.6.1)
45-
listen (>= 0.6.0)
45+
ffi (1.8.1)
46+
ffi (1.8.1-java)
47+
formatador (0.2.4)
48+
guard (1.8.0)
49+
formatador (>= 0.2.4)
50+
listen (>= 1.0.0)
4651
lumberjack (>= 1.0.2)
4752
pry (>= 0.9.10)
4853
thor (>= 0.14.6)
49-
guard-rspec (2.3.3)
50-
guard (>= 1.1)
51-
rspec (~> 2.11)
54+
guard-rspec (3.0.0)
55+
guard (>= 1.8)
56+
rspec (~> 2.13)
5257
gyoku (1.0.0)
5358
builder (>= 2.1.2)
54-
hike (1.2.1)
59+
hike (1.2.2)
5560
i18n (0.6.1)
5661
journey (1.0.4)
57-
json (1.7.5)
58-
json (1.7.5-java)
59-
listen (0.6.0)
60-
lumberjack (1.0.2)
62+
json (1.8.0)
63+
json (1.8.0-java)
64+
listen (1.1.1)
65+
rb-fsevent (>= 0.9.3)
66+
rb-inotify (>= 0.9)
67+
rb-kqueue (>= 0.2)
68+
lumberjack (1.0.3)
6169
method_source (0.8.1)
62-
multi_json (1.5.0)
63-
nokogiri (1.5.6)
64-
nokogiri (1.5.6-java)
65-
nori (2.0.0)
66-
pry (0.9.10)
70+
multi_json (1.7.3)
71+
nokogiri (1.5.9)
72+
nokogiri (1.5.9-java)
73+
nori (2.1.0)
74+
pry (0.9.12.2)
6775
coderay (~> 1.0.5)
6876
method_source (~> 0.8)
69-
slop (~> 3.3.1)
70-
pry (0.9.10-java)
77+
slop (~> 3.4)
78+
pry (0.9.12.2-java)
7179
coderay (~> 1.0.5)
7280
method_source (~> 0.8)
73-
slop (~> 3.3.1)
81+
slop (~> 3.4)
7482
spoon (~> 0.0)
75-
rack (1.4.1)
83+
rack (1.4.5)
7684
rack-cache (1.2)
7785
rack (>= 0.4)
78-
rack-ssl (1.3.2)
86+
rack-ssl (1.3.3)
7987
rack
8088
rack-test (0.6.2)
8189
rack (>= 1.0)
82-
railties (3.2.9)
83-
actionpack (= 3.2.9)
84-
activesupport (= 3.2.9)
90+
railties (3.2.13)
91+
actionpack (= 3.2.13)
92+
activesupport (= 3.2.13)
8593
rack-ssl (~> 1.3.2)
8694
rake (>= 0.8.7)
8795
rdoc (~> 3.4)
8896
thor (>= 0.14.6, < 2.0)
8997
rake (10.0.4)
90-
rb-fsevent (0.9.2)
91-
rdoc (3.12)
98+
rb-fsevent (0.9.3)
99+
rb-inotify (0.9.0)
100+
ffi (>= 0.5.0)
101+
rb-kqueue (0.2.0)
102+
ffi (>= 0.5.0)
103+
rdoc (3.12.2)
92104
json (~> 1.4)
93-
rspec (2.12.0)
94-
rspec-core (~> 2.12.0)
95-
rspec-expectations (~> 2.12.0)
96-
rspec-mocks (~> 2.12.0)
97-
rspec-core (2.12.2)
98-
rspec-expectations (2.12.1)
99-
diff-lcs (~> 1.1.3)
100-
rspec-mocks (2.12.1)
101-
rspec-rails (2.12.0)
105+
rspec (2.13.0)
106+
rspec-core (~> 2.13.0)
107+
rspec-expectations (~> 2.13.0)
108+
rspec-mocks (~> 2.13.0)
109+
rspec-core (2.13.1)
110+
rspec-expectations (2.13.0)
111+
diff-lcs (>= 1.1.3, < 2.0)
112+
rspec-mocks (2.13.1)
113+
rspec-rails (2.13.1)
102114
actionpack (>= 3.0)
103115
activesupport (>= 3.0)
104116
railties (>= 3.0)
105-
rspec-core (~> 2.12.0)
106-
rspec-expectations (~> 2.12.0)
107-
rspec-mocks (~> 2.12.0)
108-
savon (2.0.2)
117+
rspec-core (~> 2.13.0)
118+
rspec-expectations (~> 2.13.0)
119+
rspec-mocks (~> 2.13.0)
120+
rubyntlm (0.3.1)
121+
savon (2.2.0)
109122
akami (~> 1.2.0)
110123
builder (>= 2.1.2)
111124
gyoku (~> 1.0.0)
112-
httpi (~> 2.0.0)
125+
httpi (~> 2.0.2)
113126
nokogiri (>= 1.4.0)
114-
nori (~> 2.0.0)
115-
wasabi (~> 3.0.0)
127+
nori (~> 2.1.0)
128+
wasabi (~> 3.1.0)
116129
simplecov (0.7.1)
117130
multi_json (~> 1.0)
118131
simplecov-html (~> 0.7.1)
119132
simplecov-html (0.7.1)
120133
simplecov-summary (0.0.4)
121134
colored
122135
simplecov
123-
slop (3.3.3)
124-
spoon (0.0.1)
136+
slop (3.4.5)
137+
spoon (0.0.4)
138+
ffi
125139
sprockets (2.2.2)
126140
hike (~> 1.2)
127141
multi_json (~> 1.0)
128142
rack (~> 1.0)
129143
tilt (~> 1.1, != 1.3.0)
130-
thor (0.16.0)
131-
tilt (1.3.3)
132-
tzinfo (0.3.35)
133-
wasabi (3.0.0)
144+
thor (0.18.1)
145+
tilt (1.4.1)
146+
tzinfo (0.3.37)
147+
wasabi (3.1.0)
134148
httpi (~> 2.0)
135149
nokogiri (>= 1.4.0)
136150

@@ -147,7 +161,7 @@ DEPENDENCIES
147161
pry
148162
rb-fsevent
149163
rspec-rails
150-
savon
164+
savon (>= 2.0.0)
151165
simplecov
152166
simplecov-summary
153167
tzinfo

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ Use `config.wash_out...` inside your environment configuration to setup WashOut.
142142

143143
Available properties are:
144144

145+
* **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.
145146
* **style**: sets WSDL style. Supported values are: 'document' and 'rpc'.
146147
* **catch_xml_errors**: intercept Rails parsing exceptions to return correct XML response for corrupt XML input. Default is `false`.
147148
* **namespace**: SOAP namespace to use. Default is `urn:WashOut`.

lib/wash_out/dispatcher.rb

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class ProgrammerError < Exception; end
1313
# This filter parses the SOAP request and puts it into +params+ array.
1414
def _parse_soap_parameters
1515
parser = Nori.new(
16+
:parser => WashOut::Engine.parser,
1617
:strip_namespaces => true,
1718
:advanced_typecasting => true,
1819
:convert_tags_to => ( WashOut::Engine.snakecase_input ? lambda { |tag| tag.snakecase.to_sym } \

lib/wash_out/engine.rb

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module WashOut
22
class Engine < ::Rails::Engine
33
class << self
4+
attr_accessor :parser
45
attr_accessor :namespace
56
attr_accessor :style
67
attr_accessor :snakecase, :camelize_output
@@ -9,6 +10,8 @@ class << self
910
attr_accessor :catch_xml_errors
1011
end
1112

13+
self.parser = :rexml
14+
1215
self.namespace = 'urn:WashOut'
1316
self.style = 'rpc'
1417
self.snakecase = nil

wash_out.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ Gem::Specification.new do |s|
1313
s.files = `git ls-files`.split("\n")
1414
s.require_paths = ["lib"]
1515

16-
s.add_dependency("nori", "~> 2.0.0")
16+
s.add_dependency("nori", ">= 2.0.0")
1717
end

0 commit comments

Comments
 (0)