Buffalo@v0.15.0

Please read through the notes to see what is new, what has been improved, and most importantly, what might be breaking changes for existing applications.

In addition to what is listed here, it is recommended that you read the CHANGELOG for a complete list of what has changed since v0.14.12.


How to Upgrade

Pre-built Binaries

The easiest solution is to download one of the pre-built binaries:

https://github.com/gobuffalo/buffalo/releases/tag/v0.15.0

Using Go Get

$ go get -u github.com/gobuffalo/buffalo/buffalo

From Source

$ go get github.com/gobuffalo/buffalo
$ cd $GOPATH/src/github.com/gobuffalo/buffalo
$ git checkout tags/v0.15.0 -b v0.15.0
$ make install

Once you have an upgraded binary you can run the following command to attempt to upgrade your application from v0.14.12 to v0.15.0.

$ buffalo fix

Note: While we have done our best to make this update command work well, please understand that it might not get you to a complete upgrade depending on your application and its complexities, but it will get you pretty close.


Support for Dep Dropped

Support for the dep dependency management tool has been dropped. It is now recommended to use Go Modules for dependency management going forward.

In version v0.16.0 support for $GOPATH will also be removed.


Support -timeout in Buffalo Test

When running tests with buffalo test you can now pass the -timeout flag, as with go test, to limit how long tests can run.

$ buffalo test -timeout 3s


Append URL and Query String Parameter Duplicates

When multiple query parameters are present with the same name Buffalo would only return the last one when using github.com/gobuffalo/buffalo#Context.Params().

Old Behavior:

GET /users/001?user_id=002&user_id=003
{
    "user_id": [
        "003"
    ]
}

New Behavior:

GET /users/001?user_id=002&user_id=003
{
    "user_id": [
        "001",
        "002",
        "003",
    ]
}


Resource Name Available on Route Info

The github.com/gobuffalo/buffalo#RouteInfo type now contains the name of the resource it belongs to, if at all.

app.Resource("/widget", WidgetsResource{})
{
  "method": "GET",
  "path": "/widgets/",
  "handler": "github.com/markbates/coke/actions.WidgetsResource.List",
  "resourceName": "WidgetsResource",
  "pathName": "widgetsPath",
  "aliases": []
}


Module Changes

Buffalo Library/CLI Changes

These are changes to the Buffalo library, as well as the buffalo binary.

    // gobuffalo/buffalo/go.mod@v0.15.0
    
    module github.com/gobuffalo/buffalo
    
    go 1.13
    
    require (
        github.com/BurntSushi/toml v0.3.1
        github.com/dustin/go-humanize v1.0.0
        github.com/fatih/color v1.7.0
        github.com/gobuffalo/attrs v0.1.0
        github.com/gobuffalo/buffalo-pop v1.23.1
        github.com/gobuffalo/clara v0.9.1
        github.com/gobuffalo/envy v1.7.1
        github.com/gobuffalo/events v1.4.0
        github.com/gobuffalo/flect v0.1.6
        github.com/gobuffalo/genny v0.4.1
        github.com/gobuffalo/github_flavored_markdown v1.1.0
        github.com/gobuffalo/helpers v0.4.0
        github.com/gobuffalo/httptest v1.4.0
        github.com/gobuffalo/licenser v1.4.0
        github.com/gobuffalo/logger v1.0.1
        github.com/gobuffalo/meta v0.2.0
        github.com/gobuffalo/nulls v0.1.0
        github.com/gobuffalo/packd v0.3.0
        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/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/markbates/oncer v1.0.0
        github.com/markbates/refresh v1.8.0
        github.com/markbates/safe v1.0.1
        github.com/markbates/sigtx v1.0.0
        github.com/monoculum/formam v0.0.0-20190830100315-7ff9597b1407
        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/stretchr/testify v1.4.0
        golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
        golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab
        gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc
        gopkg.in/yaml.v2 v2.2.4
    )
    
    
    // gobuffalo/buffalo/go.mod@v0.14.12
    
    module github.com/gobuffalo/buffalo
    
    go 1.13
    
    require (
        github.com/BurntSushi/toml v0.3.1
        github.com/dustin/go-humanize v1.0.0
        github.com/fatih/color v1.7.0
        github.com/gobuffalo/attrs v0.1.0
        github.com/gobuffalo/buffalo-pop v1.23.1
        github.com/gobuffalo/clara v0.9.1
        github.com/gobuffalo/envy v1.7.1
        github.com/gobuffalo/events v1.4.0
        github.com/gobuffalo/flect v0.1.6
        github.com/gobuffalo/genny v0.4.1
        github.com/gobuffalo/github_flavored_markdown v1.1.0
        github.com/gobuffalo/helpers v0.4.0
        github.com/gobuffalo/httptest v1.4.0
        github.com/gobuffalo/licenser v1.4.0
        github.com/gobuffalo/logger v1.0.1
        github.com/gobuffalo/meta v0.2.0
        github.com/gobuffalo/nulls v0.1.0
        github.com/gobuffalo/packd v0.3.0
        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/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/deplist v1.3.0
        github.com/markbates/grift v1.1.0
        github.com/markbates/oncer v1.0.0
        github.com/markbates/refresh v1.8.0
        github.com/markbates/safe v1.0.1
        github.com/markbates/sigtx v1.0.0
        github.com/monoculum/formam v0.0.0-20190830100315-7ff9597b1407
        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/stretchr/testify v1.4.0
        golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
        golang.org/x/tools v0.0.0-20191030062658-86caa796c7ab
        gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc
        gopkg.in/yaml.v2 v2.2.4
    )
    
    
    // DIFF
        ... // 30 identical lines
        `   github.com/gorilla/sessions v1.2.0`,
        `   github.com/karrick/godirwalk v1.12.0`,
    -   `   github.com/markbates/deplist v1.3.0`,
         `   github.com/markbates/grift v1.1.0`,
        `   github.com/markbates/oncer v1.0.0`,
        ... // 15 identical lines
      
    

    Application Changes

    These are changes for a brand new application @v0.15.0 with the following command:

    $ buffalo new coke
    
      // @v0.15.0/go.mod
      
      module github.com/markbates/coke
      
      go 1.13
      
      require (
          github.com/gobuffalo/buffalo v0.15.0
          github.com/gobuffalo/envy v1.7.1
          github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130
          github.com/gobuffalo/mw-paramlogger v0.0.0-20190129202837-395da1998525
          github.com/gobuffalo/packr/v2 v2.7.1
          github.com/gobuffalo/pop v4.12.2+incompatible
          github.com/gobuffalo/suite v2.8.2+incompatible
          github.com/markbates/grift v1.1.0
          github.com/unrolled/secure v0.0.0-20190103195806-76e6d4e9b90c
      )
      
      
      // @v0.14.12/go.mod
      
      module github.com/markbates/coke
      
      go 1.13
      
      require (
          github.com/gobuffalo/buffalo v0.14.12
          github.com/gobuffalo/envy v1.7.1
          github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130
          github.com/gobuffalo/mw-paramlogger v0.0.0-20190129202837-395da1998525
          github.com/gobuffalo/packr/v2 v2.7.1
          github.com/gobuffalo/pop v4.12.2+incompatible
          github.com/gobuffalo/suite v2.8.2+incompatible
          github.com/markbates/grift v1.1.0
          github.com/unrolled/secure v0.0.0-20190103195806-76e6d4e9b90c
      )
      
      
      // DIFF
          ... // 3 identical lines
          "",
          "require (",
      -   `   github.com/gobuffalo/buffalo v0.14.12`,
      +   `   github.com/gobuffalo/buffalo v0.15.0`,
          `   github.com/gobuffalo/envy v1.7.1`,
          `   github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130`,
          ... // 8 identical lines