HackSoc/csbot — pull request #61 by alanbriolat (2014-06-11 19:23:22+00:00)
Title: Fix mongodb plugin to work with a single database

Adds a new "use/provide" mechanism to plugins. An example of use:

```python
class PluginA(Plugin):
foo = Plugin.use('pluginb', bar='baz')

class PluginB(Plugin):
def provide(self, plugin_name, bar):
return 'Hello {}, have some {}'.format(plugin_name, bar)
```

This implicitly makes ``PluginA`` depend on ``PluginB``, and causes ``foo`` to get replaced on a ``PluginA`` instance (when the base class ``setup()`` is run) with the result of calling ``provide(...)`` on the PluginB instance.

Modifies mongodb plugin to use this mechanism to provide collections, and modifies termdates plugin to use this mechanism instead of ``@Plugin.integrate_with(...)``.