vendor: update

- github.com/gogs/go-gogs-client
- gopkg.in/macaron.v1
pull/5340/head^2
Unknwon 2018-12-16 19:48:34 -05:00
parent f91cb9321e
commit c82ac420fc
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
6 changed files with 26 additions and 10 deletions

9
vendor/github.com/gogs/go-gogs-client/media_types.go generated vendored Normal file
View File

@ -0,0 +1,9 @@
// Copyright 2018 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package gogs
const (
MediaApplicationSHA = "application/vnd.gogs.sha"
)

View File

@ -6,6 +6,7 @@ package gogs
import (
"fmt"
"net/http"
)
// CommitMeta contains meta information of a commit in terms of API.
@ -44,3 +45,9 @@ func (c *Client) GetSingleCommit(user, repo, commitID string) (*Commit, error) {
commit := new(Commit)
return commit, c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/commits/%s", user, repo, commitID), nil, nil, &commit)
}
func (c *Client) GetReferenceSHA(user, repo, ref string) (string, error) {
data, err := c.getResponse("GET", fmt.Sprintf("/repos/%s/%s/commits/%s", user, repo, ref),
http.Header{"Accept": []string{MediaApplicationSHA}}, nil)
return string(data), err
}

View File

@ -7,7 +7,7 @@ Package macaron is a high productive and modular web framework in Go.
## Getting Started
The minimum requirement of Go is **1.3**.
The minimum requirement of Go is **1.6**.
To install Macaron:

View File

@ -262,7 +262,7 @@ func (ctx *Context) Params(name string) string {
// SetParams sets value of param with given name.
func (ctx *Context) SetParams(name, val string) {
if !strings.HasPrefix(name, ":") {
if name != "*" && !strings.HasPrefix(name, ":") {
name = ":" + name
}
ctx.params[name] = val
@ -270,7 +270,7 @@ func (ctx *Context) SetParams(name, val string) {
// ReplaceAllParams replace all current params with given params
func (ctx *Context) ReplaceAllParams(params Params) {
ctx.params = params;
ctx.params = params
}
// ParamsEscape returns escapred params result.

View File

@ -32,7 +32,7 @@ import (
"github.com/go-macaron/inject"
)
const _VERSION = "1.3.1.0306"
const _VERSION = "1.3.2.1216"
func Version() string {
return _VERSION

12
vendor/vendor.json vendored
View File

@ -219,10 +219,10 @@
"revisionTime": "2018-12-15T04:53:36Z"
},
{
"checksumSHA1": "LlzYU6W68aX9nJLibQkKFTiY+9Q=",
"checksumSHA1": "81S19W6omjG5N+zVWeI2yRsSfw0=",
"path": "github.com/gogs/go-gogs-client",
"revision": "61758abf1cdb964b69de42a3f83f7148e3f9454d",
"revisionTime": "2018-12-15T05:23:13Z"
"revision": "1cd0db3113de87dbac702b9f1a08d9bd0e7142bb",
"revisionTime": "2018-12-17T00:43:19Z"
},
{
"checksumSHA1": "GaJLoEuMGnP5ofXvuweAI4wx06U=",
@ -711,10 +711,10 @@
"revisionTime": "2016-08-08T14:54:09Z"
},
{
"checksumSHA1": "7c6yCe2PjyV+/qWiPBWUf+j+1us=",
"checksumSHA1": "55kJCeuwX46fYJt2Ww1d7rxMOTo=",
"path": "gopkg.in/macaron.v1",
"revision": "c1be95e6d21e769e44e1ec33cec9da5837861c10",
"revisionTime": "2018-03-06T06:20:08Z"
"revision": "dfcb80ca86e8534962c62812efd93209c7e600e7",
"revisionTime": "2018-12-17T00:30:54Z"
},
{
"checksumSHA1": "6QPjE+qflEBHg+JPJd9e4iQuRAk=",