diff --git a/filetests/aditional_fields.json b/filetests/aditional_fields.json index 2f555ec..04ba6c6 100644 --- a/filetests/aditional_fields.json +++ b/filetests/aditional_fields.json @@ -7,7 +7,7 @@ "PhoneNumber" ] },{ - "path": "templates/users/new.html", + "path": "templates/users/new.plush.html", "contains": [ "<%= f.InputTag(\"FirstName\", {}) %>", "<%= f.InputTag(\"LastName\", {}) %>", diff --git a/genny/auth/a_auth-packr.go b/genny/auth/a_auth-packr.go index 8dab205..127547c 100644 --- a/genny/auth/a_auth-packr.go +++ b/genny/auth/a_auth-packr.go @@ -16,7 +16,7 @@ func init() { packr.PackJSONBytes("../auth/templates", "migrations/create_users.up.fizz.plush", "\"Y3JlYXRlX3RhYmxlKCJ1c2VycyIpewogICAgdC5Db2x1bW4oImlkIiwgInV1aWQiLCB7InByaW1hcnkiOiB0cnVlfSkKICAgIHQuQ29sdW1uKCJlbWFpbCIsICJzdHJpbmciLCB7fSkKICAgIHQuQ29sdW1uKCJwYXNzd29yZF9oYXNoIiwgInN0cmluZyIsIHt9KQoKICAgIDwlPSBmb3IgKGF0dHIpIGluIGF0dHJzIHsgJT4gCiAgICB0LkNvbHVtbigiPCU9IGF0dHIuTmFtZS5VbmRlcnNjb3JlKCkgJT4iLCAiPCU9IGF0dHIuQ29tbW9uVHlwZSgpICU+Iiwge30pCiAgICA8JSB9ICU+Cn0=\"") packr.PackJSONBytes("../auth/templates", "models/user.go.plush", "\"cGFja2FnZSBtb2RlbHMKCmltcG9ydCAoCgkiZW5jb2RpbmcvanNvbiIKCSJ0aW1lIgoKCSJnaXRodWIuY29tL2dvYnVmZmFsby9wb3AiCgkiZ2l0aHViLmNvbS9nb2J1ZmZhbG8vdXVpZCIKCSJnaXRodWIuY29tL2dvYnVmZmFsby92YWxpZGF0ZSIKCSJnaXRodWIuY29tL2dvYnVmZmFsby92YWxpZGF0ZS92YWxpZGF0b3JzIgopCgovL1VzZXIgaXMgYSBnZW5lcmF0ZWQgbW9kZWwgZnJvbSBidWZmYWx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LCBjb3VudCkKfQoKZnVuYyAobXMgKk1vZGVsU3VpdGUpIFRlc3RfVXNlcl9DcmVhdGVfVXNlckV4aXN0cygpIHsKCWNvdW50LCBlcnIgOj0gbXMuREIuQ291bnQoInVzZXJzIikKCW1zLk5vRXJyb3IoZXJyKQoJbXMuRXF1YWwoMCwgY291bnQpCgoJdSA6PSAmbW9kZWxzLlVzZXJ7CgkJRW1haWw6ICAgICAgICAgICAgICAgICJtYXJrQGV4YW1wbGUuY29tIiwKCQlQYXNzd29yZDogICAgICAgICAgICAgInBhc3N3b3JkIiwKCQlQYXNzd29yZENvbmZpcm1hdGlvbjogInBhc3N3b3JkIiwKCX0KCW1zLlplcm8odS5QYXNzd29yZEhhc2gpCgoJdmVycnMsIGVyciA6PSB1LkNyZWF0ZShtcy5EQikKCW1zLk5vRXJyb3IoZXJyKQoJbXMuRmFsc2UodmVycnMuSGFzQW55KCkpCgltcy5Ob3RaZXJvKHUuUGFzc3dvcmRIYXNoKQoKCWNvdW50LCBlcnIgPSBtcy5EQi5Db3VudCgidXNlcnMiKQoJbXMuTm9FcnJvcihlcnIpCgltcy5FcXVhbCgxLCBjb3VudCkKCgl1ID0gJm1vZGVscy5Vc2VyewoJCUVtYWlsOiAgICAibWFya0BleGFtcGxlLmNvbSIsCgkJUGFzc3dvcmQ6ICJwYXNzd29yZCIsCgl9Cgl2ZXJycywgZXJyID0gdS5DcmVhdGUobXMuREIpCgltcy5Ob0Vycm9yKGVycikKCW1zLlRydWUodmVycnMuSGFzQW55KCkpCgoJY291bnQsIGVyciA9IG1zLkRCLkNvdW50KCJ1c2VycyIpCgltcy5Ob0Vycm9yKGVycikKCW1zLkVxdWFsKDEsIGNvdW50KQp9Cg==\"") - packr.PackJSONBytes("../auth/templates", "templates/auth/new.html", "\"PHN0eWxlPgogIC5hdXRoLXdyYXBwZXJ7CiAgICBoZWlnaHQ6IDEwMCU7CiAgICBkaXNwbGF5OiBmbGV4OwogICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgIGp1c3RpZnktY29udGVudDogY2VudGVyOwogIH0KCiAgLmF1dGgtd3JhcHBlciAuc2lnbi1mb3JtewogICAgbWF4LXdpZHRoOiAzNTBweDsKICAgIHdpZHRoOiAxMDAlOwogICAgcGFkZGluZzogMCAyMHB4OwogIH0KCiAgLmF1dGgtd3JhcHBlciBoMXttYXJnaW4tYm90dG9tOiAyMHB4O30KPC9zdHlsZT4KCjxkaXYgY2xhc3M9ImF1dGgtd3JhcHBlciI+CiAgPGRpdiBjbGFzcz0ic2lnbi1mb3JtIj4KICAgIDxoMT5TaWduIEluPC9oMT4KCiAgICA8JT0gZm9ybV9mb3IodXNlciwge2FjdGlvbjogc2lnbmluUGF0aCgpfSkgeyAlPgogICAgICA8JT0gZi5JbnB1dFRhZygiRW1haWwiKSAlPgogICAgICA8JT0gZi5JbnB1dFRhZygiUGFzc3dvcmQiLCB7dHlwZTogInBhc3N3b3JkIn0pICU+CiAgICAgIDxidXR0b24gY2xhc3M9ImJ0biBidG4tc3VjY2VzcyI+U2lnbiBJbiE8L2J1dHRvbj4KICAgIDwlIH0gJT4KICA8L2Rpdj4KPC9kaXY+\"") - packr.PackJSONBytes("../auth/templates", "templates/index.html", "\"PHN0eWxlPgogIC5hdXRoLWNlbnRlcnsKICAgIGRpc3BsYXk6IGZsZXg7CiAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgICBoZWlnaHQ6IDEwMCU7CiAgfQogIC5zaWduLWluLWJ0bnsKICAgIG1hcmdpbi1yaWdodDogMTBweDsKICB9Cjwvc3R5bGU+Cgo8ZGl2IGNsYXNzPSJhdXRoLWNlbnRlciI+CiAgPCU9IGlmIChjdXJyZW50X3VzZXIpIHsgJT4KICAgIDxoMT48JT0gY3VycmVudF91c2VyLkVtYWlsICU+PC9oMT4KICAgIDxhIGhyZWY9Ii9zaWdub3V0IiBkYXRhLW1ldGhvZD0iREVMRVRFIj5TaWduIE91dDwvYT4KICA8JSB9IGVsc2UgeyAlPgogICAgPGEgaHJlZj0iL3NpZ25pbiIgY2xhc3M9ImJ0biBidG4tcHJpbWFyeSI+U2lnbiBJbjwvYT4KICAgIDxhIGhyZWY9Ii91c2Vycy9uZXciIGNsYXNzPSJidG4gYnRuLXN1Y2Nlc3MiPlJlZ2lzdGVyPC9hPgogIDwlIH0gJT4KPC9kaXY+Cg==\"") - packr.PackJSONBytes("../auth/templates", "templates/users/new.html", "\"PHN0eWxlPgogIC5hdXRoLXdyYXBwZXJ7CiAgICBoZWlnaHQ6IDEwMCU7CiAgICBkaXNwbGF5OiBmbGV4OwogICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgIGp1c3RpZnktY29udGVudDogY2VudGVyOwogIH0KCiAgLmF1dGgtd3JhcHBlciAuc2lnbi1mb3JtewogICAgbWF4LXdpZHRoOiAzNTBweDsKICAgIHdpZHRoOiAxMDAlOwogICAgcGFkZGluZzogMCAyMHB4OwogIH0KCiAgLmF1dGgtd3JhcHBlciBoMXttYXJnaW4tYm90dG9tOiAyMHB4O30KPC9zdHlsZT4KICAKPGRpdiBjbGFzcz0iYXV0aC13cmFwcGVyIj4KICA8ZGl2IGNsYXNzPSJzaWduLWZvcm0iPgogICAgPGgxPlJlZ2lzdGVyPC9oMT4KCiAgICA8JT0gZm9ybV9mb3IodXNlciwge2FjdGlvbjogdXNlcnNQYXRoKCl9KSB7ICU+CiAgICAgIDwlPSBmLklucHV0VGFnKCJFbWFpbCIpICU+CiAgICAgIDwlPSBmLklucHV0VGFnKCJQYXNzd29yZCIsIHt0eXBlOiAicGFzc3dvcmQifSkgJT4KICAgICAgPCU9IGYuSW5wdXRUYWcoIlBhc3N3b3JkQ29uZmlybWF0aW9uIiwge3R5cGU6ICJwYXNzd29yZCJ9KSAlPgogICAgICAKICAgICAgPGJ1dHRvbiBjbGFzcz0iYnRuIGJ0bi1zdWNjZXNzIj5SZWdpc3RlciE8L2J1dHRvbj4KICAgIDwlIH0gJT4KICA8L2Rpdj4KPC9kaXY+\"") + packr.PackJSONBytes("../auth/templates", "templates/auth/new.plush.html", "\"PHN0eWxlPgogIC5hdXRoLXdyYXBwZXJ7CiAgICBoZWlnaHQ6IDEwMCU7CiAgICBkaXNwbGF5OiBmbGV4OwogICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgIGp1c3RpZnktY29udGVudDogY2VudGVyOwogIH0KCiAgLmF1dGgtd3JhcHBlciAuc2lnbi1mb3JtewogICAgbWF4LXdpZHRoOiAzNTBweDsKICAgIHdpZHRoOiAxMDAlOwogICAgcGFkZGluZzogMCAyMHB4OwogIH0KCiAgLmF1dGgtd3JhcHBlciBoMXttYXJnaW4tYm90dG9tOiAyMHB4O30KPC9zdHlsZT4KCjxkaXYgY2xhc3M9ImF1dGgtd3JhcHBlciI+CiAgPGRpdiBjbGFzcz0ic2lnbi1mb3JtIj4KICAgIDxoMT5TaWduIEluPC9oMT4KCiAgICA8JT0gZm9ybV9mb3IodXNlciwge2FjdGlvbjogc2lnbmluUGF0aCgpfSkgeyAlPgogICAgICA8JT0gZi5JbnB1dFRhZygiRW1haWwiKSAlPgogICAgICA8JT0gZi5JbnB1dFRhZygiUGFzc3dvcmQiLCB7dHlwZTogInBhc3N3b3JkIn0pICU+CiAgICAgIDxidXR0b24gY2xhc3M9ImJ0biBidG4tc3VjY2VzcyI+U2lnbiBJbiE8L2J1dHRvbj4KICAgIDwlIH0gJT4KICA8L2Rpdj4KPC9kaXY+\"") + packr.PackJSONBytes("../auth/templates", "templates/index.plush.html", "\"PHN0eWxlPgogIC5hdXRoLWNlbnRlcnsKICAgIGRpc3BsYXk6IGZsZXg7CiAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7CiAgICBoZWlnaHQ6IDEwMCU7CiAgfQogIC5zaWduLWluLWJ0bnsKICAgIG1hcmdpbi1yaWdodDogMTBweDsKICB9Cjwvc3R5bGU+Cgo8ZGl2IGNsYXNzPSJhdXRoLWNlbnRlciI+CiAgPCU9IGlmIChjdXJyZW50X3VzZXIpIHsgJT4KICAgIDxoMT48JT0gY3VycmVudF91c2VyLkVtYWlsICU+PC9oMT4KICAgIDxhIGhyZWY9Ii9zaWdub3V0IiBkYXRhLW1ldGhvZD0iREVMRVRFIj5TaWduIE91dDwvYT4KICA8JSB9IGVsc2UgeyAlPgogICAgPGEgaHJlZj0iL3NpZ25pbiIgY2xhc3M9ImJ0biBidG4tcHJpbWFyeSI+U2lnbiBJbjwvYT4KICAgIDxhIGhyZWY9Ii91c2Vycy9uZXciIGNsYXNzPSJidG4gYnRuLXN1Y2Nlc3MiPlJlZ2lzdGVyPC9hPgogIDwlIH0gJT4KPC9kaXY+Cg==\"") + packr.PackJSONBytes("../auth/templates", "templates/users/new.plush.html", "\"PHN0eWxlPgogIC5hdXRoLXdyYXBwZXJ7CiAgICBoZWlnaHQ6IDEwMCU7CiAgICBkaXNwbGF5OiBmbGV4OwogICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgIGp1c3RpZnktY29udGVudDogY2VudGVyOwogIH0KCiAgLmF1dGgtd3JhcHBlciAuc2lnbi1mb3JtewogICAgbWF4LXdpZHRoOiAzNTBweDsKICAgIHdpZHRoOiAxMDAlOwogICAgcGFkZGluZzogMCAyMHB4OwogIH0KCiAgLmF1dGgtd3JhcHBlciBoMXttYXJnaW4tYm90dG9tOiAyMHB4O30KPC9zdHlsZT4KICAKPGRpdiBjbGFzcz0iYXV0aC13cmFwcGVyIj4KICA8ZGl2IGNsYXNzPSJzaWduLWZvcm0iPgogICAgPGgxPlJlZ2lzdGVyPC9oMT4KCiAgICA8JT0gZm9ybV9mb3IodXNlciwge2FjdGlvbjogdXNlcnNQYXRoKCl9KSB7ICU+CiAgICAgIDwlPSBmLklucHV0VGFnKCJFbWFpbCIpICU+CiAgICAgIDwlPSBmLklucHV0VGFnKCJQYXNzd29yZCIsIHt0eXBlOiAicGFzc3dvcmQifSkgJT4KICAgICAgPCU9IGYuSW5wdXRUYWcoIlBhc3N3b3JkQ29uZmlybWF0aW9uIiwge3R5cGU6ICJwYXNzd29yZCJ9KSAlPgogICAgICAKICAgICAgPGJ1dHRvbiBjbGFzcz0iYnRuIGJ0bi1zdWNjZXNzIj5SZWdpc3RlciE8L2J1dHRvbj4KICAgIDwlIH0gJT4KICA8L2Rpdj4KPC9kaXY+\"") } diff --git a/genny/auth/auth.go b/genny/auth/auth.go index 5fa959a..efeabf5 100644 --- a/genny/auth/auth.go +++ b/genny/auth/auth.go @@ -60,7 +60,7 @@ func New(args []string) (*genny.Generator, error) { ctx.Set("attrs", fields) g.Transformer(plushgen.Transformer(ctx)) - g.Transformer(genny.NewTransformer(".html", newUserHTMLTransformer)) + g.Transformer(genny.NewTransformer(".plush.html", newUserHTMLTransformer)) g.Transformer(genny.NewTransformer(".fizz", migrationsTransformer(time.Now()))) g.RunFn(func(r *genny.Runner) error { @@ -91,7 +91,7 @@ func New(args []string) (*genny.Generator, error) { } func newUserHTMLTransformer(f genny.File) (genny.File, error) { - if f.Name() != filepath.Join("templates", "users", "new.html") { + if f.Name() != filepath.Join("templates", "users", "new.plush.html") { return f, nil } diff --git a/genny/auth/templates/actions/auth.go.plush b/genny/auth/templates/actions/auth.go.plush index 2189926..83380f5 100644 --- a/genny/auth/templates/actions/auth.go.plush +++ b/genny/auth/templates/actions/auth.go.plush @@ -16,7 +16,7 @@ import ( // AuthNew loads the signin page func AuthNew(c buffalo.Context) error { c.Set("user", models.User{}) - return c.Render(200, r.HTML("auth/new.html")) + return c.Render(200, r.HTML("auth/new.plush.html")) } // AuthCreate attempts to log the user in with an existing account. @@ -37,7 +37,7 @@ func AuthCreate(c buffalo.Context) error { verrs := validate.NewErrors() verrs.Add("email", "invalid email/password") c.Set("errors", verrs) - return c.Render(422, r.HTML("auth/new.html")) + return c.Render(422, r.HTML("auth/new.plush.html")) } if err != nil { diff --git a/genny/auth/templates/actions/users.go.plush b/genny/auth/templates/actions/users.go.plush index 54eb2d7..302de3a 100644 --- a/genny/auth/templates/actions/users.go.plush +++ b/genny/auth/templates/actions/users.go.plush @@ -10,7 +10,7 @@ import ( func UsersNew(c buffalo.Context) error { u := models.User{} c.Set("user", u) - return c.Render(200, r.HTML("users/new.html")) + return c.Render(200, r.HTML("users/new.plush.html")) } // UsersCreate registers a new user with the application. @@ -29,7 +29,7 @@ func UsersCreate(c buffalo.Context) error { if verrs.HasAny() { c.Set("user", u) c.Set("errors", verrs) - return c.Render(200, r.HTML("users/new.html")) + return c.Render(200, r.HTML("users/new.plush.html")) } c.Session().Set("current_user_id", u.ID) diff --git a/genny/auth/templates/templates/auth/new.html b/genny/auth/templates/templates/auth/new.plush.html similarity index 100% rename from genny/auth/templates/templates/auth/new.html rename to genny/auth/templates/templates/auth/new.plush.html diff --git a/genny/auth/templates/templates/index.html b/genny/auth/templates/templates/index.plush.html similarity index 100% rename from genny/auth/templates/templates/index.html rename to genny/auth/templates/templates/index.plush.html diff --git a/genny/auth/templates/templates/users/new.html b/genny/auth/templates/templates/users/new.plush.html similarity index 100% rename from genny/auth/templates/templates/users/new.html rename to genny/auth/templates/templates/users/new.plush.html diff --git a/go.mod b/go.mod index d1a951c..e300d8b 100644 --- a/go.mod +++ b/go.mod @@ -13,4 +13,3 @@ require ( github.com/pkg/errors v0.8.1 github.com/spf13/cobra v0.0.5 ) - diff --git a/go.sum b/go.sum index 5737675..6ce0376 100644 --- a/go.sum +++ b/go.sum @@ -278,4 +278,4 @@ gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bl gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= \ No newline at end of file diff --git a/packrd/packed-packr.go b/packrd/packed-packr.go index 0ec7668..591c5c6 100644 --- a/packrd/packed-packr.go +++ b/packrd/packed-packr.go @@ -48,9 +48,9 @@ var _ = func() error { b.SetResolver("migrations/create_users.up.fizz.plush", packr.Pointer{ForwardBox: gk, ForwardPath: "01efea4d6d4f2fb6b50ff6fcb970823d"}) b.SetResolver("models/user.go.plush", packr.Pointer{ForwardBox: gk, ForwardPath: "1fc930c75792016a1c02e707369c07ad"}) b.SetResolver("models/user_test.go.plush", packr.Pointer{ForwardBox: gk, ForwardPath: "d7cb14f200ed8706eae2ebb5882415d0"}) - b.SetResolver("templates/auth/new.html", packr.Pointer{ForwardBox: gk, ForwardPath: "259d7197380562e655e1b260c90e3b18"}) - b.SetResolver("templates/index.html", packr.Pointer{ForwardBox: gk, ForwardPath: "cbcf66c5bc866650aaf694ddd72aa6d9"}) - b.SetResolver("templates/users/new.html", packr.Pointer{ForwardBox: gk, ForwardPath: "34e78888b9c1706ba3b6b9218a56b180"}) + b.SetResolver("templates/auth/new.plush.html", packr.Pointer{ForwardBox: gk, ForwardPath: "259d7197380562e655e1b260c90e3b18"}) + b.SetResolver("templates/index.plush.html", packr.Pointer{ForwardBox: gk, ForwardPath: "cbcf66c5bc866650aaf694ddd72aa6d9"}) + b.SetResolver("templates/users/new.plush.html", packr.Pointer{ForwardBox: gk, ForwardPath: "34e78888b9c1706ba3b6b9218a56b180"}) }() func() {