From b92f86327b85802f3b0352cd819feaee3f46312a Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Mon, 7 Apr 2014 15:18:04 +0000 Subject: [PATCH] ldap-plugin: install gem only if not installed already --- plugins/ldap/install.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/ldap/install.rb b/plugins/ldap/install.rb index ec00696..4adb9f8 100644 --- a/plugins/ldap/install.rb +++ b/plugins/ldap/install.rb @@ -1,4 +1,9 @@ -system "gem install --user-install net-ldap -v 0.3.1" +begin + gem "net-ldap", '=0.3.1' +rescue Gem::LoadError => exception + system "gem install --user-install net-ldap -v 0.3.1" +end + puts "\nWARNING: This plugin is not setting up a ldap test server automatically. Some tests may not be running. If you want to fully test this plugin, please setup the ldap test server and make the proper configurations on -- libgit2 0.21.2