We git.zxq.co now

This commit is contained in:
Howl 2016-04-19 16:07:27 +02:00
parent 7387ed4295
commit 32029d963e
15 changed files with 24 additions and 21 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
rippleapi
api
api.conf

View File

@ -5,8 +5,8 @@ import (
"encoding/json"
"io/ioutil"
"git.zxq.co/ripple/rippleapi/common"
"github.com/gin-gonic/gin"
"github.com/osuripple/api/common"
)
// Method wraps an API method to a HandlerFunc.

View File

@ -3,11 +3,11 @@ package app
import (
"database/sql"
"git.zxq.co/ripple/rippleapi/app/internals"
"git.zxq.co/ripple/rippleapi/app/v1"
"git.zxq.co/ripple/rippleapi/common"
"github.com/gin-gonic/contrib/gzip"
"github.com/gin-gonic/gin"
"github.com/osuripple/api/app/internals"
"github.com/osuripple/api/app/v1"
"github.com/osuripple/api/common"
)
// Start begins taking HTTP connections.

View File

@ -5,7 +5,7 @@ import (
"database/sql"
"fmt"
"github.com/osuripple/api/common"
"git.zxq.co/ripple/rippleapi/common"
)
// GetTokenFull retrieves an user ID and their token privileges knowing their API token.

View File

@ -1,8 +1,8 @@
package v1
import (
"git.zxq.co/ripple/rippleapi/common"
"github.com/gin-gonic/gin"
"github.com/osuripple/api/common"
)
type response404 struct {

View File

@ -3,7 +3,7 @@ package v1
import (
"database/sql"
"github.com/osuripple/api/common"
"git.zxq.co/ripple/rippleapi/common"
)
type singleBadge struct {

View File

@ -3,7 +3,7 @@ package v1
import (
"strings"
"github.com/osuripple/api/common"
"git.zxq.co/ripple/rippleapi/common"
)
// Boilerplate errors

View File

@ -5,7 +5,7 @@ import (
"strconv"
"time"
"github.com/osuripple/api/common"
"git.zxq.co/ripple/rippleapi/common"
)
type friendData struct {

View File

@ -1,6 +1,6 @@
package v1
import "github.com/osuripple/api/common"
import "git.zxq.co/ripple/rippleapi/common"
type setAllowedData struct {
UserID int `json:"user_id"`

View File

@ -10,7 +10,7 @@ import (
"syscall"
"time"
"github.com/osuripple/api/common"
"git.zxq.co/ripple/rippleapi/common"
)
// MetaRestartGET restarts the API with Zero Downtime™.
@ -69,13 +69,16 @@ func MetaUpdateGET(md common.MethodData) common.CodeMessager {
return common.SimpleResponse(500, "instance is not using git")
}
go func() {
if !execCommand("git", "pull", "origin", "master") {
return
}
// go get
// -u: update all dependencies (including API source)
// -u: update all dependencies
// -d: stop after downloading deps
if !execCommand("go", "get", "-u", "-d") {
return
}
if !execCommand("go", "build") {
if !execCommand("go", "build", "-o", "-v", "api") {
return
}

View File

@ -4,7 +4,7 @@ import (
"math/rand"
"time"
"github.com/osuripple/api/common"
"git.zxq.co/ripple/rippleapi/common"
)
var rn = rand.New(rand.NewSource(time.Now().UnixNano()))

View File

@ -1,7 +1,7 @@
package v1
import (
"github.com/osuripple/api/common"
"git.zxq.co/ripple/rippleapi/common"
)
type privilegesData struct {

View File

@ -5,7 +5,7 @@ import (
"database/sql"
"fmt"
"github.com/osuripple/api/common"
"git.zxq.co/ripple/rippleapi/common"
"golang.org/x/crypto/bcrypt"
)

View File

@ -8,8 +8,8 @@ import (
"strings"
"time"
"git.zxq.co/ripple/rippleapi/common"
"github.com/gin-gonic/gin"
"github.com/osuripple/api/common"
)
type userData struct {

View File

@ -9,12 +9,11 @@ import (
"syscall"
"time"
"git.zxq.co/ripple/rippleapi/app"
"git.zxq.co/ripple/rippleapi/common"
"github.com/rcrowley/goagain"
// Golint pls dont break balls
_ "github.com/go-sql-driver/mysql"
"github.com/osuripple/api/app"
"github.com/osuripple/api/common"
"github.com/rcrowley/goagain"
)
func init() {