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

Commit

Permalink
v0.16.5 (#1961)
Browse files Browse the repository at this point in the history
* merge changes from buffalo-cli into main repo

* cache deps before building and copying source (#1884)

cache deps before building and copying source so that we don't need to re-download as much
and so that source changes don't invalidate our downloaded layer

* Generator resource action test breaks with unused imports fixes #1893 (#1894)

* Generator resource action test breaks with unused imports fixes #1893

* break packr cache

* fix broken test

* update deps (#1896)

* update deps

* update envy

* update meta

* switch to tags/v3 for consistency (#1901)

* update helpers/tags

* update validate

* try to fix mismatched imports (#1921)

* fixes more broken semantic import paths (#1925)

* adding a few packages to replace

* Replace Azure badge with Github actions badge (#1920)

Co-authored-by: Antonio Pagano <[email protected]>

* changing the packages to be replaced (#1928)

* changing the packages to be replaced

* adding back gobuffalo/uuid change

* Merging master (#1936)

* v0.16.1 (#1929)

* merge changes from buffalo-cli into main repo

* cache deps before building and copying source (#1884)

cache deps before building and copying source so that we don't need to re-download as much
and so that source changes don't invalidate our downloaded layer

* Generator resource action test breaks with unused imports fixes #1893 (#1894)

* Generator resource action test breaks with unused imports fixes #1893

* break packr cache

* fix broken test

* update deps (#1896)

* update deps

* update envy

* update meta

* switch to tags/v3 for consistency (#1901)

* update helpers/tags

* update validate

* try to fix mismatched imports (#1921)

* fixes more broken semantic import paths (#1925)

* adding a few packages to replace

* Replace Azure badge with Github actions badge (#1920)

Co-authored-by: Antonio Pagano <[email protected]>

* changing the packages to be replaced (#1928)

* changing the packages to be replaced

* adding back gobuffalo/uuid change

Co-authored-by: Mark Bates <[email protected]>
Co-authored-by: Dr Nic Williams <[email protected]>
Co-authored-by: HD Moore <[email protected]>
Co-authored-by: Stanislas Michalak <[email protected]>

* Add stack trace to ErrPanic event for easier debugging and monitoring (#1930)

Co-authored-by: Canh Nguyen <[email protected]>

* Modifies our docker file to pull buffalo binary from releases. (#1935)

* fixing docker image to use github binary

Co-authored-by: Mark Bates <[email protected]>
Co-authored-by: Dr Nic Williams <[email protected]>
Co-authored-by: HD Moore <[email protected]>
Co-authored-by: Stanislas Michalak <[email protected]>
Co-authored-by: xuancanh <[email protected]>
Co-authored-by: Canh Nguyen <[email protected]>

* Update js template to support font awesome (#1933)

* v0.16.1 (#1929)

* merge changes from buffalo-cli into main repo

* cache deps before building and copying source (#1884)

cache deps before building and copying source so that we don't need to re-download as much
and so that source changes don't invalidate our downloaded layer

* Generator resource action test breaks with unused imports fixes #1893 (#1894)

* Generator resource action test breaks with unused imports fixes #1893

* break packr cache

* fix broken test

* update deps (#1896)

* update deps

* update envy

* update meta

* switch to tags/v3 for consistency (#1901)

* update helpers/tags

* update validate

* try to fix mismatched imports (#1921)

* fixes more broken semantic import paths (#1925)

* adding a few packages to replace

* Replace Azure badge with Github actions badge (#1920)

Co-authored-by: Antonio Pagano <[email protected]>

* changing the packages to be replaced (#1928)

* changing the packages to be replaced

* adding back gobuffalo/uuid change

Co-authored-by: Mark Bates <[email protected]>
Co-authored-by: Dr Nic Williams <[email protected]>
Co-authored-by: HD Moore <[email protected]>
Co-authored-by: Stanislas Michalak <[email protected]>

* Add stack trace to ErrPanic event for easier debugging and monitoring (#1930)

Co-authored-by: Canh Nguyen <[email protected]>

* Update js template to support font awesome

The latest version of font-awesome requires the js file to also be present for a glyph to work.  To see this work, add this code to any page template:

```html
<h3>
<a href=#" target="_blank"><i class="fab fa-twitter-square share" aria-hidden="true"></i></a>
</h3>
```

Without this JS file, the glyph will not render.

Co-authored-by: Antonio Pagano <[email protected]>
Co-authored-by: Mark Bates <[email protected]>
Co-authored-by: Dr Nic Williams <[email protected]>
Co-authored-by: HD Moore <[email protected]>
Co-authored-by: Stanislas Michalak <[email protected]>
Co-authored-by: xuancanh <[email protected]>
Co-authored-by: Canh Nguyen <[email protected]>

* Fixes generated package.json and resources generator (#1944)

* v0.16.1 (#1929)

* merge changes from buffalo-cli into main repo

* cache deps before building and copying source (#1884)

cache deps before building and copying source so that we don't need to re-download as much
and so that source changes don't invalidate our downloaded layer

* Generator resource action test breaks with unused imports fixes #1893 (#1894)

* Generator resource action test breaks with unused imports fixes #1893

* break packr cache

* fix broken test

* update deps (#1896)

* update deps

* update envy

* update meta

* switch to tags/v3 for consistency (#1901)

* update helpers/tags

* update validate

* try to fix mismatched imports (#1921)

* fixes more broken semantic import paths (#1925)

* adding a few packages to replace

* Replace Azure badge with Github actions badge (#1920)

Co-authored-by: Antonio Pagano <[email protected]>

* changing the packages to be replaced (#1928)

* changing the packages to be replaced

* adding back gobuffalo/uuid change

Co-authored-by: Mark Bates <[email protected]>
Co-authored-by: Dr Nic Williams <[email protected]>
Co-authored-by: HD Moore <[email protected]>
Co-authored-by: Stanislas Michalak <[email protected]>

* Add stack trace to ErrPanic event for easier debugging and monitoring (#1930)

Co-authored-by: Canh Nguyen <[email protected]>

* Modifies our docker file to pull buffalo binary from releases. (#1935)

* fixing docker image to use github binary

* Bump pop version (#1937)

* adding resource and new app generator fixes

* fixing buffalo generator to use v5 of pop

* updating popper and removing repeated version of webpack-manifest

* updating old tooling on the JS side

* updating webpack version

* updating node dependencies on fixture to remove github warnings

Co-authored-by: Mark Bates <[email protected]>
Co-authored-by: Dr Nic Williams <[email protected]>
Co-authored-by: HD Moore <[email protected]>
Co-authored-by: Stanislas Michalak <[email protected]>
Co-authored-by: xuancanh <[email protected]>
Co-authored-by: Canh Nguyen <[email protected]>

* updating dockerfile to use v0.16.3

* packing

* Adding new template for codeclimate code analysis (#1946)

* adding new template for codeclimate code analysis

* packing

* Updates our coke app package.json and Yarn (#1947)

* updating package.lock on the lock sample

* removing old pop plugin

* adding task to the fixers

* removing the fixer part

* Removes old buffalo-pop plugin (#1948)

* removes old buffalo-pop plugin

* naming change

* using filepath for auto render files (#1951)

* Bugfix c.Error http code (#1952)

* fixes error code not being logged

* adding tests for the status code when error handled fires

* Allows to set test timeout (#1953)

* allowing to pass timeout to the test command

* packing

* Fixes plush to use now plush/v4 (#1954)

* Adding packr files (#1956)

* Missing comments on the Plugins struct (#1958)

* Adding packr files

* adding a couple of comments missing

* fixing mispell package (#1960)

* Task #1941 (#1943)

* covering non id cases on the route name generator

* fixing broken tests

* adding a few more test cases

* moving to just use a string for simplified ID

* bumping version

* packing

Co-authored-by: Mark Bates <[email protected]>
Co-authored-by: Dr Nic Williams <[email protected]>
Co-authored-by: HD Moore <[email protected]>
Co-authored-by: Stanislas Michalak <[email protected]>
Co-authored-by: xuancanh <[email protected]>
Co-authored-by: Canh Nguyen <[email protected]>
Co-authored-by: Cory LaNou <[email protected]>
  • Loading branch information
8 people authored Apr 15, 2020
1 parent 1bf4d58 commit fcaae36
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 12 deletions.
2 changes: 1 addition & 1 deletion default_context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func Test_DefaultContext_Redirect_Helper(t *testing.T) {
return c.Render(http.StatusOK, render.String(c.Param("bar")))
})
a.GET("/", func(c Context) error {
return c.Redirect(http.StatusPermanentRedirect, "fooPath()", tt.I)
return c.Redirect(http.StatusPermanentRedirect, "fooBarPath()", tt.I)
})
a.GET("/nomap", func(c Context) error {
return c.Redirect(http.StatusPermanentRedirect, "rootPath()")
Expand Down
8 changes: 8 additions & 0 deletions genny/assets/webpack/webpack-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions genny/build/build-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion genny/newapp/api/templates/actions/app.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

{{ if .opts.App.WithPop }}
"{{.opts.App.ModelsPkg}}"
"github.com/gobuffalo/buffalo-pop/pop/v2/popmw"
"github.com/gobuffalo/buffalo-pop/v2/pop/popmw"
{{ end -}}

"github.com/rs/cors"
Expand Down
2 changes: 1 addition & 1 deletion packrd/packed-packr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 19 additions & 5 deletions route_mappings.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,21 +295,35 @@ func (a *App) buildRouteName(p string) string {

for index, part := range parts {

if strings.Contains(part, "{") || part == "" {
originalPart := parts[index]

var previousPart string
if index > 0 {
previousPart = parts[index-1]
}

var nextPart string
if len(parts) > index+1 {
nextPart = parts[index+1]
}

isIdentifierPart := strings.Contains(part, "{") && (strings.Contains(part, flect.Singularize(previousPart)))
isSimplifiedID := part == `{id}`

if isIdentifierPart || isSimplifiedID || part == "" {
continue
}

shouldSingularize := (len(parts) > index+1) && strings.Contains(parts[index+1], "{")
if shouldSingularize {
if strings.Contains(nextPart, "{") {
part = flect.Singularize(part)
}

if parts[index] == "new" || parts[index] == "edit" {
if originalPart == "new" || originalPart == "edit" {
resultParts = append([]string{part}, resultParts...)
continue
}

if index > 0 && strings.Contains(parts[index-1], "}") {
if strings.Contains(previousPart, "}") {
resultParts = append(resultParts, part)
continue
}
Expand Down
19 changes: 16 additions & 3 deletions router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,9 @@ func Test_App_NamedRoutes(t *testing.T) {
11. <%= rootPath({"special/":"12=ss"}) %>
12. <%= resourcePath({resource_id: 1}) %>
13. <%= editResourcePath({resource_id: 1}) %>
14. <%= testPath() %>
15. <%= testNamePath({name: "myTest"}) %>
16. <%= paganoPath({id: 1}) %>
`))
}

Expand All @@ -437,6 +440,9 @@ func Test_App_NamedRoutes(t *testing.T) {
a.GET("/peeps", sampleHandler).Name("myPeeps")
a.Resource("/car", carsResource)
a.Resource("/resources", resourcesResource)
a.GET("/test", sampleHandler)
a.GET("/test/{name}", sampleHandler)
a.GET("/pagano/{id}", sampleHandler)

w := httptest.New(a)
res := w.HTML("/").Get()
Expand All @@ -454,6 +460,9 @@ func Test_App_NamedRoutes(t *testing.T) {
r.Contains(res.Body.String(), "11. /?special%2F=12%3Dss")
r.Contains(res.Body.String(), "12. /resources/1")
r.Contains(res.Body.String(), "13. /resources/1/edit")
r.Contains(res.Body.String(), "14. /test")
r.Contains(res.Body.String(), "15. /test/myTest")
r.Contains(res.Body.String(), "16. /pagano/1")
}

func Test_App_NamedRoutes_MissingParameter(t *testing.T) {
Expand Down Expand Up @@ -719,9 +728,13 @@ func Test_buildRouteName(t *testing.T) {
"/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",
"/test": "test",
"/tests/{name}": "testName",
"/tests/{name_id}/cases/{case_id}": "testNameIdCase",
"/tests/{name_id}/cases/{case_id}/edit": "editTestNameIdCase",
}

a := New(Options{})
Expand Down
2 changes: 1 addition & 1 deletion runtime/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package runtime

// Version is the current version of the buffalo binary
var Version = "v0.16.4"
var Version = "v0.16.5"

0 comments on commit fcaae36

Please sign in to comment.