Skip to content

Commit

Permalink
Merge pull request #257 from adamryman/remove-gendoc
Browse files Browse the repository at this point in the history
Fix #256; update dependencies and resolve related conflicts
  • Loading branch information
zaquestion committed May 27, 2018
2 parents 6ba4ad0 + ecb079e commit ed77dd8
Show file tree
Hide file tree
Showing 582 changed files with 331,811 additions and 12,202 deletions.
10 changes: 3 additions & 7 deletions .travis.yml
Expand Up @@ -13,15 +13,11 @@ go_import_path: github.com/tuneinc/truss
before_install:
# protobuf
# download, unzip in $HOME, add to $PATH
- wget https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
- mv protoc-3.2.0-linux-x86_64.zip $HOME
- unzip ~/protoc-3.2.0-linux-x86_64.zip -d $HOME
- wget https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip
- mv protoc-3.5.1-linux-x86_64.zip $HOME
- unzip ~/protoc-3.5.1-linux-x86_64.zip -d $HOME
- export PATH=$HOME/bin/:$PATH

# Dependencies
- go get -v github.com/golang/protobuf/protoc-gen-go
- go get -v github.com/jteeuwen/go-bindata/...

install:
# install our protoc plugin and truss
- make dependencies
Expand Down
183 changes: 183 additions & 0 deletions Gopkg.lock

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

69 changes: 69 additions & 0 deletions Gopkg.toml
@@ -0,0 +1,69 @@
# 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"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true

# Used by generated code
required = [
"github.com/go-kit/kit/transport/http",
"github.com/go-kit/kit/transport/grpc",
"github.com/gorilla/mux"
]

[[constraint]]
name = "github.com/Sirupsen/logrus"
version = "1.0.5"

[[constraint]]
name = "github.com/davecgh/go-spew"
version = "1.1.0"

[[constraint]]
name = "github.com/golang/protobuf"
version = "1.1.0"

[[constraint]]
name = "github.com/pkg/errors"
version = "0.8.0"

[[constraint]]
name = "github.com/pmezard/go-difflib"
version = "1.0.0"

[[constraint]]
name = "github.com/spf13/pflag"
version = "1.0.1"

[prune]
go-tests = true
unused-packages = true
non-go = true

[[constraint]]
version = "0.7.0"
name = "github.com/go-kit/kit"

[[constraint]]
version = "1.6.2"
name = "github.com/gorilla/mux"
8 changes: 1 addition & 7 deletions Makefile
Expand Up @@ -9,11 +9,6 @@ VERSION_DATE := $(shell $(MAKEFILE_PATH)/commit_date.sh)
default: truss

dependencies:
go get github.com/golang/protobuf/protoc-gen-go
go get github.com/golang/protobuf/proto
go get github.com/jteeuwen/go-bindata/...

update-dependencies:
go get -u github.com/golang/protobuf/protoc-gen-go
go get -u github.com/golang/protobuf/proto
go get -u github.com/jteeuwen/go-bindata/...
Expand All @@ -22,9 +17,8 @@ update-dependencies:
gobindata:
go generate github.com/tuneinc/truss/gengokit/template

# Install truss and protoc-gen-truss-protocast
# Install truss
truss: gobindata
go install github.com/tuneinc/truss/cmd/protoc-gen-truss-protocast
go install -ldflags '-X "main.Version=$(SHA)" -X "main.VersionDate=$(VERSION_DATE)"' github.com/tuneinc/truss/cmd/truss

# Run the go tests and the truss integration tests
Expand Down
5 changes: 0 additions & 5 deletions README.md
Expand Up @@ -16,11 +16,6 @@ To install this software, you must:
download a release from [github](https://github.com/google/protobuf/releases)
and add to `$PATH`.
Otherwise [install from source.](https://github.com/google/protobuf)
1. Install the `protoc-gen-go` package (must be in `$PATH`).

```
go get -u github.com/golang/protobuf/protoc-gen-go
```
1. Install Truss with

```
Expand Down
3 changes: 0 additions & 3 deletions TUTORIAL.md
Expand Up @@ -74,8 +74,6 @@ In your terminal, go to the folder containing echo.proto and run `truss *.proto`
| │   │   └── main.go
| │   └── echo-server
| │   └── main.go
| ├── docs
| │   └── docs.md
| ├── echo.pb.go
| ├── handlers
| │   ├── handlers.go
Expand All @@ -86,7 +84,6 @@ In your terminal, go to the folder containing echo.proto and run `truss *.proto`
└── echo.proto
```
From the top down, within `echo-service/`:
- `docs/` contains the generated documentation of the service API
- `svc/` contains the wiring and encoding protocols necessary for service communication (generated code)
- `handlers/handlers.go` is populated with stubs where you will add the business logic
- `cmd/echo/` contains the client side CLI (useful for testing)
Expand Down
17 changes: 7 additions & 10 deletions cmd/_integration-tests/Makefile
Expand Up @@ -23,29 +23,26 @@ test: clean test-transport test-middlewares test-cli
truss:
go install -ldflags '-X "main.Version=$(SHA)" -X "main.VersionDate=$(VERSION_DATE)"' github.com/tuneinc/truss/cmd/truss

protoc-gen-truss-protocast:
go build -o protoc-gen-truss-protocast github.com/tuneinc/truss/cmd/protoc-gen-truss-protocast

test-transport: protoc-gen-truss-protocast truss
test-transport: truss
@which truss
@printf '$(TRANSPORT_TEST_MSG)'
$(MAKE) -C transport
rm -f ./truss ./protoc-gen-truss-protocast
rm -f ./truss

test-middlewares: protoc-gen-truss-protocast truss
test-middlewares: truss
@which truss
@printf '$(MIDDLEWARES_TEST_MSG)'
$(MAKE) -C middlewares
rm -f ./truss ./protoc-gen-truss-protocast
rm -f ./truss

test-cli: protoc-gen-truss-protocast truss
test-cli: truss
@which truss
@printf '$(CLI_TEST_MSG)'
go test -v ./cli
rm -f ./truss ./protoc-gen-truss-protocast
rm -f ./truss

clean:
rm -f ./truss ./protoc-gen-truss-protocast
rm -f ./truss
go test ./cli -clean
$(MAKE) -C transport clean
$(MAKE) -C middlewares clean
Expand Down
2 changes: 1 addition & 1 deletion cmd/_integration-tests/transport/http_test.go
Expand Up @@ -372,7 +372,7 @@ func TestStrangeRPCName(t *testing.T) {

var want *pb.Empty
want = &pb.Empty{}
if resp != want {
if !reflect.DeepEqual(*resp, *want) {
t.Fatalf("Expect: %d, got %d", want, resp)
}
}
Expand Down

0 comments on commit ed77dd8

Please sign in to comment.