Commit a43ac630967677eb7d89c1b90a49ab5d59a874ea

Authored by Antonio Terceiro
1 parent 083440f4

ActionItem862: testing further the 0.13 migration

script/apply-template
... ... @@ -17,11 +17,16 @@ when 'active-enterprise'
17 17 when 'community'
18 18 communities = Community.find(:all) - [Community['espaco'], Community['anarquismo']]
19 19 communities.each { |community|
  20 + puts 'c: ' + community.identifier
20 21 community.apply_template(env.community_template)
21   - blog = community.blog
22   - community.articles.select{|i| !i.blog? or i != blog.feed}.each{ |article|
23   - article.parent = blog
24   - article.save!
  22 + community.reload
  23 + puts 'template applied'
  24 + community.articles.each { |article|
  25 + puts 'including ' + article.path + ' in the blog'
  26 + if !article.blog? && !article.is_a?(RssFeed)
  27 + article.parent_id = community.blog.id
  28 + article.save!
  29 + end
25 30 }
26 31 }
27 32 end
... ...
script/release-v0.13.0-ecosol
1 1 #!/bin/sh
2 2  
3   -export RAILS_ENV=production
  3 +if [ -x $RAILS_ENV ]; then
  4 + export RAILS_ENV=production
  5 +fi
  6 +
  7 +echo "Rails environment: $RAILS_ENV"
4 8  
5 9 echo 'Creating Big images...'
6 10 script/generate-profile-big-images
... ... @@ -73,7 +77,7 @@ script/runner 'env = Environment.default;
73 77 echo 'ATENCAO: Copie o tema (via scp) empreendimento-solidario para public/designs/themes/'
74 78 echo ' Nao esqueca de copiar o footer.rhtml do tema default'
75 79 echo ' (e pressione ENTER para continuar)'
76   -read
  80 +read INPUT
77 81  
78 82 echo 'Applying empreendimento-solidario theme...'
79 83 script/runner 'c = Enterprise.connection;
... ... @@ -120,7 +124,7 @@ echo 'Schedule task-nitifier script...'
120 124 echo 'ATENCAO: Agende o script task-notifier no crontab para executar mensalmente'
121 125 echo ' Não esqueça de setar no environment.rb o ambiente para production'
122 126 echo ' (pressione ENTER para continuar)'
123   -read
  127 +read INPUT
124 128  
125 129 echo 'Disabling CMS...'
126 130 script/runner 'env = Environment.default
... ...
script/test-0.13 0 → 100755
... ... @@ -0,0 +1,13 @@
  1 +#!/bin/sh
  2 +
  3 +rm -f db/*.db
  4 +find public/images/ -name \*big\* -delete
  5 +rake db:schema:load
  6 +rake db:populate
  7 +ruby script/anhetegua
  8 +
  9 +./script/runner '
  10 + Enterprise.create!(:name => "Desabilitada", :identifier => "desabilitada", :enabled => false, :environment => Environment.default)
  11 +'
  12 +
  13 +RAILS_ENV=development script/release-v0.13.0-ecosol
... ...