From 17f8de1a350c461b0541767cca4035e985562f1e Mon Sep 17 00:00:00 2001 From: bogdanRada Date: Tue, 7 Jan 2014 10:39:03 +0200 Subject: [PATCH 1/2] fix bug showing duplicate complex types --- lib/washout_builder/document/generator.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/washout_builder/document/generator.rb b/lib/washout_builder/document/generator.rb index 71a3f8d..b590ad4 100644 --- a/lib/washout_builder/document/generator.rb +++ b/lib/washout_builder/document/generator.rb @@ -69,7 +69,7 @@ def complex_types (input_types + output_types).each do |p| defined.concat(p.get_nested_complex_types(config, defined)) end - defined.sort_by { |hash| hash[:class].to_s.downcase }.uniq unless defined.blank? + defined.sort_by { |hash| hash[:class].to_s.downcase }.uniq{|hash| hash[:class] } unless defined.blank? end @@ -85,8 +85,8 @@ def fault_types defined.each{ |exception_class| exception_class.get_fault_class_ancestors( fault_types, true)} unless defined.blank? complex_types = extract_nested_complex_types_from_exceptions(fault_types) complex_types.delete_if{ |hash| fault_types << hash if (hash[:fault].is_a?(Class) && hash[:fault].ancestors.detect{ |fault| WashoutBuilder::Type.get_fault_classes.include?(fault) }.present?) || (hash[:fault].is_a?(Class) && WashoutBuilder::Type.get_fault_classes.include?(hash[:fault])) } unless complex_types.blank? - fault_types = fault_types.sort_by { |hash| hash[:fault].to_s.downcase }.uniq unless fault_types.blank? - complex_types = complex_types.sort_by { |hash| hash[:fault].to_s.downcase }.uniq unless complex_types.blank? + fault_types = fault_types.sort_by { |hash| hash[:fault].to_s.downcase }.uniq {|hash| hash[:fault] } unless fault_types.blank? + complex_types = complex_types.sort_by { |hash| hash[:fault].to_s.downcase }.uniq {|hash| hash[:fault] } unless complex_types.blank? [fault_types, complex_types] end From a8a31d37ce07c624c3193a1b3bb388ca840e4ad0 Mon Sep 17 00:00:00 2001 From: bogdanRada Date: Tue, 7 Jan 2014 10:39:38 +0200 Subject: [PATCH 2/2] bump --- lib/washout_builder/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/washout_builder/version.rb b/lib/washout_builder/version.rb index 8aeb66b..9eb2517 100644 --- a/lib/washout_builder/version.rb +++ b/lib/washout_builder/version.rb @@ -1,3 +1,3 @@ module WashoutBuilder - VERSION = "0.11.2" + VERSION = "0.11.3" end