Repository: gobuffalo/buffalo
Pull request #1840 (2019-11-20 12:30:48)

v0.15.1


Patch:
diff --git a/Dockerfile.build b/Dockerfile.build
index 8a5b6d84..76b095cc 100644
--- a/Dockerfile.build
+++ b/Dockerfile.build
@@ -26,7 +26,7 @@ RUN go get -tags sqlite -v -u github.com/gobuffalo/pop \
 && rm -rf $GOPATH/src && mkdir -p $BP
 
 # Install golangci
-RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0
+RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0
 
 WORKDIR $BP
 
diff --git a/Dockerfile.slim.build b/Dockerfile.slim.build
index 05154778..9647f9a7 100644
--- a/Dockerfile.slim.build
+++ b/Dockerfile.slim.build
@@ -9,8 +9,7 @@ RUN apk add --no-cache --upgrade apk-tools \
 RUN go version && go get -v -u github.com/markbates/deplist/deplist
 
 
-RUN go get -u github.com/golang/dep/cmd/dep \
-&& go get -v -u github.com/gobuffalo/flect \
+RUN go get -v -u github.com/gobuffalo/flect \
 && go get -v -u github.com/gobuffalo/makr \
 && go get -v -u github.com/gobuffalo/packr/v2 \
 && go get -v -u github.com/gobuffalo/tags \
@@ -24,7 +23,7 @@ RUN go get -u github.com/golang/dep/cmd/dep \
 && go get -v -u github.com/gorilla/sessions \
 && go get -v -u golang.org/x/vgo
 
-RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0
+RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0
 
 
 RUN npm i -g --no-progress yarn \
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 64155c6c..c91e8654 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -5,23 +5,22 @@ variables:
   modulePath: "$(GOPATH)/src/github.com/$(build.repository.name)" # Path to the module"s code
 
 jobs:
-
 - job: Windows
   pool:
     vmImage: "vs2017-win2016"
   strategy:
     matrix:
       go 1.12 (on):
-        go_version: "1.12.10"
+        go_version: "1.12.13"
         GO111MODULE: "on"
       go 1.12 (off):
-        go_version: "1.12.10"
+        go_version: "1.12.13"
         GO111MODULE: "off"
-      go 1.13.1 (on):
-        go_version: "1.13.1"
+      go 1.13.4 (on):
+        go_version: "1.13.4"
         GO111MODULE: "on"
-      go 1.13.1 (off):
-        go_version: "1.13.1"
+      go 1.13.4 (off):
+        go_version: "1.13.4"
         GO111MODULE: "off"
   steps:
     - template: azure-tests.yml
@@ -32,16 +31,16 @@ jobs:
   strategy:
     matrix:
       go 1.12 (on):
-        go_version: "1.12.10"
+        go_version: "1.12.13"
         GO111MODULE: "on"
       go 1.12 (off):
-        go_version: "1.12.10"
+        go_version: "1.12.13"
         GO111MODULE: "off"
-      go 1.13.1 (on):
-        go_version: "1.13.1"
+      go 1.13.4 (on):
+        go_version: "1.13.4"
         GO111MODULE: "on"
-      go 1.13.1 (off):
-        go_version: "1.13.1"
+      go 1.13.4 (off):
+        go_version: "1.13.4"
         GO111MODULE: "off"
   steps:
     - template: azure-tests.yml
@@ -52,16 +51,16 @@ jobs:
   strategy:
     matrix:
       go 1.12 (on):
-        go_version: "1.12.10"
+        go_version: "1.12.13"
         GO111MODULE: "on"
       go 1.12 (off):
-        go_version: "1.12.10"
+        go_version: "1.12.13"
         GO111MODULE: "off"
-      go 1.13.1 (on):
-        go_version: "1.13.1"
+      go 1.13.4 (on):
+        go_version: "1.13.4"
         GO111MODULE: "on"
-      go 1.13.1 (off):
-        go_version: "1.13.1"
+      go 1.13.4 (off):
+        go_version: "1.13.4"
         GO111MODULE: "off"
   steps:
     - template: azure-tests.yml
diff --git a/buffalo/cmd/new.go b/buffalo/cmd/new.go
index 6df9a382..b13a3880 100644
--- a/buffalo/cmd/new.go
+++ b/buffalo/cmd/new.go
@@ -81,10 +81,7 @@ func parseNewOptions(args []string) (newAppOptions, error) {
 
 	app.AsAPI = viper.GetBool("api")
 	app.VCS = viper.GetString("vcs")
-	if app.WithDep {
-		app.WithModules = false
-		envy.MustSet("GO111MODULE", "off")
-	}
+
 	app.WithPop = !viper.GetBool("skip-pop")
 	app.WithWebpack = !viper.GetBool("skip-webpack")
 	app.WithYarn = !viper.GetBool("skip-yarn")
diff --git a/genny/assets/webpack/templates/webpack.config.js.tmpl b/genny/assets/webpack/templates/webpack.config.js.tmpl
index c87c4e57..d2f291b6 100644
--- a/genny/assets/webpack/templates/webpack.config.js.tmpl
+++ b/genny/assets/webpack/templates/webpack.config.js.tmpl
@@ -42,8 +42,8 @@ const configurator = {
       new MiniCssExtractPlugin({filename: "[name].[contenthash].css"}),
       new CopyWebpackPlugin([{from: "./assets",to: ""}], {copyUnmodified: true,ignore: ["css/**", "js/**", "src/**"] }),
       new Webpack.LoaderOptionsPlugin({minimize: true,debug: false}),
-      new ManifestPlugin({fileName: "manifest.json"})
-      new CleanObsoleteChunks(),
+      new ManifestPlugin({fileName: "manifest.json"}),
+      new CleanObsoleteChunks()
     ];
 
     return plugins
diff --git a/genny/assets/webpack/webpack.go b/genny/assets/webpack/webpack.go
index 96a8db8f..3d534a91 100644
--- a/genny/assets/webpack/webpack.go
+++ b/genny/assets/webpack/webpack.go
@@ -33,6 +33,12 @@ func New(opts *Options) (*genny.Generator, error) {
 	}
 
 	g.RunFn(func(r *genny.Runner) error {
+		if opts.App.WithYarn {
+			if _, err := r.LookPath("yarnpkg"); err == nil {
+				return nil
+			}
+			// If yarn is not installed, it still can be installed with npm.
+		}
 		if _, err := r.LookPath("npm"); err != nil {
 			return fmt.Errorf("could not find npm executable")
 		}
diff --git a/genny/ci/templates/-dot-gitlab-ci-no-pop.yml.tmpl b/genny/ci/templates/-dot-gitlab-ci-no-pop.yml.tmpl
index 3ea4d35d..e5bd670d 100644
--- a/genny/ci/templates/-dot-gitlab-ci-no-pop.yml.tmpl
+++ b/genny/ci/templates/-dot-gitlab-ci-no-pop.yml.tmpl
@@ -3,12 +3,7 @@ before_script:
   - cd /go/src/{{.opts.App.PackagePkg}}
   - mkdir -p public/assets
   - go get -u github.com/gobuffalo/buffalo/buffalo
-{{- if .opts.App.WithDep }}
-  - go get github.com/golang/dep/cmd/dep
-  - dep ensure
-{{- else }}
   - go get -t -v ./...
-{{- end }}
   - export PATH="$PATH:$GOPATH/bin"
 
 stages:
diff --git a/genny/ci/templates/-dot-gitlab-ci.yml.tmpl b/genny/ci/templates/-dot-gitlab-ci.yml.tmpl
index 17f25ec9..0086a47d 100644
--- a/genny/ci/templates/-dot-gitlab-ci.yml.tmpl
+++ b/genny/ci/templates/-dot-gitlab-ci.yml.tmpl
@@ -8,12 +8,7 @@ before_script:
   - cd /go/src/{{.opts.App.PackagePkg}}
   - mkdir -p public/assets
   - go get -u github.com/gobuffalo/buffalo/buffalo
-{{- if .opts.App.WithDep }}
-  - go get github.com/golang/dep/cmd/dep
-  - dep ensure
-{{- else }}
   - go get -t -v ./...
-{{- end }}
   - export PATH="$PATH:$GOPATH/bin"
 
 stages:
diff --git a/genny/ci/templates/-dot-travis.yml.tmpl b/genny/ci/templates/-dot-travis.yml.tmpl
index 1991d5a2..8b7eb933 100644
--- a/genny/ci/templates/-dot-travis.yml.tmpl
+++ b/genny/ci/templates/-dot-travis.yml.tmpl
@@ -21,11 +21,6 @@ go_import_path: {{.opts.App.PackagePkg}}
 
 install:
   - go get github.com/gobuffalo/buffalo/buffalo
-{{- if .opts.App.WithDep }}
-  - go get github.com/golang/dep/cmd/dep
-  - dep ensure
-{{- else }}
   - go get $(go list ./... | grep -v /vendor/)
-{{- end }}
 
 script: buffalo test
diff --git a/genny/docker/templates/multi/Dockerfile.tmpl b/genny/docker/templates/multi/Dockerfile.tmpl
index ab7aa8cf..a9473f4d 100644
--- a/genny/docker/templates/multi/Dockerfile.tmpl
+++ b/genny/docker/templates/multi/Dockerfile.tmpl
@@ -17,14 +17,10 @@ RUN npm install --no-progress
 {{end -}}
 
 ADD . .
-{{if .opts.App.WithDep -}}
-RUN dep ensure
-{{else -}}
 {{if .opts.App.WithModules -}}
 ENV GO111MODULE=on
 {{end -}}
 RUN go get ./...
-{{end -}}
 RUN buffalo build --static -o /bin/app
 
 FROM alpine
diff --git a/genny/docker/templates/standard/Dockerfile.tmpl b/genny/docker/templates/standard/Dockerfile.tmpl
index 1d03456b..61b78a14 100644
--- a/genny/docker/templates/standard/Dockerfile.tmpl
+++ b/genny/docker/templates/standard/Dockerfile.tmpl
@@ -17,11 +17,7 @@ RUN npm install --no-progress
 {{end -}}
 
 ADD . .
-{{if .opts.App.WithDep -}}
-RUN dep ensure
-{{else -}}
 RUN go get $(go list ./... | grep -v /vendor/)
-{{end -}}
 RUN buffalo build --static -o /bin/app
 
 # Uncomment to run the binary in "production" mode:
diff --git a/genny/plugins/plugin/with/generate/templates/cmd/generate.go.plush b/genny/plugins/plugin/with/generate/templates/cmd/generate.go.plush
index a50c4633..c137071c 100644
--- a/genny/plugins/plugin/with/generate/templates/cmd/generate.go.plush
+++ b/genny/plugins/plugin/with/generate/templates/cmd/generate.go.plush
@@ -33,7 +33,7 @@ var generateCmd = &cobra.Command{
 		}
 		r.With(g)
 
-		g, err = gotools.GoFmt(r.Root)
+		g, err = gogen.Fmt(r.Root)
 		if err != nil {
 			return err
 		}
diff --git a/go.mod b/go.mod
index d06decb1..3075ebc6 100644
--- a/go.mod
+++ b/go.mod
@@ -24,13 +24,13 @@ require (
 	github.com/gobuffalo/packr/v2 v2.7.1
 	github.com/gobuffalo/plush v3.8.3+incompatible
 	github.com/gobuffalo/pop v4.12.2+incompatible
-	github.com/gobuffalo/release v1.14.0
-	github.com/gobuffalo/tags v2.1.6+incompatible
+	github.com/gobuffalo/release v1.15.0
+	github.com/gobuffalo/tags v2.1.7+incompatible
 	github.com/google/go-cmp v0.3.1
 	github.com/gorilla/mux v1.7.3
 	github.com/gorilla/sessions v1.2.0
-	github.com/karrick/godirwalk v1.12.0
-	github.com/markbates/grift v1.1.0
+	github.com/karrick/godirwalk v1.13.0
+	github.com/markbates/grift v1.5.0
 	github.com/markbates/oncer v1.0.0
 	github.com/markbates/refresh v1.8.0
 	github.com/markbates/safe v1.0.1
@@ -39,10 +39,10 @@ require (
 	github.com/sirupsen/logrus v1.4.2
 	github.com/spf13/cobra v0.0.5
 	github.com/spf13/pflag v1.0.5
-	github.com/spf13/viper v1.4.0
+	github.com/spf13/viper v1.5.0
 	github.com/stretchr/testify v1.4.0
 	golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
-	golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab
+	golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2
 	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc
-	gopkg.in/yaml.v2 v2.2.4
+	gopkg.in/yaml.v2 v2.2.5
 )
diff --git a/go.sum b/go.sum
index a40af65d..c801c5d7 100644
--- a/go.sum
+++ b/go.sum
@@ -274,8 +274,9 @@ github.com/gobuffalo/helpers v0.2.2/go.mod h1:xYbzUdCUpVzLwLnqV8HIjT6hmG0Cs7YIBC
 github.com/gobuffalo/helpers v0.2.4/go.mod h1:NX7v27yxPDOPTgUFYmJ5ow37EbxdoLraucOGvMNawyk=
 github.com/gobuffalo/helpers v0.4.0 h1:DR/iYihrVCXv1cYeIGSK3EZz2CljO+DqDLQPWZAod9c=
 github.com/gobuffalo/helpers v0.4.0/go.mod h1:2q/ZnVxCehM4/y1bNz3+wXsvWvWUY+iTUr7mPC6QqGQ=
-github.com/gobuffalo/here v0.2.3 h1:1xamq7i4CKjGgICCXY0qpxPeXGdB8oVNSevkpqwd5X4=
 github.com/gobuffalo/here v0.2.3/go.mod h1:2a6G14FaAKOGJMK/5UNa4Og/+iyFS5cq3MnlvFR7YDk=
+github.com/gobuffalo/here v0.4.0 h1:TD+FD+jQkp5iNPYEAxT6E+4O8u/pOQJyDjmZNC0+/80=
+github.com/gobuffalo/here v0.4.0/go.mod h1:bTNk/uKZgycuB358iR0D32dI9kHBClBGpXjW2HVHkNo=
 github.com/gobuffalo/httptest v1.0.2/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E=
 github.com/gobuffalo/httptest v1.0.3/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E=
 github.com/gobuffalo/httptest v1.0.4/go.mod h1:7T1IbSrg60ankme0aDLVnEY0h056g9M1/ZvpVThtB7E=
@@ -479,8 +480,8 @@ github.com/gobuffalo/release v1.4.0/go.mod h1:f4uUPnD9dxrWxVy9yy0k/mvDf3EzhFtf7/
 github.com/gobuffalo/release v1.7.0/go.mod h1:xH2NjAueVSY89XgC4qx24ojEQ4zQ9XCGVs5eXwJTkEs=
 github.com/gobuffalo/release v1.8.3/go.mod h1:gCk/x5WD+aIGkPodO4CuLxdnhYn9Jgp7yFYxntK/8mk=
 github.com/gobuffalo/release v1.13.4/go.mod h1:5Cc4TSNxP4QFV2ZUYcgPiBBV7YyRomHecGTQuuy26G4=
-github.com/gobuffalo/release v1.14.0 h1:+Jy7eLN5md6Fg+AMuFRUiK4sTNq4+zXxRho7/wJe1HU=
-github.com/gobuffalo/release v1.14.0/go.mod h1:5Cc4TSNxP4QFV2ZUYcgPiBBV7YyRomHecGTQuuy26G4=
+github.com/gobuffalo/release v1.15.0 h1:bE97SdPFoRDz5BKC+QmTNYJa+aHbBMqG/nUkHW6xSug=
+github.com/gobuffalo/release v1.15.0/go.mod h1:LwotdbqCKcpQ+bKAvk1vvXLZhM8ftBTI5AlE7mx/1H8=
 github.com/gobuffalo/shoulders v1.0.1/go.mod h1:V33CcVmaQ4gRUmHKwq1fiTXuf8Gp/qjQBUL5tHPmvbA=
 github.com/gobuffalo/shoulders v1.0.3/go.mod h1:LqMcHhKRuBPMAYElqOe3POHiZ1x7Ry0BE8ZZ84Bx+k4=
 github.com/gobuffalo/shoulders v1.0.4/go.mod h1:LqMcHhKRuBPMAYElqOe3POHiZ1x7Ry0BE8ZZ84Bx+k4=
@@ -496,8 +497,8 @@ github.com/gobuffalo/tags v2.0.15+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s6
 github.com/gobuffalo/tags v2.0.16+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
 github.com/gobuffalo/tags v2.1.0+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
 github.com/gobuffalo/tags v2.1.5+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
-github.com/gobuffalo/tags v2.1.6+incompatible h1:xaWOM48Xz8lBh+C8l5R7vSmLAZJK4KeWcLo+0pJ516g=
-github.com/gobuffalo/tags v2.1.6+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
+github.com/gobuffalo/tags v2.1.7+incompatible h1:GUxxh34f9SI4U0Pj3ZqvopO9SlzuqSf+g4ZGSPSszt4=
+github.com/gobuffalo/tags v2.1.7+incompatible/go.mod h1:9XmhOkyaB7UzvuY4UoZO4s67q8/xRMVJEaakauVQYeY=
 github.com/gobuffalo/uuid v2.0.3+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE=
 github.com/gobuffalo/uuid v2.0.4+incompatible/go.mod h1:ErhIzkRhm0FtRuiE/PeORqcw4cVi1RtSpnwYrxuvkfE=
 github.com/gobuffalo/uuid v2.0.5+incompatible h1:c5uWRuEnYggYCrT9AJm0U2v1QTG7OVDAvxhj8tIV5Gc=
@@ -614,8 +615,9 @@ github.com/karrick/godirwalk v1.7.8/go.mod h1:2c9FRhkDxdIbgkOnCEvnSWs71Bhugbl46s
 github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
 github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
 github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
-github.com/karrick/godirwalk v1.12.0 h1:nkS4xxsjiZMvVlazd0mFyiwD4BR9f3m6LXGhM2TUx3Y=
 github.com/karrick/godirwalk v1.12.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
+github.com/karrick/godirwalk v1.13.0 h1:GJq8GHQEAPsjwqfGhLNXBO5P0dS2HYdDRVWe+P4E/EQ=
+github.com/karrick/godirwalk v1.13.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4=
 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
 github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
@@ -636,8 +638,9 @@ github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
 github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
 github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0=
 github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
-github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
 github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
+github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=
+github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
 github.com/markbates/deplist v1.0.4/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM=
 github.com/markbates/deplist v1.0.5/go.mod h1:gRRbPbbuA8TmMiRvaOzUlRfzfjeCCBqX2A6arxN01MM=
 github.com/markbates/deplist v1.1.3/go.mod h1:BF7ioVzAJYEtzQN/os4rt8H8Ti3h0T7EoN+7eyALktE=
@@ -650,6 +653,8 @@ github.com/markbates/grift v1.0.5/go.mod h1:EHmVIjOQoj/OOBDzlZ8RW0ZkvOtQ4xRHjrPv
 github.com/markbates/grift v1.0.6/go.mod h1:2AUYA/+pODhwonRbYwsltPVPIztBzw5nIJEGiWgKMPM=
 github.com/markbates/grift v1.1.0 h1:DsljFKUSK1ELpU22ZE+Gi93jiQI3cYD/RQ+vHM/PpY8=
 github.com/markbates/grift v1.1.0/go.mod h1:8N7ybWEcnMOvtSb0kW+dLJpYii9eq/FP3Gtu/cNPDTY=
+github.com/markbates/grift v1.5.0 h1:CZyK0k+8BdhQMgbwzuKMysC12y4tf9H004jAs/FutX4=
+github.com/markbates/grift v1.5.0/go.mod h1:1ssFm5gSGmzTkhi3Wfh/nqlU74J73TlAjoDMttQbpfY=
 github.com/markbates/hmax v1.0.0/go.mod h1:cOkR9dktiESxIMu+65oc/r/bdY4bE8zZw3OLhLx0X2c=
 github.com/markbates/hmax v1.1.0/go.mod h1:hhn8pJiRwNTEmNlxhfiTbL+CtEYiAX3wuhSf/kg/6wI=
 github.com/markbates/inflect v1.0.0/go.mod h1:oTeZL2KHA7CUX6X+fovmK9OvIOFuqu0TwdQrZjLTh88=
@@ -820,8 +825,9 @@ github.com/spf13/viper v1.2.1/go.mod h1:P4AexN0a+C9tGAnUFNwDMYYZv3pjFuvmeiMyKRaN
 github.com/spf13/viper v1.3.0/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
 github.com/spf13/viper v1.3.1/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
 github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
-github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU=
 github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE=
+github.com/spf13/viper v1.5.0 h1:GpsTwfsQ27oS/Aha/6d1oD7tpKIqWnOA6tgOX9HHkt4=
+github.com/spf13/viper v1.5.0/go.mod h1:AkYRkVJF8TkSG/xet6PzXX+l39KhhXa2pdqVSxnTcn4=
 github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
 github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
@@ -829,6 +835,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
 github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
+github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
+github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
 github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
 github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
@@ -1041,8 +1049,8 @@ golang.org/x/tools v0.0.0-20190906203814-12febf440ab1/go.mod h1:b+2E5dAYhXwXZwtn
 golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191004055002-72853e10c5a3/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191015150414-f936694f27bf/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab h1:tpc/nJ4vD66vAk/2KN0sw/DvQIz2sKmCpWvyKtPmfMQ=
-golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2 h1:EtTFh6h4SAKemS+CURDMTDIANuduG5zKEXShyy18bGA=
+golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
@@ -1088,8 +1096,9 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD
 gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
 gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I=
 gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c=
+gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
 honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/middleware.go b/middleware.go
index a93e7719..1f2ec152 100644
--- a/middleware.go
+++ b/middleware.go
@@ -71,6 +71,29 @@ func (ms *MiddlewareStack) Use(mw ...MiddlewareFunc) {
 	ms.stack = append(ms.stack, mw...)
 }
 
+// Remove the specified Middleware(s) for the App/group. This is useful when
+// the middleware will be skipped by the entire group.
+/*
+	a.Middleware.Remove(Authorization)
+*/
+func (ms *MiddlewareStack) Remove(mws ...MiddlewareFunc) {
+	result := []MiddlewareFunc{}
+
+base:
+	for _, existing := range ms.stack {
+		for _, banned := range mws {
+			if funcKey(existing) == funcKey(banned) {
+				continue base
+			}
+		}
+
+		result = append(result, existing)
+	}
+
+	ms.stack = result
+
+}
+
 // Skip a specified piece of middleware the specified Handlers.
 // This is useful for things like wrapping your application in an
 // authorization middleware, but skipping it for things the home
diff --git a/options.go b/options.go
index 11a63577..9a7e62a4 100644
--- a/options.go
+++ b/options.go
@@ -151,15 +151,22 @@ func optionsWithDefaults(opts Options) Options {
 
 	if opts.SessionStore == nil {
 		secret := envy.Get("SESSION_SECRET", "")
+
+		if secret == "" && (opts.Env == "development" || opts.Env == "test") {
+			secret = "buffalo-secret"
+		}
+
 		// In production a SESSION_SECRET must be set!
 		if secret == "" {
-			if opts.Env == "development" || opts.Env == "test" {
-				secret = "buffalo-secret"
-			} else {
-				opts.Logger.Warn("Unless you set SESSION_SECRET env variable, your session storage is not protected!")
-			}
+			opts.Logger.Warn("Unless you set SESSION_SECRET env variable, your session storage is not protected!")
 		}
-		opts.SessionStore = sessions.NewCookieStore([]byte(secret))
+
+		cookieStore := sessions.NewCookieStore([]byte(secret))
+		//Cookie secure attributes, see: https://www.owasp.org/index.php/Testing_for_cookies_attributes_(OTG-SESS-002)
+		cookieStore.Options.HttpOnly = true
+		cookieStore.Options.Secure = true
+
+		opts.SessionStore = cookieStore
 	}
 	if opts.Worker == nil {
 		w := worker.NewSimpleWithContext(opts.Context)
diff --git a/runtime/version.go b/runtime/version.go
index 7c6e748c..42cff956 100644
--- a/runtime/version.go
+++ b/runtime/version.go
@@ -1,4 +1,4 @@
 package runtime
 
 // Version is the current version of the buffalo binary
-const Version = "v0.15.0"
+const Version = "development"


Test patch:
diff --git a/middleware_test.go b/middleware_test.go
index 9bd7aacf..abd7b0e4 100644
--- a/middleware_test.go
+++ b/middleware_test.go
@@ -199,3 +199,46 @@ func Test_Middleware_Clear(t *testing.T) {
 	r.Len(mws.stack, 0)
 	r.Len(mws.skips, 0)
 }
+
+func Test_Middleware_Remove(t *testing.T) {
+	r := require.New(t)
+	log := []string{}
+
+	mw1 := func(h Handler) Handler {
+		log = append(log, "mw1")
+		return h
+	}
+
+	mw2 := func(h Handler) Handler {
+		log = append(log, "mw2")
+		return h
+	}
+
+	a := New(Options{})
+	a.Use(mw2)
+	a.Use(mw1)
+
+	var cr Resource = &carsResource{}
+	g := a.Resource("/autos", cr)
+	g.Middleware.Remove(mw2)
+
+	a.Resource("/all_log_autos", cr)
+	w := httptest.New(a)
+
+	ng := a.Resource("/no_log_autos", cr)
+	ng.Middleware.Remove(mw1, mw2)
+
+	_ = w.HTML("/autos/1").Get()
+	r.Len(log, 1)
+	r.Equal("mw1", log[0])
+
+	log = []string{}
+	_ = w.HTML("/all_log_autos/1").Get()
+	r.Len(log, 2)
+	r.Contains(log, "mw2")
+	r.Contains(log, "mw1")
+
+	log = []string{}
+	_ = w.HTML("/no_log_autos/1").Get()
+	r.Len(log, 0)
+}