Specified SVN properties for script/reset_references
This commit is contained in:
parent
4902986b2c
commit
22d257a8b2
1 changed files with 28 additions and 27 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue