Release Notes


v0.2.0

June 02 2020
  • Changes to Rubik’s Controller signature — Everything is a controller - #32
var r := rubik.Route{
    Path: “/”,
    Controller: indexCtl,
}

// === old method signature ===
// fund indexCtlOld(en interface{}) rubik.ByteResponse{
//  return rubik.Success("Hello World")
// }

// === much cleaner and simple 0.2.0 method signature ===
func indexCtl(req *rubik.Request) {
    // rubik.Failure is now (req.Throw)
    req.Respond(“Hello World")
}
  • Now supports interop with Go's stdlib -- Any Handler || HandlerFunc can be casted to Controller
var r := rubik.Route{
    Path: “/”,
    Controller: rubik.UseHandlerFunc(indexHandlerFunc), // OR UseHandler() for handlers
}

func indexHandlerFunc(w http.ResponseWriter, r *http.Request) {
    fmt.Fprint(&w, “Hello world")
}
  • okrubik gen router ${name} this command now parses ast properly and adds the new router import and its invocation
  • There is a new method call NewProbe() which helps you with testing rubik.Router(s)
  • CLI is now migrated to cobra instead of vanilla flag.Parse() for scalability reasons - #5
  • Improved API Documentation

v0.1

May 29 2020
  • Basic structure setup and conventions
  • okrubik CLI
  • rubik-client - alpha

Milestone: Rubik One

---
Caught a mistake or want to contribute to the documentation? Edit on GitHub!