Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

merges v0.12.7 into development #1350

Merged
merged 23 commits into from
Oct 3, 2018
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixed a few lint issues
markbates committed Oct 3, 2018
commit 63a02c7b77146dd5e7d878440b5b633ac3bfae85
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM gobuffalo/buffalo:development
FROM gobuffalo/buffalo:latest

ARG CODECOV_TOKEN
ARG CI
2 changes: 1 addition & 1 deletion render/sse.go
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ func (es *EventSource) Flush() {
// CloseNotify return true across the channel when the connection
// in the browser has been severed.
func (es *EventSource) CloseNotify() <-chan bool {
return es.w.(http.CloseNotifier).CloseNotify()
return es.w.(closeNotifier).CloseNotify()
}

// NewEventSource returns a new EventSource instance while ensuring
6 changes: 5 additions & 1 deletion response.go
Original file line number Diff line number Diff line change
@@ -45,9 +45,13 @@ func (w *Response) Flush() {
}
}

type closeNotifier interface {
CloseNotify() <-chan bool
}

// CloseNotify implements the http.CloseNotifier interface
func (w *Response) CloseNotify() <-chan bool {
if cn, ok := w.ResponseWriter.(http.CloseNotifier); ok {
if cn, ok := w.ResponseWriter.(closeNotifier); ok {
return cn.CloseNotify()
}
return nil
20 changes: 10 additions & 10 deletions router_test.go
Original file line number Diff line number Diff line change
@@ -617,17 +617,17 @@ func Test_ResourceOnResource(t *testing.T) {
func Test_buildRouteName(t *testing.T) {
r := require.New(t)
cases := map[string]string{
"/": "root",
"/users": "users",
"/users/new": "newUsers",
"/users/{user_id}": "user",
"/users/{user_id}/children": "userChildren",
"/users/{user_id}/children/{child_id}": "userChild",
"/users/{user_id}/children/new": "newUserChildren",
"/": "root",
"/users": "users",
"/users/new": "newUsers",
"/users/{user_id}": "user",
"/users/{user_id}/children": "userChildren",
"/users/{user_id}/children/{child_id}": "userChild",
"/users/{user_id}/children/new": "newUserChildren",
"/users/{user_id}/children/{child_id}/build": "userChildBuild",
"/admin/planes": "adminPlanes",
"/admin/planes/{plane_id}": "adminPlane",
"/admin/planes/{plane_id}/edit": "editAdminPlane",
"/admin/planes": "adminPlanes",
"/admin/planes/{plane_id}": "adminPlane",
"/admin/planes/{plane_id}/edit": "editAdminPlane",
}

a := New(Options{})