Rakefile in ruote-2.2.0 vs Rakefile in ruote-2.3.0

- old
+ new

@@ -4,11 +4,11 @@ require 'rubygems' require 'rubygems/user_interaction' if Gem::RubyGemsVersion == '1.5.0' require 'rake' require 'rake/clean' -require 'rake/rdoctask' +#require 'rdoc/task' # # clean @@ -52,49 +52,58 @@ sh "gem push pkg/#{GEMSPEC.name}-#{GEMSPEC.version}.gem" end +## +## rdoc +## +## make sure to have rdoc 2.5.x to run that # -# rdoc +#Rake::RDocTask.new do |rd| # -# make sure to have rdoc 2.5.x to run that - -Rake::RDocTask.new do |rd| - - rd.main = 'README.rdoc' - rd.rdoc_dir = 'rdoc' - - rd.rdoc_files.include( - 'README.rdoc', 'CHANGELOG.txt', 'CREDITS.txt', 'lib/**/*.rb') - - rd.title = "#{GEMSPEC.name} #{GEMSPEC.version}" -end - - +# rd.main = 'README.rdoc' +# rd.rdoc_dir = 'rdoc' # -# upload_rdoc +# rd.rdoc_files.include( +# 'README.rdoc', 'CHANGELOG.txt', 'CREDITS.txt', 'lib/**/*.rb') +# +# rd.title = "#{GEMSPEC.name} #{GEMSPEC.version}" +#end +# +## +## upload_rdoc +# +#desc %{ +# upload the rdoc to rubyforge +#} +#task :upload_rdoc => [ :clean, :rdoc ] do +# +# account = 'jmettraux@rubyforge.org' +# webdir = '/var/www/gforge-projects/ruote' +# +# sh "rsync -azv -e ssh rdoc #{account}:#{webdir}/" +#end + # + # leverage rdoc.info instead -desc %{ - upload the rdoc to rubyforge -} -task :upload_rdoc => [ :clean, :rdoc ] do - account = 'jmettraux@rubyforge.org' - webdir = '/var/www/gforge-projects/ruote' - - sh "rsync -azv -e ssh rdoc #{account}:#{webdir}/" -end - - desc %{ attempt at detecting test methods with the same name } task :doublons do lines = `grep -r " def test_" test/ | sort`.split("\n") lines.inject(nil) do |previous, line| - p line if line == previous + puts line if line == previous + line + end + + lines = `grep -r "TestCase" test/`.split("\n") + lines = lines.collect { |line| [ line, line.split(/\.rb:/).last ] } + lines = lines.sort_by { |line, klass| klass } + lines.inject(nil) do |previous, (line, klass)| + puts klass if line == previous line end end