From 22d257a8b2929c16f624d6989d019c76eac16821 Mon Sep 17 00:00:00 2001 From: Alexey Verkhovsky Date: Sun, 2 Apr 2006 05:01:45 +0000 Subject: [PATCH] Specified SVN properties for script/reset_references --- script/reset_references | 55 +++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/script/reset_references b/script/reset_references index d55a0dde..dd9ffb4a 100755 --- a/script/reset_references +++ b/script/reset_references @@ -1,27 +1,28 @@ -#!/usr/bin/env ruby - -ENV['RAILS_ENV'] = ARGV.first || 'development' - -$stderr.puts "Loading Rails for #{ENV['RAILS_ENV']} environment..." -require File.dirname(__FILE__) + '/../config/environment' - -class StubUrlGenerator - def make_link(*args) - 'StubLink' - end -end - -PageRenderer.setup_url_generator(StubUrlGenerator.new) -WikiReference.delete_all - -Web.find_all.each do |web| - web.pages.find(:all, :order => 'name').each do |page| - $stderr.puts "Processing page '#{page.name}'" - begin - PageRenderer.new(page.current_revision).display_content(update_references = true) - rescue => e - puts e - puts e.backtrace - end - end -end +#!/usr/bin/env ruby + +ENV['RAILS_ENV'] = ARGV.first || 'development' + +$stderr.puts "Loading Rails for #{ENV['RAILS_ENV']} environment..." +require File.dirname(__FILE__) + '/../config/environment' + +class StubUrlGenerator + def make_link(*args) + 'StubLink' + end +end + +PageRenderer.setup_url_generator(StubUrlGenerator.new) +WikiReference.delete_all + +Web.find_all.each do |web| + web.pages.find(:all, :order => 'name').each do |page| + $stderr.puts "Processing page '#{page.name}'" + begin + PageRenderer.new(page.current_revision).display_content(update_references = true) + rescue => e + puts e + puts e.backtrace + end + end +end +