lib/indexer/validator.rb in indexer-0.1.0 vs lib/indexer/validator.rb in indexer-0.2.0

- old
+ new

@@ -99,15 +99,16 @@ def codename=(value) Valid.oneline!(value, :codename) super(value) end - # Loadpath must be an Array of valid pathnames or a String of pathnames - # separated by colons or semi-colons. - def load_path=(value) - Valid.array!(value, :load_path) - value.each_with_index{ |path, i| Valid.path!(path, "load_path #{i}") } + # Paths must be a Hash of names mapped to an Array of valid pathnames. + def paths=(value) + Valid.hash!(value, :paths) + value.each do |name, paths| + paths.each_with_index{ |path, i| Valid.path!(path, "paths[#{name}] ##{i}") } + end super(value) end # List of language engine/version family supported. def engines=(value) @@ -292,10 +293,10 @@ :conflicts => [], :alternatives => [], :resources => [], :repositories => [], :categories => [], - :load_path => ['lib'], + :paths => {'load' => ['lib']}, :copyrights => [] } end private