github/gollum — pull request #515 by keithduncan (2012-09-15 20:17:05+00:00)
Title: Populate author details using the session

I couldn’t find a supported way to populate the Gollum::Committer with per-author details.

I’ve built a stack of rack middleware that first authenticates users and then populates the session with author details before finally running Precious::App, which using this change reads them from the session to form part of the commit message.

The session['gollum.author'] parameters are expected to overlap with what Gollum::Committer expects in it’s options dictionary.

I also made the commit_message method private now that it depends on the session I only want it called from a request handler in App.

If there’s already a supported way to populate per-author details let me know and I’ll use that instead.