tasks/gem.rake in wlang-0.10.2 vs tasks/gem.rake in wlang-2.0.0.beta

- old
+ new

@@ -1,10 +1,10 @@ # Installs rake tasks for gemming and packaging # -# This file installs the 'rake package', 'rake gem' tasks and associates -# (clobber_package, repackage, ...). It is automatically generated by Noe -# from your .noespec file, and should therefore be configured there, under +# This file installs the 'rake package', 'rake gem' tasks and associates +# (clobber_package, repackage, ...). It is automatically generated by Noe +# from your .noespec file, and should therefore be configured there, under # the variables/rake_tasks/gem entry, as illustrated below: # # variables: # rake_tasks: # gem: @@ -13,48 +13,53 @@ # need_tar_gz: false # need_tar_bz2: false # need_zip: false # ... # -# If you have specific needs requiring manual intervention on this file, +# If you have specific needs requiring manual intervention on this file, # don't forget to set safe-override to false in your noe specification: -# +# # template-info: # manifest: # tasks/gem.rake: # safe-override: false # begin require 'rubygems/package_task' - Gem::PackageTask.new($gemspec) do |t| + # Dynamically load the gem spec + gemspec_file = File.expand_path('../../wlang.gemspec', __FILE__) + gemspec = Kernel.eval(File.read(gemspec_file)) + + Gem::PackageTask.new(gemspec) do |t| + # Name of the package - t.name = $gemspec.name + t.name = gemspec.name # Version of the package - t.version = $gemspec.version - + t.version = gemspec.version + # Directory used to store the package files t.package_dir = "pkg" - + # True if a gzipped tar file (tgz) should be produced t.need_tar = false - + # True if a gzipped tar file (tar.gz) should be produced t.need_tar_gz = false - + # True if a bzip2'd tar file (tar.bz2) should be produced t.need_tar_bz2 = false - + # True if a zip file should be produced (default is false) t.need_zip = false - + # List of files to be included in the package. - t.package_files = $gemspec.files - + t.package_files = gemspec.files + # Tar command for gzipped or bzip2ed archives. t.tar_command = "tar" - + # Zip command for zipped archives. t.zip_command = "zip" end rescue LoadError