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

Commit

Permalink
Merge pull request #81 from gobuffalo/0.7.0
Browse files Browse the repository at this point in the history
0.7.0
  • Loading branch information
markbates authored Jan 4, 2017
2 parents e4fadf1 + e49690d commit e219958
Show file tree
Hide file tree
Showing 32 changed files with 793 additions and 260 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ RUN buffalo db migrate -e test
RUN buffalo test -race
RUN buffalo g goth facebook twitter linkedin github
RUN buffalo test -race
RUN buffalo build
59 changes: 26 additions & 33 deletions buffalo/cmd/app_generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ func newAppGenerator(data gentronics.Data) *gentronics.Generator {
g := gentronics.New()
g.Add(gentronics.NewFile("README.md", nREADME))
g.Add(gentronics.NewFile("main.go", nMain))
g.Add(gentronics.NewFile("Procfile", nProcfile))
g.Add(gentronics.NewFile("Procfile.development", nProcfileDev))
g.Add(gentronics.NewFile(".buffalo.dev.yml", nRefresh))
g.Add(gentronics.NewFile(".codeclimate.yml", nCodeClimate))
g.Add(gentronics.NewFile("actions/app.go", nApp))
Expand Down Expand Up @@ -49,63 +47,62 @@ func appGoGet() *exec.Cmd {
return exec.Command("go", appArgs...)
}

const nREADME = `# {{name}}
const nREADME = `# {{name}}
## Documentation
To view generated docs for {{name}}, run the below command and point your brower to http://127.0.0.1:6060/pkg/
godoc -http=:6060 2>/dev/null &
### Buffalo
### Buffalo
http://gobuffalo.io/docs/getting-started
### Pop/Soda
http://gobuffalo.io/docs/db
## Database Configuration
development:
dialect: postgres
database: {{name}}_development
user: <username>
password: <password>
host: 127.0.0.1
pool: 5
test:
dialect: postgres
database: {{name}}_test
user: <username>
password: <password>
host: 127.0.0.1
production:
dialect: postgres
database: {{name}}_production
user: <username>
password: <password>
host: 127.0.0.1
pool: 25
### Running Migrations
buffalo soda migrate
## Run Tests
buffalo test
## Run in dev
buffalo dev
[Powered by Buffalo](http://gobuffalo.io)
`

const nMain = `package main
import (
Expand Down Expand Up @@ -176,15 +173,16 @@ import (
)
var r *render.Engine
var resolver = &resolvers.RiceBox{
Box: rice.MustFindBox("../templates"),
}
func init() {
r = render.New(render.Options{
HTMLLayout: "application.html",
CacheTemplates: ENV == "production",
FileResolver: resolver,
FileResolverFunc: func() resolvers.FileResolver {
return &resolvers.RiceBox{
Box: rice.MustFindBox("../templates"),
}
},
})
}
Expand Down Expand Up @@ -287,6 +285,8 @@ const nGitignore = `vendor/
bin/
node_modules/
.sass-cache/
rice-box.go
public/assets/
{{ name }}
`

Expand Down Expand Up @@ -340,13 +340,6 @@ enable_colors: true
log_name: buffalo
`

const nProcfile = `web: {{name}}`
const nProcfileDev = `web: buffalo dev
{{#if withWebpack}}
assets: webpack --watch
{{/if}}
`

const nCodeClimate = `engines:
golint:
enabled: true
Expand Down
Loading

0 comments on commit e219958

Please sign in to comment.