Tumgik
Text
Revel Tool
The revel tool has been a major focus point for development recently. One of the ongoing issues is how to update my local environment when a new version is release. Typically in the past that was simply a go get -u github.com/revel/cmd/revel - but that came with a bunch of dependencies which caused huge burdens on people who wanted to continue to work on a specific framework version. Recently we split the command tool from the framework, which eliminated this problem. But then immediately caused another. The framework was then out of synch with the revel tool and the modules. Version v0.21 we addressed this by enhancing the tool revel version command which now shows the results of the local library and the remote library. If your Revel application has a vendor folder it will event show that when you specify the application path like revel version -a myapp.
Revel executing: displays the Revel Framework and Go version Revel Framework : 0.21.0-dev (0.21.0 remote master branch) Revel Cmd : 0.21.1 (0.21.0 remote master branch) Revel Modules : 0.21.0-dev (0.21.0 remote master branch) go version go1.9.1 linux/amd64
Now the extra special sauce is you can update the revel framework from the tool with a revel version --update and if the remote is newer it will update the framework, modules and the command tool.
0 notes
Text
V 0.21.0
New items
Session Engine support You can now define your own session engine. By default the cookie engine is the one used for the session, but with this change you can implement your own. Also controller.Session is now a map[string]interface{} which means you can place any object that can be serialized to a string.
Added http mux support you can now integrate Revel with packages that have their own HTTP muxers. This allows you to integrate with Hugo, Swagger or any suite of software that is out there.
revel.controller.reuse app.conf option to turn on / off reuse of the controllers. Defaults to true
Breaking changes
controller.Session is now a map[string]interface{} (previously was map[string]string) this means existing code needs to cast any values they pull from the session
if username, ok := c.Session["user"]; ok { // username is a string type return c.getUser(username) }
changes to
if username, ok := c.Session["user"]; ok { // username is an interface{} type return c.getUser(username.(string)) }
Deprecated log points removed revel.ERROR, revel.TRACE, revel.DEBUG, revel.WARN have been removed
Function name change revel.OnAppStop Replaced revel.OnAppShutdown
revel.SimpleStack was moved to github.com/revel/revel/utils.SimpleStack
And more....
0 notes
Text
Revel 0.20.0 Released
New items
Updated minimum Go requirements to Go 1.8
Revel Cmd changes
See manual for more information on the flags and new features
Rewrote revel/cmd package so it has no dependencies on revel/revel - future releases for revel/cmd will not be on the same schedule as revel/revel
Added flag support to revel/cmd ,
Added automatic vendor creation flag, when enabled a vendor folder will be added and used to the project
Added [DEFAULT] section to message skeleton so multiple lines work
If port specified is 0 then proxy can will run on a random free port
Split main file into two files so it may be invoked using other methods
Added ability to only monitor and update build files (without running a proxy)
Auto download revel/revel, revel/cmd - if you point your GOPATH to an empty directory the revel tool will still be able to create a new project
Made application path smarter. Now supports absolute paths and relatives paths.
modified revel run to pass in json code to the revel.Init function in place of the mode field. This allows for dynamic information to be passed to the Revel Server. This can be disabled by using this flag --historic-run-mode
modified revel new added -V to auto create the vendor folder inside the application along with the Gopkg.toml file.
modified revel new added -r to run the application after creating it.
revel/module
Enhanced gorp module to make database schema available
Added server-engine server-engine/gohttptest and a testsuite file that implements all the methods from revel/testsuite. This test engine as an alpha implementation to be able to run go test from the command line. Meaning your tests can now live beside the controller. An example testsuite is here
Updated static module, moved a structure into a model package
revel/revel
Added startup fail REVEL_FAILURE event
Added HTTP_REQUEST_CONTEXT fetch
Added websockets Message.Send / Message.Receive functions.
Enhanced required validator
Graceful shutdown added. By doing a revel.RaiseEvent()
Breaking Changes
Request.Context() map[string]interface() renamed to Request.Args() map[string]interface() new function added which returns the request.Context for the server-engine that supports it Request.Context() context.Context revel.EventHandler signature was func(typeOf int, value interface{}) (responseOf int) now it is func(typeOf Event, value interface{}) (responseOf EventResponse)
0 notes
Text
Logging
Revel uses a multi level logger like log15 to provide extensive logging capabilities for the framework. The logger has build in filters which set from the app.conf for basic configuration options. It is also easy to add new log outputs by using a custom logging function. Log output can be JSON format 
0 notes