You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
If you generate a "pepsi" resource with buffalo generate resource pepsi, some routes are not named properly (some are "pepsi/pepsis", some are "pepse/pepses"):
METHOD
PATH
NAME
HANDLER
GET
/
rootPath
dummyapp/actions.HomeHandler
GET
/pepsis/
pepsisPath
dummyapp/actions.PepsisResource.List
POST
/pepsis/
pepsisPath
dummyapp/actions.PepsisResource.Create
GET
/pepsis/new/
newPepsisPath
dummyapp/actions.PepsisResource.New
GET
/pepsis/{pepse_id}/
pepsePath
dummyapp/actions.PepsisResource.Show
PUT
/pepsis/{pepse_id}/
pepsePath
dummyapp/actions.PepsisResource.Update
DELETE
/pepsis/{pepse_id}/
pepsePath
dummyapp/actions.PepsisResource.Destroy
GET
/pepsis/{pepse_id}/edit/
editPepsePath
dummyapp/actions.PepsisResource.Edit
You can see the same problems in some variable names in pepsis.go action:
// List gets all Pepsis. This function is mapped to the path// GET /pepsisfunc (vPepsisResource) List(c buffalo.Context) error {
// Get the DB connection from the contexttx, ok:=c.Value("tx").(*pop.Connection)
if!ok {
returnfmt.Errorf("no transaction found")
}
pepses:=&models.Pepsis{}
Steps to Reproduce the Problem
Generate a new app with buffalo new dummyapp and cd into the app's folder
Generate the resource with buffalo generate resource pepsi
Start the app and check the home page
Expected Behavior
I expect the app not to break
Actual Behavior
It does
Info
-> Go: Checking installation
✓ The `go` executable was found on your system at: /snap/bin/go
-> Go: Checking minimum version requirements
✓ Your version of Go, 1.13.4, meets the minimum requirements.
-> Go: Checking GOPATH
✓ You are using Go Modules, so no need to worry about the GOPATH.
-> Go: Checking Package Management
✓ You are using Go Modules (`go`) for package management.
-> Go: Checking PATH
✓ Your PATH contains /home/mladen/go/bin.
-> Node: Checking installation
✓ The `node` executable was found on your system at: /home/mladen/.nvm/versions/node/v13.5.0/bin/node
-> Node: Checking minimum version requirements
✓ Your version of Node, v13.5.0, meets the minimum requirements.
-> NPM: Checking installation
✓ The `npm` executable was found on your system at: /home/mladen/.nvm/versions/node/v13.5.0/bin/npm
-> NPM: Checking minimum version requirements
✓ Your version of NPM, 6.13.7, meets the minimum requirements.
-> Yarn: Checking installation
✓ The `yarnpkg` executable was found on your system at: /home/mladen/.nvm/versions/node/v13.5.0/bin/yarnpkg
-> Yarn: Checking minimum version requirements
✓ Your version of Yarn, 1.21.1, meets the minimum requirements.
-> PostgreSQL: Checking installation
✘ The `postgres` executable could not be found on your system.
For help setting up your Postgres environment please follow the instructions for you platform at:
https://www.postgresql.org/download/
-> MySQL: Checking installation
✓ The `mysql` executable was found on your system at: /usr/bin/mysql
-> MySQL: Checking minimum version requirements
✓ Your version of MySQL, 14.14, meets the minimum requirements.
-> SQLite3: Checking installation
✓ The `sqlite3` executable was found on your system at: /usr/bin/sqlite3
-> SQLite3: Checking minimum version requirements
✓ Your version of SQLite3, 3.22.0, meets the minimum requirements.
-> Cockroach: Checking installation
✘ The `cockroach` executable could not be found on your system.
For help setting up your Cockroach environment please follow the instructions for you platform at:
https://www.cockroachlabs.com/docs/stable/
-> Buffalo (CLI): Checking installation
✓ The `buffalo` executable was found on your system at: /usr/local/bin/buffalo
-> Buffalo (CLI): Checking minimum version requirements
✓ Your version of Buffalo (CLI), v0.15.3, meets the minimum requirements.
-> Buffalo: Application Details
Pwd /home/mladen/Projects/BuffaloTest/dummyapp
Root /home/mladen/Projects/BuffaloTest/dummyapp
GoPath /home/mladen/go
PackagePkg dummyapp
ActionsPkg dummyapp/actions
ModelsPkg dummyapp/models
GriftsPkg dummyapp/grifts
WithModules true
Name dummyapp
Bin bin/dummyapp
VCS git
WithPop true
WithSQLite false
WithDep false
WithWebpack true
WithNodeJs true
WithYarn true
WithDocker true
WithGrifts true
AsWeb true
AsAPI false
InApp true
PackageJSON {map[build:webpack -p --progress dev:webpack --watch]}
-> Buffalo: config/buffalo-app.toml
name = "dummyapp"
bin = "bin/dummyapp"
vcs = "git"
with_pop = true
with_sqlite = false
with_dep = false
with_webpack = true
with_nodejs = true
with_yarn = true
with_docker = true
with_grifts = true
as_web = true
as_api = false
-> Buffalo: config/buffalo-plugins.toml
[[plugin]]
binary = "buffalo-pop"
go_get = "github.com/gobuffalo/buffalo-pop"
-> Buffalo: go.mod
module dummyapp
go 1.13
require (
github.com/gobuffalo/buffalo v0.15.3
github.com/gobuffalo/buffalo-pop v1.23.1
github.com/gobuffalo/envy v1.8.1
github.com/gobuffalo/mw-csrf v0.0.0-20190129204204-25460a055517
github.com/gobuffalo/mw-forcessl v0.0.0-20180802152810-73921ae7a130
github.com/gobuffalo/mw-i18n v0.0.0-20190129204410-552713a3ebb4
github.com/gobuffalo/mw-paramlogger v0.0.0-20190129202837-395da1998525
github.com/gobuffalo/packr/v2 v2.7.1
github.com/gobuffalo/pop v4.13.1+incompatible
github.com/gobuffalo/suite v2.8.2+incompatible
github.com/gobuffalo/validate v2.0.3+incompatible
github.com/gofrs/uuid v3.2.0+incompatible
github.com/markbates/grift v1.5.0
github.com/stretchr/testify v1.4.0
github.com/unrolled/secure v0.0.0-20190103195806-76e6d4e9b90c
)
The text was updated successfully, but these errors were encountered:
Description
If you generate a "pepsi" resource with
buffalo generate resource pepsi
, some routes are not named properly (some are "pepsi/pepsis", some are "pepse/pepses"):You can see the same problems in some variable names in
pepsis.go
action:Steps to Reproduce the Problem
buffalo new dummyapp
and cd into the app's folderbuffalo generate resource pepsi
Expected Behavior
I expect the app not to break
Actual Behavior
It does
Info
The text was updated successfully, but these errors were encountered: