Skip to content

Commit

Permalink
Add test script, update CHANGES and .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dghubble committed Apr 20, 2016
1 parent fe072b5 commit 145776c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
language: go
sudo: false
go:
- 1.5
- 1.5.3
- 1.6
- 1.5.4
- 1.6.1
- tip
before_install:
- go get github.com/golang/lint/golint
install:
- go get github.com/golang/lint/golint
- go get -v -t .
script:
- go test -v .
- go vet ./...
- golint ./...
- ./test
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## latest

* Use the HMACSigner as the default signer. This is the same signing behavior as in previous versions.
* Added a Signer field to the Config to allow custom Signer implementations.s
* Added an RSASigner.
* Added missing Authorization Header quotes around OAuth parameter values. Many providers allowed these quotes to be missing.
* Internalized `Signer` (as `auther`) which created Authorization Headers
- `SetAccessTokenAuthHeader`, `SetRequestAuthHeader`, and `SetRequestTokenAuthHeader` are no longer exposed.

Expand Down
19 changes: 19 additions & 0 deletions test
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash -e

go test . -cover
go vet ./...

echo "Checking gofmt..."
FORMATTABLE="$(find . -type f -name '*.go')"
fmtRes=$(gofmt -l $FORMATTABLE)
if [ -n "${fmtRes}" ]; then
echo -e "gofmt checking failed:\n${fmtRes}"
exit 2
fi

echo "Checking golint..."
lintRes=$(go list ./... | xargs -n 1 golint)
if [ -n "${lintRes}" ]; then
echo -e "golint checking failed:\n${lintRes}"
exit 2
fi

0 comments on commit 145776c

Please sign in to comment.