From 40b22822fcc082164b200d075708f00d977df67a Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 24 Mar 2014 11:44:47 -0400 Subject: [PATCH 1/2] Update README --- README.md | 1 + README_ZH.md | 1 + models/repo.go | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 104b7eab55..a39a92a322 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ There are two ways to install Gogs: - Mail Service, modules design is inspired by [WeTalk](https://github.com/beego/wetalk). - System Monitor Status is inspired by [GoBlog](https://github.com/fuxiaohei/goblog). - Usage and modification from [beego](http://beego.me) modules. +- Thanks [gobuild.io](http://gobuild.io) for providing binary compile and download service. ## Contributors diff --git a/README_ZH.md b/README_ZH.md index 838e30a0ef..440f952f86 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -49,6 +49,7 @@ Gogs 完全使用 Go 语言来实现对 Git 数据的操作,实现 **零** 依 - 基于 [GoBlog](https://github.com/fuxiaohei/goblog) 修改的系统监视状态。 - [beego](http://beego.me) 模块的使用与修改。 - [martini](http://martini.codegangsta.io/) 的路由与中间件机制。 +- 感谢 [gobuild.io](http://gobuild.io) 提供二进制编译与下载服务。 ## 贡献成员 diff --git a/models/repo.go b/models/repo.go index a76966b057..ff9090df36 100644 --- a/models/repo.go +++ b/models/repo.go @@ -109,7 +109,7 @@ func IsRepositoryExist(user *User, repoName string) (bool, error) { var ( // Define as all lower case!! - illegalPatterns = []string{"[.][Gg][Ii][Tt]", "user", "help", "stars", "issues", "pulls", "commits", "admin", "repo", "template", "admin"} + illegalPatterns = []string{"[.][Gg][Ii][Tt]", "raw", "user", "help", "stars", "issues", "pulls", "commits", "admin", "repo", "template", "admin"} ) // IsLegalName returns false if name contains illegal characters. From 6337d3bf193491aeb9f6a03b260e7c7089c59f76 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 24 Mar 2014 11:58:46 -0400 Subject: [PATCH 2/2] Show dashbard --- modules/base/conf.go | 4 ++-- serve.go | 2 +- web.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/base/conf.go b/modules/base/conf.go index b4e0de97bd..d3122a5339 100644 --- a/modules/base/conf.go +++ b/modules/base/conf.go @@ -100,7 +100,7 @@ func newService() { Service.EnableCacheAvatar = Cfg.MustBool("service", "ENABLE_CACHE_AVATAR", false) } -func NewLogService() { +func newLogService() { // Get and check log mode. LogMode = Cfg.MustValue("log", "MODE", "console") modeSec := "log." + LogMode @@ -296,7 +296,7 @@ func NewConfigContext() { func NewServices() { newService() - NewLogService() + newLogService() newCacheService() newSessionService() newMailService() diff --git a/serve.go b/serve.go index 06815b65df..c3eb233c76 100644 --- a/serve.go +++ b/serve.go @@ -45,6 +45,7 @@ gogs serv provide access auth for repositories`, } func init() { + os.MkdirAll("log", os.ModePerm) log.NewLogger(10000, "file", fmt.Sprintf(`{"filename":"%s"}`, "log/serv.log")) } @@ -72,7 +73,6 @@ func runServ(k *cli.Context) { base.NewConfigContext() models.LoadModelsConfig() models.NewEngine() - base.NewLogService() keys := strings.Split(os.Args[2], "-") if len(keys) != 2 { diff --git a/web.go b/web.go index 9717c9384a..70da899a79 100644 --- a/web.go +++ b/web.go @@ -89,7 +89,7 @@ func runWeb(*cli.Context) { reqSignOut := middleware.Toggle(&middleware.ToggleOptions{SignOutRequire: true}) // Routers. - m.Get("/", reqSignIn, routers.Home) + m.Get("/", ignSignIn, routers.Home) m.Get("/issues", reqSignIn, user.Issues) m.Get("/pulls", reqSignIn, user.Pulls) m.Get("/stars", reqSignIn, user.Stars)