annotate contrib/assimilate_alien_loggers.rb @ 7691:fa4fbd66e752

(issue1579) Fix axes syncronisation at Gauges The SyncNumberAxis was completely broken. It only synced in one direction and even that did not work correctly when data was added to the axis (and the syncAxis rescaled but forgot the old axis) then there were lots of ways to bypass that scaling. And i also think the trans calculation was wrong. It has been replaced by a "mostly" simple method to just keep the W in M and W in CM+Datum axes in sync. I say "Mostly" because it had to deal with the Bounds interface.
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 13 Dec 2013 19:03:00 +0100
parents 8dd89da79eaa
children
rev   line source
7539
8dd89da79eaa Added spooky ruby script to get started fixing logger instances of wrong classes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
1 # run like ruby -i -p assimilate_alien_loggers.rb FILES(or stdin)
8dd89da79eaa Added spooky ruby script to get started fixing logger instances of wrong classes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
2 # This will replace in-place and will result in wrong getLogger
8dd89da79eaa Added spooky ruby script to get started fixing logger instances of wrong classes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
3 # statements in certain inner-class scenarios! Be careful.
8dd89da79eaa Added spooky ruby script to get started fixing logger instances of wrong classes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
4
8dd89da79eaa Added spooky ruby script to get started fixing logger instances of wrong classes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
5 $last_class
8dd89da79eaa Added spooky ruby script to get started fixing logger instances of wrong classes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
6 if $_ =~ /class ([a-zA-Z0-9]+)/
8dd89da79eaa Added spooky ruby script to get started fixing logger instances of wrong classes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
7 $last_class = "#{$1}.class"
8dd89da79eaa Added spooky ruby script to get started fixing logger instances of wrong classes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
8 end
8dd89da79eaa Added spooky ruby script to get started fixing logger instances of wrong classes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
9 if $_ =~ /getLogger/
8dd89da79eaa Added spooky ruby script to get started fixing logger instances of wrong classes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
10 gsub(/getLogger[ ]*\(.*\)/, "getLogger(#{$last_class})")
8dd89da79eaa Added spooky ruby script to get started fixing logger instances of wrong classes.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents:
diff changeset
11 end

http://dive4elements.wald.intevation.org