newrelic-platform/newrelic_plugins_chef — pull request #29 by jujugrrr (2014-11-03 12:32:35+00:00)
Title: Renamed install_plugin definition to prevent conflict

Hi,
I've tried to use the newrelic_plugin and it worked well. However As soon I've added an other cookbook(elasticsearch) to my metadata it failed.

It's coming from a conflict between the definition `install_plugin` in [newrelic_plugin_chef](https://github.com/newrelic-platform/newrelic_plugins_chef/blob/master/definitions/install_plugin.rb) and the `install_plugin` method from [elasticsearch cookbook](https://github.com/elasticsearch/cookbook-elasticsearch/blob/master/libraries/install_plugin.rb).

`recipes/mysql.rb` was trying to install a plugin but it was actually calling the elasticsearch method, therefore I got errors like this :

```
Chef::Exceptions::ResourceNotFound:
resource ruby_block[Install plugin: newrelic_mysql_plugin] is configured to notify resource service[elasticsearch] with action restart, but service[elasticsearch] cannot be found in the resource collection. ruby_block[Install plugin: newrelic_mysql_plugin] is defined in /var/folders/0p/l33795bn35ng4f_6p_7sqtbm2tcccx/T/d20141103-22587-13abh3b/cookbooks/elasticsearch/libraries/install_plugin.rb:35:in `install_plugin'
```

I've not been able to find a better solution than to rename the definition in newrelic_plugins_chef. It's a small change, and should prevent any further conflict.

It's a big blocker for us, and I guess it would be for other people too.

Thank you!