[Nitro] Source code cleanup

Zachary Zolton zachary.zolton at gmail.com
Thu Oct 27 16:59:42 EDT 2005


You'll never win a "tabs instead of 2 spaces" argument in Rubyland,
though...  ;-)

On 10/27/05, Michael Fellinger <m.fellinger at gmail.com> wrote:
> Hi George,
>
> one thing i have encountered would be an overall use of '/usr/bin/env ruby',
> it is an annoyance to replace the path every time where it occurs. (esp in
> the proto-dir)
> otherwise i can't come up with something additional for the cleanup, only that
> i prefer tabs, but that is only my opinion... other people love 2 spaces :)
>
> so long..
> manveru
>
> Am Donnerstag 27 Oktober 2005 21:19 schrieb George Moschovitis:
> > Dear devs,
> >
> > I am using the following script to cleanup the source code:
> >
> >
> > LF = "\x0a"
> >
> > Dir['**/*'].each do |filename|
> >   unless File.directory?(filename) or filename =~ /\.db$/ or filename
> > =~ /\.bin$/ or filename =~ /gif$/ or filename =~ /png$/ or filename =~
> > /swf$/ or filename =~ /jpg$/ or filename =~ /darcs/
> >     puts "Converting #{filename}..."
> >     s = File.read(filename).gsub("\t", " "*2).gsub(/\r\n/, LF)
> >     File.open(filename, "wb") {|f| f << s}
> >   end
> > end
> >
> > Can anyone propose some additional cleanup rules?
> >
> > thanks,
> > George.
> >
> > --
> > http://www.gmosx.com
> > http://www.navel.gr
> > http://www.nitrohq.com
> >
> > _______________________________________________
> > Nitro-general mailing list
> > Nitro-general at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/nitro-general
>
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>
>
>




More information about the Nitro-general mailing list