moved 0.5 out of feature flag, removed deprecated 0.4 code and features

This commit is contained in:
Brad Rydzewski
2016-04-28 14:10:32 -07:00
parent 73f9c44d7f
commit 4d4003a9a1
27 changed files with 120 additions and 1747 deletions

View File

@@ -1,28 +0,0 @@
package middleware
import (
"sync"
"github.com/drone/drone/engine"
"github.com/drone/drone/store"
"github.com/gin-gonic/gin"
)
// Engine is a middleware function that initializes the Engine and attaches to
// the context of every http.Request.
func Engine() gin.HandlerFunc {
var once sync.Once
var engine_ engine.Engine
return func(c *gin.Context) {
once.Do(func() {
store_ := store.FromContext(c)
engine_ = engine.Load(store_)
})
engine.ToContext(c, engine_)
c.Next()
}
}