示例#1
0
func (t TestRunnerPlugin) OnRoutesLoaded(router *revel.Router) {
	router.Routes = append([]*revel.Route{
		revel.NewRoute("GET", "/@tests", "TestRunner.Index", ""),
		revel.NewRoute("GET", "/@tests.list", "TestRunner.List", ""),
		revel.NewRoute("GET", "/@tests/public/{<.*>filepath}", "Static.ServeModule", "testrunner,public"),
		revel.NewRoute("GET", "/@tests/{suite}/{test}", "TestRunner.Run", ""),
	}, router.Routes...)
	fmt.Println("Go to /@tests to run the tests.")
}
示例#2
0
文件: plugin.go 项目: rverton/revel
func (t TestRunnerPlugin) OnRoutesLoaded(router *revel.Router) {
	router.Routes = append([]*revel.Route{
		revel.NewRoute("GET", "/@tests", "TestRunner.Index"),
		revel.NewRoute("GET", "/@tests.list", "TestRunner.List"),
		revel.NewRoute("GET", "/@tests/public/", "staticDir:testrunner:public"),
		revel.NewRoute("GET", "/@tests/{suite}/{test}", "TestRunner.Run"),
	}, router.Routes...)
	fmt.Println("Go to /@tests to run the tests.")
}
示例#3
0
func (t JobsPlugin) OnRoutesLoaded(router *revel.Router) {
	router.Routes = append([]*revel.Route{
		revel.NewRoute("GET", "/@jobs", "Jobs.Status", ""),
	}, router.Routes...)
	fmt.Println("Go to /@jobs to see job status.")
}