lib/jets/router.rb in jets-1.5.8 vs lib/jets/router.rb in jets-1.5.9

- old
+ new

@@ -9,9 +9,17 @@ @routes = [] end def draw(&block) instance_eval(&block) + check_collision! + end + + # Validate routes that deployable + def check_collision! + collision = Jets::Resource::ApiGateway::RestApi::Routes::Collision.new(self.routes) + collide = collision.collision? + raise collision.exception if collide end # Methods supported by API Gateway %w[any delete get head options patch post put].each do |method_name| define_method method_name do |path, options|