Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ version: 2
jobs:
build:
docker:
- image: circleci/golang:1.8
- image: circleci/golang:1.9
working_directory: /go/src/github.com/gocardless/draupnir
environment:
TEST_RESULTS: /tmp/test-results
steps:
- checkout
- run: mkdir -p $TEST_RESULTS
- run: go get github.com/mattn/gom
- run: gom install
- run: go get github.com/golang/dep/cmd/dep
- run: dep ensure -vendor-only
- run: make test
- run: make build-production
- run: make client
Expand Down
10 changes: 0 additions & 10 deletions Gomfile

This file was deleted.

10 changes: 0 additions & 10 deletions Gomfile.lock

This file was deleted.

92 changes: 92 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 58 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"


[[constraint]]
name = "github.com/gorilla/mux"
version = "1.5.0"

[[constraint]]
name = "github.com/google/jsonapi"
revision = "925ebf2136461bb9d121340ec95a719bf9073d1c"

[[constraint]]
name = "github.com/kelseyhightower/envconfig"
version = "1.3.0"

[[constraint]]
branch = "master"
name = "github.com/lib/pq"

[[constraint]]
name = "github.com/stretchr/testify"
version = "1.1.4"

[[constraint]]
name = "github.com/urfave/cli"
version = "1.20.0"

[[constraint]]
branch = "master"
name = "golang.org/x/net"

[[constraint]]
branch = "master"
name = "golang.org/x/oauth2"

[[constraint]]
branch = "master"
name = "google.golang.org/api"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Prerequisites:
- Go
- Postgresql

Install [gom](https://github.com/mattn/gom)
Install [dep](https://github.com/golang/dep)
```
go get github.com/mattn/gom
brew install dep
```

Install dependencies
```
gom install
dep ensure
```

Create the database
Expand Down
2 changes: 1 addition & 1 deletion models/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ type Instance struct {
func NewInstance(imageID int, email string) Instance {
return Instance{
ImageID: imageID,
UserEmail: email,
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
UserEmail: email,
}
}
2 changes: 1 addition & 1 deletion routes/fakes.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (f FakeAuthenticator) AuthenticateRequest(r *http.Request) (string, error)
type AllowAll struct{}

func (a AllowAll) AuthenticateRequest(r *http.Request) (string, error) {
return "hmac@gocardless.com", nil
return "test@draupnir", nil
}

type FakeOAuthClient struct {
Expand Down
12 changes: 6 additions & 6 deletions routes/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ var createInstanceFixture = jsonapi.OnePayload{
Type: "instances",
ID: "1",
Attributes: map[string]interface{}{
"image_id": 1,
"image_id": float64(1),
"created_at": "2016-01-01T12:33:44Z",
"updated_at": "2016-01-01T12:33:44Z",
"port": 0,
"port": float64(0),
},
},
}
Expand All @@ -75,9 +75,9 @@ var listInstancesFixture = jsonapi.ManyPayload{
Type: "instances",
ID: "1",
Attributes: map[string]interface{}{
"image_id": 1,
"image_id": float64(1),
"created_at": "2016-01-01T12:33:44Z",
"port": 5432,
"port": float64(5432),
"updated_at": "2016-01-01T12:33:44Z",
},
},
Expand All @@ -89,9 +89,9 @@ var getInstanceFixture = jsonapi.OnePayload{
Type: "instances",
ID: "1",
Attributes: map[string]interface{}{
"image_id": 1,
"image_id": float64(1),
"created_at": "2016-01-01T12:33:44Z",
"port": 5432,
"port": float64(5432),
"updated_at": "2016-01-01T12:33:44Z",
},
},
Expand Down
Loading