hudmol/archivesspace — pull request #695 by marktriggs (2014-02-19 03:58:33+00:00)
Title: Newrelic plugin

I've reworked #690 to bring in New Relic as a plugin. I had to make a few changes to the plugin system to address the issues that @mark-cooper hit. So now:

* Each plugin can provide its own Gemfile, listing any gems it depends on

* There's a new `initialize-plugin` script that you run after placing the plugin under `plugins/`. That will sniff out any Gemfiles and install gems under a `gems` subdirectory of the plugin. I guess this could do other things too if that were ever useful.

* When the system starts up, it extends the gem search path to include the gems from all plugins.

So with all of that, I switched the `newrelic_rpm` gem to load as a part of plugin initialization, using environment variables to point it to the `newrelic.yml` file in the right location. Everything else is basically the same, and I just tweaked the documentation to cover the extra steps relating to plugins.

At the moment I've left the plugin switched off by default, so it will be included with the distribution but not activated by default. If people want to enable it they'll just need to run the `initialize-plugin` script and add the entries to their `config.rb`.

Thanks for doing this, Mark. We've been thinking recently that plugins might need to load their own custom gems, so this was a perfect test case :)

Mark