Kouhei Sutou
null+****@clear*****
Fri Feb 14 12:50:40 JST 2014
Kouhei Sutou 2014-02-14 12:50:40 +0900 (Fri, 14 Feb 2014) New Revision: 8b859e29c435efff4403a602a82e6624e59771a5 https://github.com/droonga/fluent-plugin-droonga/commit/8b859e29c435efff4403a602a82e6624e59771a5 Message: Simplify API Oh... We don't have tests for catalog validations... Modified files: lib/droonga/catalog/base.rb lib/droonga/error.rb Modified: lib/droonga/catalog/base.rb (+3 -3) =================================================================== --- lib/droonga/catalog/base.rb 2014-02-14 12:48:50 +0900 (e985e90) +++ lib/droonga/catalog/base.rb 2014-02-14 12:50:40 +0900 (7c49a9e) @@ -27,10 +27,10 @@ module Droonga @data = data @path = path @base_path = File.dirname(path) - @errors = MultiplexError.new + @errors = [] validate - raise @errors unles****@error*****? + raise MultiplexError.new(@errors) unles****@error*****? @data["datasets"].each do |name, dataset| number_of_partitions = dataset["number_of_partitions"] @@ -173,7 +173,7 @@ module Droonga begin yield rescue ValidationError => error - @errors.errors << error + @errors << error end end Modified: lib/droonga/error.rb (+0 -4) =================================================================== --- lib/droonga/error.rb 2014-02-14 12:48:50 +0900 (e771925) +++ lib/droonga/error.rb 2014-02-14 12:50:40 +0900 (143a386) @@ -30,9 +30,5 @@ module Droonga message = error_messages.sort.join("\n-----------------------\n") super(message) end - - def empty? - @errors.empty? - end end end -------------- next part -------------- HTML����������������������������... Download