···1212 target.instance_variable_set('@feeds', {})
1313 end
14141515+ RKEY_REGEXP = /\A[A-Za-z0-9\.\-_:~]+\z/
1616+1517 #
1618 # Registers a feed handler for a given rkey. The full AT URI of the feed generator, which is
1719 # listed in `describeFeedGenerator` and expected in the `feed` parameter to `getFeedSkeleton`
···6870 private
69717072 def validate_key(key)
7171- raise InvalidKeyError, "Key must be a string" unless key.is_a?(String)
7373+ raise InvalidKeyError, "Key must be a string (got: #{key.inspect})" unless key.is_a?(String)
7274 raise InvalidKeyError, "Key must not be empty" if key == ''
7373- raise InvalidKeyError, "Key must not contain a slash" if key.include?('/')
7474- raise InvalidKeyError, "Key must not be longer than 15 characters" if key.length > 15
7575+ raise InvalidKeyError, "Key must not be longer than 15 characters (got: #{key.inspect})" if key.length > 15
7676+ raise InvalidKeyError, "Key #{key.inspect} contains invalid characters" if key !~ RKEY_REGEXP
7577 end
76787779 private_class_method :extended