Skip to content

Commit

Permalink
Merge branch 'release/v0.9.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanRada committed Dec 10, 2013
2 parents a98804d + a97b6ff commit 68a18e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/helpers/washout_builder_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_complex_types(map)

def get_fault_types_names(map)
defined = map.select{|operation, formats| !formats[:raises].blank? }
defined = defined.collect {|operation, formats| formats[:raises].is_a?(Array) ? formats[:raises] : [formats[:raises]] }.flatten.select { |x| x.ancestors.include?(WashOut::SOAPError) } unless defined.blank?
defined = defined.collect {|operation, formats| formats[:raises].is_a?(Array) ? formats[:raises] : [formats[:raises]] }.flatten.select { |x| x.is_a?(Class) && x.ancestors.include?(WashOut::SOAPError) } unless defined.blank?
defined.map{|item| item.to_s }.sort_by { |name| name.downcase }.uniq unless defined.blank?
end

Expand Down Expand Up @@ -154,7 +154,7 @@ def create_html_fault_types_details(xml, map)
end

def create_html_fault_type(xml, param)
# if param.class.ancestors.include?(WashOut::SOAPError)
if param.is_a?(Class) && param.ancestors.include?(WashOut::SOAPError)
xml.h3 "#{param}"
xml.a("name" => "#{param}") {}
xml.ul("class" => "pre") {
Expand All @@ -173,7 +173,7 @@ def create_html_fault_type(xml, param)
end
xml.li { |pre| pre << "<span class='blue'>string</span>&nbsp;<span class='bold'>backtrace</span>" }
}
# end
end
end

def create_html_public_methods(xml, map)
Expand Down Expand Up @@ -287,7 +287,7 @@ def create_html_public_method(xml, operation, formats)
faults = formats[:raises]
faults = [formats[:raises]] if !faults.is_a?(Array)
faults = faults.select { |x| x.ancestors.include?(WashOut::SOAPError) }
faults = faults.select { |x| x.is_a?(Class) && x.ancestors.include?(WashOut::SOAPError) }
unless faults.blank?
xml.p "Exceptions:"
xml.ul {
Expand Down
2 changes: 1 addition & 1 deletion lib/washout_builder/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module WashoutBuilder
VERSION = "0.9.0"
VERSION = "0.9.1"
end

0 comments on commit 68a18e4

Please sign in to comment.