From 4297efaa136f7967e3b0b8eba6fcd5126cdea55f Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 29 Dec 2008 15:43:36 -0300 Subject: [PATCH] ActionItem862: missed application of person template! --- script/apply-template | 14 +++++++++++--- script/release-v0.13.0-ecosol | 3 +++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/script/apply-template b/script/apply-template index 6a7b2ea..b390ef1 100755 --- a/script/apply-template +++ b/script/apply-template @@ -12,7 +12,7 @@ when 'inactive-enterprise' excluded = [env.inactive_enterprise_template, env.enterprise_template] template = excluded.first - while enterprise = Enterprise.find(:first, :conditions => {:enabled => false}, :offset => offset) + while enterprise = Enterprise.find(:first, :conditions => {:enabled => false}, :order => :id, :offset => offset) # do nothing with templates next if excluded.include?(enterprise) @@ -41,6 +41,14 @@ when 'community' end } } +when 'person' + offset = 0 + template = env.person_template + while person = Person.find(:first, :order => :id, :offset => offset) + if person != template + person.apply_template(template) + puts "#{offset} - #{person.identifier}" + end + offset = offset + 1 + end end - - diff --git a/script/release-v0.13.0-ecosol b/script/release-v0.13.0-ecosol index 9da7e45..6254337 100755 --- a/script/release-v0.13.0-ecosol +++ b/script/release-v0.13.0-ecosol @@ -96,6 +96,9 @@ script/runner 'env = Environment.default template.home_page = template.blog template.save!' +echo 'Applying template for person...' +script/apply-template 'person' + echo 'Configurating template for community...' script/runner 'env = Environment.default template = env.community_template -- libgit2 0.21.2