washout_builder 0.8.8 → 0.8.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.rdoc +1 -1
- data/app/helpers/washout_builder_helper.rb +15 -12
- data/lib/washout_builder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTE2YzJiNTcwZjZhMTM3MmEzN2ZhN2RhYjFjNDRmZWE5ZWYyN2NmMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjkzOWY4ODYxNDA5ZjkzODBkOGY4ZTE0NWMyYmUyYjZlZGI0MWY3Yw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWY4N2QwMjg2ZjczODU0NDJkM2EzNmE4NzdkZDNiOTEwZDk1MzlmOTc1N2Nm
|
10
|
+
OGIyZGY3OTAwODVhZTg2YzMxMzRmNWY0NTk3MzA4NTgwZjU4MGRlYjVjZmNl
|
11
|
+
OTY1ODNlYWMzZWZmZmUwNzRhMjgwYzFlY2FjZDVmZTA2MTgzZTc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTA5OTJkNDc3ODZmMDdjZTZmODczNzE0YTdlMzQ0MjE0MDA2ZmQyYjlmMjRl
|
14
|
+
OTNhMDg0ZWI1ZTdlNTRhNWRlOTdhNDliMDllNzkzOGVhOWE4YjZjNzU5MWVh
|
15
|
+
MTY0NDgwNGU4MDVhNDQ5NzI4NjAxYTRlYWY0YTZkMjdiZDg4MzQ=
|
data/README.rdoc
CHANGED
@@ -61,7 +61,7 @@ Please read {release details}[https://github.com/bogdanRada/washout_builder/rele
|
|
61
61
|
The way soap_actions, or reusable types are defined or how the configuration is made using WashOut(https://github.com/inossidabile/wash_out) haven't changed
|
62
62
|
You can still do everything that gem does .
|
63
63
|
|
64
|
-
When specifying the <b>soap_action</b> you can also pass a <b>option for description</b> and a <b>list of exceptions(need to be instances
|
64
|
+
When specifying the <b>soap_action</b> you can also pass a <b>option for description</b> and a <b>list of exceptions(need to be instances)</b> that the method can raise at a certain moment.
|
65
65
|
|
66
66
|
The exception classes used <b>must inherit</b> from <tt>WashOut::SOAPError</tt>, which has by default a error code and a message as attributes but you can extend it by adding more accessible_attributes to your own custom class.
|
67
67
|
|
@@ -64,14 +64,14 @@ module WashoutBuilderHelper
|
|
64
64
|
if !param_class.nil? && param_class.ancestors.include?(WashOut::Type) && !param.map[0].nil?
|
65
65
|
descendant = WashOut::Param.parse_def(@soap_config, param_class.wash_out_param_map)[0]
|
66
66
|
param.name = descendant.name
|
67
|
-
|
67
|
+
param.map = descendant.map
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
71
|
def get_nested_complex_types(param, defined)
|
72
72
|
defined = [] if defined.blank?
|
73
73
|
complex_class = get_complex_class_name(param, defined)
|
74
|
-
|
74
|
+
fix_descendant_wash_out_type(param, complex_class)
|
75
75
|
defined << {:class =>complex_class, :obj => param, :ancestors => param.classified? ? get_class_ancestors(param, complex_class, defined) : nil } unless complex_class.nil?
|
76
76
|
if param.struct?
|
77
77
|
c_names = []
|
@@ -94,7 +94,8 @@ module WashoutBuilderHelper
|
|
94
94
|
|
95
95
|
def get_fault_types_names(map)
|
96
96
|
defined = map.select{|operation, formats| !formats[:raises].blank? }
|
97
|
-
defined.collect {|operation, formats| formats[:raises].is_a?(Array) ? formats[:raises] : [formats[:raises]] }.flatten.
|
97
|
+
defined = defined.collect {|operation, formats| formats[:raises].is_a?(Array) ? formats[:raises] : [formats[:raises]] }.flatten.select { |x| x.class.ancestors.include?(WashOut::SOAPError) } unless defined.blank?
|
98
|
+
defined.map{|item| item.class.to_s }.sort_by { |name| name.downcase }.uniq unless defined.blank?
|
98
99
|
end
|
99
100
|
|
100
101
|
def get_soap_action_names(map)
|
@@ -151,8 +152,7 @@ module WashoutBuilderHelper
|
|
151
152
|
end
|
152
153
|
|
153
154
|
def create_html_fault_type(xml, param)
|
154
|
-
|
155
|
-
if param.class.ancestors.include?(ancestor_class)
|
155
|
+
if param.class.ancestors.include?(WashOut::SOAPError)
|
156
156
|
xml.h3 "#{param.class}"
|
157
157
|
xml.a("name" => "#{param.class}") {}
|
158
158
|
xml.ul("class" => "pre") {
|
@@ -287,13 +287,16 @@ module WashoutBuilderHelper
|
|
287
287
|
unless formats[:raises].blank?
|
288
288
|
faults = formats[:raises]
|
289
289
|
faults = [formats[:raises]] if !faults.is_a?(Array)
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
290
|
+
|
291
|
+
faults = faults.select { |x| x.class.ancestors.include?(WashOut::SOAPError) }
|
292
|
+
unless faults.blank?
|
293
|
+
xml.p "Exceptions:"
|
294
|
+
xml.ul {
|
295
|
+
faults.each do |p|
|
296
|
+
xml.li("class" => "pre"){ |y| y<< "<a href='##{p.class.to_s}'><span class='lightBlue'> #{p.class.to_s}</span></a>" }
|
297
|
+
end
|
298
|
+
}
|
299
|
+
end
|
297
300
|
end
|
298
301
|
end
|
299
302
|
|