tasks/distribution.rake in gecoder-0.8.3 vs tasks/distribution.rake in gecoder-0.9.0

- old
+ new

@@ -10,12 +10,14 @@ EXT_DIR = 'ext' desc 'Generate RDoc' rd = Rake::RDocTask.new do |rdoc| rdoc.rdoc_dir = 'doc/output/rdoc' - rdoc.options << '--title' << 'Gecode/R' << '--line-numbers' << - '--inline-source' << '--accessor' << 'delegate' << '--main' << 'README' + rdoc.title = 'Gecode/R' + rdoc.template = 'doc/rdoc/jamis.rb' + rdoc.options << '--line-numbers' << '--inline-source' << + '--accessor' << 'delegate' << '--main' << 'README' rdoc.rdoc_files.include('README', 'CHANGES', 'LGPL-LICENSE', 'lib/**/*.rb') end TMP_DIR = 'doc/tmp/rdoc_dev' desc 'Generate RDoc, ignoring nodoc' @@ -30,11 +32,11 @@ desc 'Copies the files that RDoc should parse, removing #:nodoc:' task :prepare_rdoc_dev do # Copy the rdoc and remove all #:nodoc: . Dir['lib/**/*.rb'].each do |source_name| destination_name = source_name.sub('lib', TMP_DIR) - File.makedirs File.dirname(destination_name) + FileUtils.makedirs File.dirname(destination_name) destination = File.open(destination_name, 'w') File.open(source_name) do |source| source.each{ |line| destination << line.gsub('#:nodoc:', '' ) } end destination.close @@ -70,15 +72,28 @@ s.has_rdoc = true s.rdoc_options = rd.options s.extra_rdoc_files = rd.rdoc_files s.test_files = FileList['specs/**/*.rb'] - s.autorequire = 'gecoder' - s.author = ["Gecode/R Development Team"] + s.authors = ["Gecode/R Development Team"] s.email = "gecoder-users@rubyforge.org" s.homepage = "http://gecoder.rubyforge.org" s.rubyforge_project = "gecoder" + +=begin + # Development dependencies. + # Not listed: rubygems >= 1.2 + [['rake'], + ['webgen', '= 0.4.7'], + ['coderay'], + ['rspec', '>= 1.0'], + ['rcov'], + ['meta_project'], + ['rubyforge']].each do |dependency| + s.add_development_dependency(*dependency) + end +=end end # Create a clone of the gem spec with the precompiled binaries for Windows. spec_windows_binary_with_gecode = spec.dup spec_windows_binary_with_gecode.name = PKG_NAME_WITH_GECODE @@ -86,11 +101,11 @@ spec_windows_binary_with_gecode.requirements = [] # Add the precompiled Gecode DLLs and precompiled bindings. spec_windows_binary_with_gecode.files = spec.files.dup - FileList['ext/**/*'].to_a + FileList['vendor/gecode/win32/lib/*'].to_a << 'lib/gecode.dll' -spec_windows_binary_with_gecode.platform = Gem::Platform::WIN32 +spec_windows_binary_with_gecode.platform = 'mswin32' #Gem::Platform::WIN32 # Create a clone of the gem spec that includes Gecode. spec_with_gecode = spec.dup spec_with_gecode.name = PKG_NAME_WITH_GECODE spec_with_gecode.extensions = @@ -160,10 +175,10 @@ # Files included in the release with Gecode. gecode_release_files = [ "pkg/#{PKG_FILE_NAME_WITH_GECODE}.gem", #"pkg/#{PKG_FILE_NAME_WITH_GECODE}.tgz", #"pkg/#{PKG_FILE_NAME_WITH_GECODE}.zip", - "pkg/#{PKG_FILE_NAME_WITH_GECODE}-mswin32.gem" + "pkg/#{PKG_FILE_NAME_WITH_GECODE}-x86-mswin32.gem" ] desc 'Publish Gecode/R with Gecode packages on RubyForge' task :publish_gecoder_with_gecode_packages => [:verify_user] + gecode_release_files do require 'meta_project'