Rakefile in tracksperanto-3.5.9 vs Rakefile in tracksperanto-4.0.0

- old
+ new

@@ -1,43 +1,18 @@ -require './lib/tracksperanto' -require 'rake/hooks' - -require 'jeweler' -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..." - gem.email = "me@julik.nl" - gem.homepage = "http://guerilla-di.org/tracksperanto" - gem.authors = ["Julik Tarkhanov"] - gem.extra_rdoc_files << "DEVELOPER_DOCS.rdoc" - gem.license = 'MIT' - gem.executables = ["tracksperanto"] - - # Do not package up test fixtures - gem.files.exclude "test/import/samples" - gem.files.exclude "test/import/samples/*/*.*" - gem.files.exclude "test/subpixel" - - # Do not package invisibles - gem.files.exclude ".*" -end - -Jeweler::RubygemsDotOrgTasks.new - - +require "bundler/gem_tasks" require 'rake/testtask' + desc "Run all tests" Rake::TestTask.new("test") do |t| t.libs << "test" t.pattern = 'test/**/test_*.rb' t.verbose = true end # Automatically update the supported format list -after :test do +task :update_readme do + require File.dirname(__FILE__) + '/lib/tracksperanto' formats = StringIO.new formats.puts(" ") formats.puts(" ") formats.puts('### Formats Tracksperanto can read') @@ -60,18 +35,18 @@ three[1] = formats.string File.open(File.dirname(__FILE__) + "/README.md", "w") do | f | f.write(three.join('---')) end - end -# Automatically update the LICENSE -after :test do +task :update_license_date do license_path = File.dirname(__FILE__) + "/MIT_LICENSE.txt" license_text = File.read(license_path) license_text.gsub!(/2009\-(\d+)/, "2009-#{Time.now.year + 1}") File.open(license_path, "w"){|f| f << license_text } end +# Automatically update the LICENSE +Rake::Task[:test].enhance [:update_license_date, :update_readme] task :default => [ :test ]