This script is designed to be run from the command-line to update the revision of a gem from the gemspec.






alias:
alias rin="rcscript //job:revision_increment http://rorbuilder.info/r/gem.rsf"


*update: 19-Jun-2010 @ 3:53pm*
Here's a more efficient version of the above code:

File.open(file_path,'r+') do |f|
lines = f.readlines; f.rewind;
lines[2].sub!(/\d*(?='$)/){|x| (x.to_i + 1)}
f.write lines.join
end

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/iW0bE6wWFQ4/11689