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
- map.each do |operation, formats|
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.sort_by { |operation, formats| operation.downcase }.map{|operation, formats| operation.to_s }.uniq unless map.blank?
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
- defined = []
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 { |name| name.class.to_s.downcase }.uniq
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
@@ -1,3 +1,3 @@
1
1
  module WashoutBuilder
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: washout_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: