Three Release Candidates And A Website

Scott Offen

Scott Offen

Grapevine Creator

img

Three release candidates dropped in the first 5 days of 2021! I'll tell you what's up with that. Meanwhile, the Sample project gets a website, issues are turned on as well as discussions, code of conduct and contributing guidelines are in place, and so I turn my focus now to documentation.

Release Candidate 5.0.0-rc.0#

The first release candidate saw the first implementation of ContentFolder, which makes it possible to easily serve static files (e.g. a website) from Grapevine. You will, of course, need to turn on the middleware to make that happen, as the logic for returning files was moved out of the RestServer and into OnRequest handlers.

var folderPath = Path.Combine(Directory.GetCurrentDirectory(), "website");
server.ContentFolders.Add(new ContentFolder(folderPath));
server.UseContentFolders();

Release Candidate 5.0.0-rc.1#

Sadly, the first release candidate was short lived. I realized almost immedietly that I forgot to change the default service lifetime of the route classes to Scoped, and instead left them at Transient. Maybe not a big deal, but depending on how granular your routes are, could be huge. Huge. So, I fixed it.

img

I also realized as I was beefing up the Sample project that there was a problem with the way path info was being generated in the route scanner when base paths and regular expression strings were being passed in, so I fixed that, too.

Release Candidate 5.0.0-rc.2#

Being able to match routes based on header values has been on the Grapevine 5 roadmap from the start. I've been kicking around how to implement that with the route scanner for awhile now, and I think I have a suitable solution here. This is the only code change in this release candidate.

Sample Project Website#

The Samples project is intended to show useage patterns for easy adoption. I've added a nice website to the sample, and a bunch of example routes that you can look at and experiment with. There is even an example of a route that stops the server, invoked from a button on the webpage!

img

And with this, I turn my focus to documentation.