Commit 359f5d1cc2646464b0f127b19e37d6c76bbdd30d

Authored by Antonio Terceiro
1 parent 2dd3d36d

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.
Showing 1 changed file with 7 additions and 9 deletions   Show diff stats
lib/tasks/plugins_tests.rake
... ... @@ -21,17 +21,15 @@ def disabled_plugins
21 21 @all_plugins - enabled_plugins
22 22 end
23 23  
24   -def enable_plugins(plugins = nil)
25   - if plugins == '*' || plugins.nil?
26   - sh './script/noosfero-plugins', '-q', 'enableall'
27   - else
28   - plugins = Array(plugins)
29   - sh './script/noosfero-plugins', '-q', 'enable', *plugins
30   - end
  24 +def enable_plugins(plugins)
  25 + plugins = Array(plugins)
  26 + command = ['./script/noosfero-plugins', '-q', 'enable', *plugins]
  27 + puts plugins.join(' ')
  28 + system *command
31 29 end
32 30  
33   -def disable_plugins(plugins = nil)
34   - if plugins == '*' || plugins.nil?
  31 +def disable_plugins(plugins = '*')
  32 + if plugins == '*'
35 33 sh './script/noosfero-plugins', '-q', 'disableall'
36 34 else
37 35 plugins = Array(plugins)
... ...