This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 579
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
962 additions
and
448 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,14 @@ | ||
[{ | ||
"path": "mailers/ouch.go", | ||
"absent": true | ||
}, | ||
{ | ||
"path": "templates/mail/ouch.html", | ||
"absent": true | ||
}] | ||
"path": "mailers/ouch.go", | ||
"absent": true | ||
}, | ||
{ | ||
"path": "templates/mail/ouch.html", | ||
"absent": true | ||
}, | ||
{ | ||
"path": "templates/mail/ouch.plush.html", | ||
"absent": true | ||
} | ||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
[{ | ||
"path": "actions/comments.go", | ||
"contains": [ | ||
"func CommentsShow(c buffalo.Context) error {", | ||
"func CommentsEdit(c buffalo.Context) error {", | ||
"comments/edit.html", | ||
"comments/show.html" | ||
] | ||
}, | ||
{ | ||
"path": "actions/app.go", | ||
"contains": [ | ||
"app.GET(\"/comments/show\", CommentsShow)", | ||
"app.GET(\"/comments/edit\", CommentsEdit)" | ||
] | ||
}, | ||
{ | ||
"path": "templates/comments/show.html", | ||
"contains": [ | ||
"<h1>Comments#Show</h1>" | ||
] | ||
}] | ||
"path": "actions/comments.go", | ||
"contains": [ | ||
"func CommentsShow(c buffalo.Context) error {", | ||
"func CommentsEdit(c buffalo.Context) error {", | ||
"comments/edit.html", | ||
"comments/show.html" | ||
] | ||
}, | ||
{ | ||
"path": "actions/app.go", | ||
"contains": [ | ||
"app.GET(\"/comments/show\", CommentsShow)", | ||
"app.GET(\"/comments/edit\", CommentsEdit)" | ||
] | ||
}, | ||
{ | ||
"path": "templates/comments/show.plush.html", | ||
"contains": [ | ||
"<h1>Comments#Show</h1>" | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
[ | ||
{ | ||
"path": "actions/users.go", | ||
"contains": [ | ||
"func UsersCreate(c buffalo.Context) error {" | ||
] | ||
}, | ||
{ | ||
"path": "templates/users/create.html", | ||
"absent": true | ||
} | ||
] | ||
[{ | ||
"path": "actions/users.go", | ||
"contains": [ | ||
"func UsersCreate(c buffalo.Context) error {" | ||
] | ||
}, | ||
{ | ||
"path": "templates/users/create.html", | ||
"absent": true | ||
}, | ||
{ | ||
"path": "templates/users/create.plush.html", | ||
"absent": true | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
[ | ||
{ | ||
"path": "actions/users.go", | ||
"contains": [ | ||
"func UsersCreate(c buffalo.Context) error {" | ||
] | ||
}, | ||
{ | ||
"path": "templates/users/update.html", | ||
"absent": true | ||
}, | ||
{ | ||
"path": "actions/app.go", | ||
"contains": ["app.POST(\"/users/update\", UsersUpdate)"] | ||
} | ||
] | ||
[{ | ||
"path": "actions/users.go", | ||
"contains": [ | ||
"func UsersCreate(c buffalo.Context) error {" | ||
] | ||
}, | ||
{ | ||
"path": "templates/users/update.html", | ||
"absent": true | ||
}, | ||
{ | ||
"path": "templates/users/update.plush.html", | ||
"absent": true | ||
}, | ||
{ | ||
"path": "actions/app.go", | ||
"contains": ["app.POST(\"/users/update\", UsersUpdate)"] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,7 @@ var checks = []Check{ | |
fixDocker, | ||
encodeApp, | ||
Plugins, | ||
Plush, | ||
} | ||
|
||
func encodeApp(r *Runner) error { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package fix | ||
|
||
import ( | ||
"fmt" | ||
"io" | ||
"os" | ||
"path/filepath" | ||
"strings" | ||
) | ||
|
||
// Plush will update foo.html templates to foo.plush.html templates | ||
func Plush(r *Runner) error { | ||
fmt.Println("~~~ Adding .plush extension to .html files ~~~") | ||
return filepath.Walk(r.App.Root, func(p string, info os.FileInfo, err error) error { | ||
if err != nil { | ||
return err | ||
} | ||
|
||
dir := filepath.Dir(p) | ||
base := filepath.Base(p) | ||
sep := strings.Split(base, ".") | ||
|
||
if filepath.Ext(p) != ".html" { | ||
return nil | ||
} | ||
|
||
if len(sep) != 2 { | ||
return nil | ||
} | ||
|
||
pn := filepath.Join(dir, sep[0]+".plush."+sep[1]) | ||
|
||
fn, err := os.Create(pn) | ||
if err != nil { | ||
return err | ||
} | ||
defer fn.Close() | ||
|
||
fo, err := os.Open(p) | ||
if err != nil { | ||
return err | ||
} | ||
defer fo.Close() | ||
_, err = io.Copy(fn, fo) | ||
|
||
defer os.Remove(p) | ||
|
||
return err | ||
}) | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
genny/mail/init/templates/templates/mail/layout.plush.html.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<h1>templates/mailers/layout.plush.html</h1> | ||
|
||
<%= yield %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.