Commit 0897a8cc191d9f445ada4f0095755339d61d42a1
1 parent
3aa854b8
Exists in
r5_design
and in
1 other branch
Refactor plugins_spb activate.
Separate activate plugins in activate plugins and migrate plugins in each execute. Signed-off-by: Thiago Ribeiro <thiagitosouza@gmail.com> Signed-off-by: Paulo Tada <paulohtfs@gmail.com>
Showing
1 changed file
with
7 additions
and
3 deletions
Show diff stats
cookbooks/noosfero/recipes/default.rb
@@ -66,9 +66,13 @@ plugins_spb = [ | @@ -66,9 +66,13 @@ plugins_spb = [ | ||
66 | #FIXME: We did it, because we have to enable each plugin and migrate it separately. | 66 | #FIXME: We did it, because we have to enable each plugin and migrate it separately. |
67 | plugins_spb.each do |plugin| | 67 | plugins_spb.each do |plugin| |
68 | execute ('plugins_spb:activate:' + plugin) do | 68 | execute ('plugins_spb:activate:' + plugin) do |
69 | - command '/usr/lib/noosfero/script/noosfero-plugins enable ' + plugin + | ||
70 | - ' && RAILS_ENV=production SCHEMA=/dev/null bundle exec ' + | ||
71 | - 'rake db:migrate' | 69 | + command '/usr/lib/noosfero/script/noosfero-plugins enable ' + plugin |
70 | + end | ||
71 | + | ||
72 | + execute ('plugins_spb:migrate:' + plugin) do | ||
73 | + command 'RAILS_ENV=production SCHEMA=/dev/null bundle exec rake db:migrate' | ||
74 | + cwd '/usr/lib/noosfero' | ||
75 | + user 'noosfero' | ||
72 | end | 76 | end |
73 | end | 77 | end |
74 | 78 |