openSUSE/open-build-service

View on GitHub
src/api/config/routes.rb

Summary

Maintainability
A
0 mins
Test Coverage
require_relative 'routes/routes_helper'

class ActionDispatch::Routing::Mapper
  def draw(routes_name)
    instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}_routes.rb")))
  end
end

OBSApi::Application.routes.draw do
  mount Peek::Railtie => '/peek'
  draw :webui
  draw :api
end