From 92cfc590db8770e415d9dfba625bb06f4b1ed666 Mon Sep 17 00:00:00 2001 From: Igor Dolzhikov Date: Thu, 19 Apr 2018 03:18:19 +0700 Subject: [PATCH 1/3] update backer package --- Gopkg.lock | 6 +++--- Gopkg.toml | 2 +- pkg/handlers/tournament_test.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 71d4ecb..c151438 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -14,8 +14,8 @@ [[projects]] name = "github.com/takama/backer" packages = [".","datastore","helper","model","player","tournament"] - revision = "c8c0b811906d23f0378aeab5d3752ad447090462" - version = "v0.3.9" + revision = "ddbe44306be6ff645cca49563fc35afacf66c844" + version = "v0.4.0" [[projects]] name = "github.com/takama/bit" @@ -26,6 +26,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "7bc4dade6bb89cf1b48e3d4b13764eaa2886e31314323fa559ddac2b2f2e13a8" + inputs-digest = "0d3c2a891f22afebf61bdc3518910ec5c38be31a785cb9c02caff805a3749d05" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 626a5f0..244e3d7 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -35,4 +35,4 @@ [[constraint]] name = "github.com/takama/backer" - version = "v0.3.9" + version = "v0.4.0" diff --git a/pkg/handlers/tournament_test.go b/pkg/handlers/tournament_test.go index 4b28b53..f9104e4 100644 --- a/pkg/handlers/tournament_test.go +++ b/pkg/handlers/tournament_test.go @@ -235,7 +235,7 @@ func TestTournamentResult(t *testing.T) { testHandlerWithParams(t, map[string]string{":id": "1", "data": `{"player": "p1"}`}, h, h.TournamentJoin, - http.StatusOK, `{"id":1,"deposit":300,"is_finished":false,"bidders":[{"id":"p1","winner":false,"prize":0,"backers":null}]}`) + http.StatusOK, `{"id":1,"deposit":300,"is_finished":false,"bidders":[{"id":"p1","winner":false,"prize":0,"backers":[]}]}`) stub.ErrFind = append(stub.ErrFind, ErrTestError, nil) testHandlerWithParams(t, @@ -258,7 +258,7 @@ func TestTournamentResult(t *testing.T) { testHandlerWithParams(t, map[string]string{":id": "1", "data": `{"winners": [{"player": "p1", "prize": 300}]}`}, h, h.TournamentResult, - http.StatusOK, `{"id":1,"deposit":300,"is_finished":true,"bidders":[{"id":"p1","winner":true,"prize":300,"backers":null}]}`) + http.StatusOK, `{"id":1,"deposit":300,"is_finished":true,"bidders":[{"id":"p1","winner":true,"prize":300,"backers":[]}]}`) testHandlerWithParams(t, map[string]string{":id": "1", "data": `{"winners": [{"player": "p1", "prize": 300}]}`}, From 4809862f149a7bf6cfa55a534b7a069534371fb5 Mon Sep 17 00:00:00 2001 From: Igor Dolzhikov Date: Thu, 19 Apr 2018 03:29:07 +0700 Subject: [PATCH 2/3] Installation steps --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 8d19635..16e1ed2 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,20 @@ Back a friend service: used [backer](https://github.com/takama/backer) package/library +## Installation + +Build and run + +```sh +make run +``` + +Or pull from docker registry and run + +```sh +docker-compose up -d +``` + ## Known restrictions 1. A several verifications of input attributes skipped due to complicating the task From 82b379cbfb28a860e50c7932419830e341475f76 Mon Sep 17 00:00:00 2001 From: Igor Dolzhikov Date: Thu, 19 Apr 2018 03:29:47 +0700 Subject: [PATCH 3/3] Bumped version number to v0.3.0 --- .env | 2 +- Makefile | 2 +- docs/CHANGELOG.md | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.env b/.env index 7700e91..11dcd29 100644 --- a/.env +++ b/.env @@ -3,7 +3,7 @@ APP=backfriend REGISTRY=takama # Service version -RELEASE=v0.2.0 +RELEASE=v0.3.0 # service infrastructure # Namespace: dev, prod, release, cte, username ... diff --git a/Makefile b/Makefile index 969c060..d72ba61 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ REGISTRY?=takama CA_DIR?=certs # Use the v0.0.0 tag for testing, it shouldn't clobber any release builds -RELEASE?=v0.2.0 +RELEASE?=v0.3.0 GOOS?=linux GOARCH?=amd64 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 4f61dd4..4b86573 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,4 +1,11 @@ -# Version v0.2.0 +# Version v0.3.0 + +## v0.3.0 + +### Codebase changes in v0.3.0 + +- Added tournament handlers and test interactions with players ([#16](https://github.com/takama/back-friend/issues/16), [@takama](https://github.com/takama)) +- Integrated backer package and added player handlers ([#15](https://github.com/takama/back-friend/issues/15), [@takama](https://github.com/takama)) ## v0.2.0