git.iko.soy/typeable/oauth2-proxy
on master help sign in
Switch from gpm -> dep for dependency management
commitc4905f234744c0ad0a2695180a127bea80396c30 authorJehiah Czebotar <jehiah@gmail.com> dateTue 31 Oct 2017, 09:12 (9 years ago) parent363a0dd
8 files changed+182−34
.gitignore+6−5 .travis.yml+5−5 Godeps−13 Gopkg.lock+117 Gopkg.toml+40 test.sh+12−9 validator_test.go+1−1 validator_watcher_test.go+1−1
.gitignore+6−5
@@ -1,5 +1,10 @@
1−google_auth_proxy
21oauth2_proxy
2+vendor
3+dist
4+.godeps
5+*.exe
6+
7+
38# Go.gitignore
49# Compiled Object files, Static and Dynamic libs (Shared Objects)
510*.o
@@ -22,9 +27,5 @@ _cgo_export.*
2227
2328_testmain.go
2429
25−*.exe
26−dist
27−.godeps
28−
2930# Editor swap/temp files
3031.*.swp
.travis.yml+5−5
@@ -1,11 +1,11 @@
11language: go
22go:
3− - 1.7.5
4− - 1.8.1
3+ - 1.8.x
4+ - 1.9.x
55script:
6− - curl -s https://raw.githubusercontent.com/pote/gpm/v1.4.0/bin/gpm > gpm
7− - chmod +x gpm
8− - ./gpm install
6+ - wget -O dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64
7+ - chmod +x dep
8+ - ./dep ensure
99 - ./test.sh
1010sudo: false
1111notifications:
Godepsdeleted−13
@@ -1,13 +0,0 @@
1−github.com/mbland/hmacauth 1.0.2
2−github.com/BurntSushi/toml d94612f9fc140360834f9742158c70b5c5b5535b
3−github.com/bitly/go-simplejson da1a8928f709389522c8023062a3739f3b4af419
4−github.com/mreiferson/go-options 77551d20752b54535462404ad9d877ebdb26e53d
5−github.com/stretchr/testify v1.1.4
6−gopkg.in/fsnotify.v1 v1.2.0
7−golang.org/x/oauth2 7fdf09982454086d5570c7db3e11f360194830ca
8−golang.org/x/net/context 242b6b35177ec3909636b6cf6a47e8c2c6324b5d
9−google.golang.org/api/admin/directory/v1 650535c7d6201e8304c92f38c922a9a3a36c6877
10−cloud.google.com/go/compute/metadata v0.7.0
11−github.com/coreos/go-oidc c797a55f1c1001ec3169f1d0fbb4c5523563bec6
12−gopkg.in/square/go-jose.v2 v2.1.1
13−github.com/pquerna/cachecontrol 9299cc36e57c32f83e47ffb3c25d8a3dec10ea0b
Gopkg.locknew file+117
@@ -0,0 +1,117 @@
1+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
2+
3+
4+[[projects]]
5+ name = "cloud.google.com/go"
6+ packages = ["compute/metadata"]
7+ revision = "2d3a6656c17a60b0815b7e06ab0be04eacb6e613"
8+ version = "v0.16.0"
9+
10+[[projects]]
11+ name = "github.com/BurntSushi/toml"
12+ packages = ["."]
13+ revision = "b26d9c308763d68093482582cea63d69be07a0f0"
14+ version = "v0.3.0"
15+
16+[[projects]]
17+ name = "github.com/bitly/go-simplejson"
18+ packages = ["."]
19+ revision = "aabad6e819789e569bd6aabf444c935aa9ba1e44"
20+ version = "v0.5.0"
21+
22+[[projects]]
23+ branch = "v2"
24+ name = "github.com/coreos/go-oidc"
25+ packages = ["."]
26+ revision = "77e7f2010a464ade7338597afe650dfcffbe2ca8"
27+
28+[[projects]]
29+ name = "github.com/davecgh/go-spew"
30+ packages = ["spew"]
31+ revision = "346938d642f2ec3594ed81d874461961cd0faa76"
32+ version = "v1.1.0"
33+
34+[[projects]]
35+ branch = "master"
36+ name = "github.com/golang/protobuf"
37+ packages = ["proto"]
38+ revision = "1e59b77b52bf8e4b449a57e6f79f21226d571845"
39+
40+[[projects]]
41+ name = "github.com/mbland/hmacauth"
42+ packages = ["."]
43+ revision = "107c17adcc5eccc9935cd67d9bc2feaf5255d2cb"
44+ version = "1.0.2"
45+
46+[[projects]]
47+ branch = "master"
48+ name = "github.com/mreiferson/go-options"
49+ packages = ["."]
50+ revision = "77551d20752b54535462404ad9d877ebdb26e53d"
51+
52+[[projects]]
53+ name = "github.com/pmezard/go-difflib"
54+ packages = ["difflib"]
55+ revision = "792786c7400a136282c1664665ae0a8db921c6c2"
56+ version = "v1.0.0"
57+
58+[[projects]]
59+ branch = "master"
60+ name = "github.com/pquerna/cachecontrol"
61+ packages = [".","cacheobject"]
62+ revision = "0dec1b30a0215bb68605dfc568e8855066c9202d"
63+
64+[[projects]]
65+ name = "github.com/stretchr/testify"
66+ packages = ["assert"]
67+ revision = "69483b4bd14f5845b5a1e55bca19e954e827f1d0"
68+ version = "v1.1.4"
69+
70+[[projects]]
71+ branch = "master"
72+ name = "golang.org/x/crypto"
73+ packages = ["ed25519","ed25519/internal/edwards25519"]
74+ revision = "9f005a07e0d31d45e6656d241bb5c0f2efd4bc94"
75+
76+[[projects]]
77+ branch = "master"
78+ name = "golang.org/x/net"
79+ packages = ["context","context/ctxhttp"]
80+ revision = "9dfe39835686865bff950a07b394c12a98ddc811"
81+
82+[[projects]]
83+ branch = "master"
84+ name = "golang.org/x/oauth2"
85+ packages = [".","google","internal","jws","jwt"]
86+ revision = "9ff8ebcc8e241d46f52ecc5bff0e5a2f2dbef402"
87+
88+[[projects]]
89+ branch = "master"
90+ name = "google.golang.org/api"
91+ packages = ["admin/directory/v1","gensupport","googleapi","googleapi/internal/uritemplates"]
92+ revision = "8791354e7ab150705ede13637a18c1fcc16b62e8"
93+
94+[[projects]]
95+ name = "google.golang.org/appengine"
96+ packages = [".","internal","internal/app_identity","internal/base","internal/datastore","internal/log","internal/modules","internal/remote_api","internal/urlfetch","urlfetch"]
97+ revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a"
98+ version = "v1.0.0"
99+
100+[[projects]]
101+ name = "gopkg.in/fsnotify.v1"
102+ packages = ["."]
103+ revision = "836bfd95fecc0f1511dd66bdbf2b5b61ab8b00b6"
104+ version = "v1.2.11"
105+
106+[[projects]]
107+ name = "gopkg.in/square/go-jose.v2"
108+ packages = [".","cipher","json"]
109+ revision = "f8f38de21b4dcd69d0413faf231983f5fd6634b1"
110+ version = "v2.1.3"
111+
112+[solve-meta]
113+ analyzer-name = "dep"
114+ analyzer-version = 1
115+ inputs-digest = "efab48a0e196c2a849bfbe9aa02d2ae28d281ce1bfe9f23720d648858eefc8e6"
116+ solver-name = "gps-cdcl"
117+ solver-version = 1
Gopkg.tomlnew file+40
@@ -0,0 +1,40 @@
1+
2+# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
3+# for detailed Gopkg.toml documentation.
4+#
5+
6+[[constraint]]
7+ name = "github.com/18F/hmacauth"
8+ version = "~1.0.1"
9+
10+[[constraint]]
11+ name = "github.com/BurntSushi/toml"
12+ version = "~0.3.0"
13+
14+[[constraint]]
15+ name = "github.com/bitly/go-simplejson"
16+ version = "~0.5.0"
17+
18+[[constraint]]
19+ branch = "v2"
20+ name = "github.com/coreos/go-oidc"
21+
22+[[constraint]]
23+ branch = "master"
24+ name = "github.com/mreiferson/go-options"
25+
26+[[constraint]]
27+ name = "github.com/stretchr/testify"
28+ version = "~1.1.4"
29+
30+[[constraint]]
31+ branch = "master"
32+ name = "golang.org/x/oauth2"
33+
34+[[constraint]]
35+ branch = "master"
36+ name = "google.golang.org/api"
37+
38+[[constraint]]
39+ name = "gopkg.in/fsnotify.v1"
40+ version = "~1.2.0"
test.sh+12−9
@@ -1,11 +1,14 @@
11#!/bin/bash
2−set -e
3−
2+EXIT_CODE=0
43echo "gofmt"
5−diff -u <(echo -n) <(gofmt -d $(find . -type f -name '*.go' -not -path "./.godeps/*"))
6−echo "go vet"
7−go vet ./...
8−echo "go test"
9−go test -timeout 60s ./...
10−echo "go test -race"
11−GOMAXPROCS=4 go test -timeout 60s -race ./...
4+diff -u <(echo -n) <(gofmt -d $(find . -type f -name '*.go' -not -path "./vendor/*")) || EXIT_CODE=1
5+for pkg in $(go list ./... | grep -v '/vendor/' ); do
6+ echo "testing $pkg"
7+ echo "go vet $pkg"
8+ go vet "$pkg" || EXIT_CODE=1
9+ echo "go test -v $pkg"
10+ go test -v -timeout 90s "$pkg" || EXIT_CODE=1
11+ echo "go test -v -race $pkg"
12+ GOMAXPROCS=4 go test -v -timeout 90s0s -race "$pkg" || EXIT_CODE=1
13+done
14+exit $EXIT_CODE
validator_test.go+1−1
@@ -20,7 +20,7 @@ func NewValidatorTest(t *testing.T) *ValidatorTest {
2020 if err != nil {
2121 t.Fatal("failed to create temp file: " + err.Error())
2222 }
23− vt.done = make(chan bool)
23+ vt.done = make(chan bool, 1)
2424 return vt
2525}
2626
validator_watcher_test.go+1−1
@@ -86,7 +86,7 @@ func TestValidatorOverwriteEmailListViaRenameAndReplace(t *testing.T) {
8686
8787 vt.WriteEmails(t, []string{"xyzzy@example.com"})
8888 domains := []string(nil)
89− updated := make(chan bool)
89+ updated := make(chan bool, 1)
9090 validator := vt.NewValidator(domains, updated)
9191
9292 if !validator("xyzzy@example.com") {