[Git][noosfero/noosfero][master] plugins: don't abort on failure of a single plugin

Antonio Terceiro gitlab at mg.gitlab.com
Mon Nov 9 15:02:59 BRST 2015


Antonio Terceiro pushed to branch master at Noosfero / noosfero


Commits:
359f5d1c by Antonio Terceiro at 2015-11-09T15:00:36Z
plugins: don't abort on failure of a single plugin

script/noosfero-plugins will now fail if the plugin dependencies are not
met, which caused the whole set of plugin tests to be aborted at the
first plugin whose dependencies were not available.

- - - - -


1 changed file:

- lib/tasks/plugins_tests.rake


Changes:

=====================================
lib/tasks/plugins_tests.rake
=====================================
--- a/lib/tasks/plugins_tests.rake
+++ b/lib/tasks/plugins_tests.rake
@@ -21,17 +21,15 @@ def disabled_plugins
   @all_plugins - enabled_plugins
 end
 
-def enable_plugins(plugins = nil)
-  if plugins == '*' || plugins.nil?
-    sh './script/noosfero-plugins', '-q', 'enableall'
-  else
-    plugins = Array(plugins)
-    sh './script/noosfero-plugins', '-q', 'enable', *plugins
-  end
+def enable_plugins(plugins)
+  plugins = Array(plugins)
+  command = ['./script/noosfero-plugins', '-q', 'enable', *plugins]
+  puts plugins.join(' ')
+  system *command
 end
 
-def disable_plugins(plugins = nil)
-  if plugins == '*' || plugins.nil?
+def disable_plugins(plugins = '*')
+  if plugins == '*'
     sh './script/noosfero-plugins', '-q', 'disableall'
   else
     plugins = Array(plugins)



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/359f5d1cc2646464b0f127b19e37d6c76bbdd30d
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20151109/40bd2039/attachment.html>


More information about the Noosfero-dev mailing list