washout_builder 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -46,29 +46,15 @@ module WashoutBuilderHelper
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def get_fault_types_names(map)
|
49
|
-
defined = []
|
50
|
-
|
51
|
-
faults = formats[:raises]
|
52
|
-
unless faults.blank?
|
53
|
-
faults = [formats[:raises]] if !faults.is_a?(Array)
|
54
|
-
faults.each do |p|
|
55
|
-
defined << p.class.to_s
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
defined.sort_by { |name| name.downcase }.uniq unless defined.blank?
|
49
|
+
defined = map.select{|operation, formats| !formats[:raises].blank? }
|
50
|
+
defined.collect {|operation, formats| formats[:raises].is_a?(Array) ? formats[:raises] : [formats[:raises]] }.flatten.map{|item| item.class.to_s }.sort_by { |name| name.downcase }.uniq unless defined.blank?
|
60
51
|
end
|
61
52
|
|
62
53
|
def get_soap_action_names(map)
|
63
|
-
map.
|
54
|
+
map.map{|operation, formats| operation.to_s }.sort_by { |name| name.downcase }.uniq unless map.blank?
|
64
55
|
end
|
65
56
|
|
66
57
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
58
|
def create_html_complex_types(xml, types)
|
73
59
|
types.each do |hash|
|
74
60
|
create_complex_type_html(xml, hash[:obj], hash[:class])
|
@@ -111,21 +97,9 @@ module WashoutBuilderHelper
|
|
111
97
|
end
|
112
98
|
|
113
99
|
def create_html_fault_types_details(xml, map)
|
114
|
-
|
115
|
-
unless map.blank?
|
116
|
-
map = map.sort_by { |operation, formats| formats[:raises].to_s.downcase }.uniq
|
117
|
-
map.each do |operation, formats|
|
118
|
-
faults = formats[:raises]
|
119
|
-
unless faults.blank?
|
120
|
-
faults = [formats[:raises]] if !faults.is_a?(Array)
|
121
|
-
faults.each do |p|
|
122
|
-
defined << p
|
123
|
-
end
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
100
|
+
defined = map.select{|operation, formats| !formats[:raises].blank? }
|
127
101
|
unless defined.blank?
|
128
|
-
defined = defined.sort_by { |
|
102
|
+
defined = defined.collect {|operation, formats| formats[:raises].is_a?(Array) ? formats[:raises] : [formats[:raises]] }.flatten.sort_by { |item| item.class.to_s.downcase }.uniq
|
129
103
|
defined.each do |fault|
|
130
104
|
create_html_fault_type(xml, fault)
|
131
105
|
end
|