Rakefile in tracksperanto-3.1.0 vs Rakefile in tracksperanto-3.2.0
- old
+ new
@@ -1,7 +1,9 @@
require './lib/tracksperanto'
require 'jeweler'
+require 'rake/hooks'
+
Jeweler::Tasks.new do |gem|
gem.version = Tracksperanto::VERSION
gem.name = "tracksperanto"
gem.summary = "A universal 2D tracks converter"
gem.description = "Converts 2D track exports between different apps like Flame, MatchMover, PFTrack..."
@@ -29,6 +31,35 @@
t.libs << "test"
t.pattern = 'test/**/test_*.rb'
t.verbose = true
end
-task :default => [ :test ]
\ No newline at end of file
+# Automatically update the supported format list
+after :test do
+ formats = StringIO.new
+
+ formats.puts(" ")
+ formats.puts('=== Formats Tracksperanto can read')
+ formats.puts(" ")
+ Tracksperanto.importers.each do | import_mdoule |
+ formats.puts("* %s" % import_mdoule.human_name)
+ end
+
+ formats.puts(" ")
+ formats.puts('=== Formats Tracksperanto can export to')
+ formats.puts(" ")
+ Tracksperanto.exporters.each do | export_module |
+ formats.puts("* %s" % export_module.human_name)
+ end
+
+ readme_text = File.read(File.dirname(__FILE__) + "/README.rdoc")
+ three = readme_text.split('---')
+ raise "Should split in 3" unless three.length == 3
+ three[1] = formats.string
+
+ File.open(File.dirname(__FILE__) + "/README.rdoc", "w") do | f |
+ f.write(three.join('---'))
+ end
+end
+
+task :default => [ :test ]
+