existentialmutt/lt-ruby — pull request #28 by mharris717 (2014-02-11 20:48:44+00:00)
Title: Plugins

So I've got a basic plugin system working. Very interested in using this code as a discussion point. I can squash it down later when we're getting close to a merge.

Highlights:

* A plugin is just a normal Ruby class that optionally implements some methods and registers itself with LtRuby::Plugin.register.

* Plugins can hook in and do things at specified points. Right now the only one implemented is "connected completed."

* Plugins can handle messages from Light Table. I've moved the spec runner and project file code into plugins. The regular eval code could also be moved into a plugin.

* User can specify plugins to load with the (:lt.objs.langs.ruby/use-plugin NAME) user behavior. As of now this just calls require NAME.

* Anyone can make a plugin, package it as a regular gem (or use a gem released by someone else), and include it with the user behavior. The plugin will be loaded and will be a first class citizen.