lib/rconf/language.rb in rconf-0.7.8 vs lib/rconf/language.rb in rconf-0.7.9

- old
+ new

@@ -18,10 +18,13 @@ attr_reader :configurators # Errors generated by configurators validations if any attr_reader :validation_errors + # Warnings + attr_reader :warnings + # Load given file and run content to retrieve configurators # # === Parameters # file(String):: Path to file being loaded # @@ -54,10 +57,11 @@ # Initialize configurators and validation errors lists # Do not call directly, instead call 'load' def initialize @configurators = Array.new @validation_errors = Array.new + @warnings = Array.new end # Each missing method should correspond to a configurator section. # Such sections consist of a block which gets eval'ed in the contect of the # corresponding configurator instance. @@ -77,10 +81,10 @@ configurator.instance_eval(&blk) error = configurator.validate @validation_errors << error if error @configurators << configurator else - @validation_errors << "Unknown configurator '#{meth}'" + @warnings << "Unknown configurator '#{meth}'" end else @validation_errors << "Invalid syntax, expecting block after '#{meth}'" end true