redline6561/coleslaw — pull request #54 by PuercoPop (2014-08-16 01:53:15+00:00)
Title: Twitter summary card

Oi,
this plugin adds to relevant markup for posts to show [summary-cards](https://dev.twitter.com/docs/cards/types/summary-card) when shared in twitter.

In order for the plugin to work an interface change to add-injection is needed. Currently add-inject first parameter can be either a string or a list of a string an a predicate function. I propose of the parameter to be either a string or a function, the string case works the same but the predicate funtion should return a string or nil and if not nil then the string is inserted. The motivation is to enable plugins which need content dependent information, such as this one.

I also included a mini test suite (which I don't expect it to be merged) for two reasons:
- First to illustrate a pain point with the current plugin developer (user?) story. There is no way to easily load the plugin in the repl. Or to programatically load it through asd in order to run the test suite. I don't know which would be the best solution in this case but looking at how [wookie implements plugins](https://github.com/orthecreedence/wookie/blob/master/plugin.lisp#L181) might not be a bad idea.
- Second to make stefil more known, I recently found hu.dwim.stefil and I found it more simple to use than fiveam. Tests are just a function except they offer custom restarts for interactive development. The only problem was the lack of documentation. Just the other day I found a [fork of stefil](https://github.com/luismbo/stefil) that fares better in that regard.

Let me know if you agree to the interface change.