lib/percheron/validators/stack.rb in percheron-0.6.4 vs lib/percheron/validators/stack.rb in percheron-0.7.0

- old
+ new

@@ -8,27 +8,25 @@ def valid? message = rules.return { |rule| send(rule) } if message - raise Errors::StackInvalid.new(message) + fail Errors::StackInvalid, message else true end end private attr_reader :stack def rules - [ - :validate_name - ] + [ :validate_name ] end def validate_name - 'Name is invalid' if stack.name.nil? || !stack.name.to_s.match(/[\w\d]{3,}/) + 'Stack name is invalid' if stack.name.nil? || !stack.name.to_s.match(/[\w\d]{3,}/) end end end end