Rakefile in enumerate_by-0.4.2 vs Rakefile in enumerate_by-0.4.3

- old
+ new

@@ -3,11 +3,11 @@ require 'rake/gempackagetask' require 'rake/contrib/sshpublisher' spec = Gem::Specification.new do |s| s.name = 'enumerate_by' - s.version = '0.4.2' + s.version = '0.4.3' s.platform = Gem::Platform::RUBY s.summary = 'Adds support for declaring an ActiveRecord class as an enumeration' s.description = s.summary s.files = FileList['{lib,test}/**/*'] + %w(CHANGELOG.rdoc init.rb LICENSE Rakefile README.rdoc) - FileList['test/app_root/{log,log/*,script,script/*}'] @@ -51,10 +51,17 @@ rdoc.title = spec.name rdoc.template = '../rdoc_template.rb' rdoc.options << '--line-numbers' << '--inline-source' rdoc.rdoc_files.include('README.rdoc', 'CHANGELOG.rdoc', 'LICENSE', 'lib/**/*.rb') end - + +desc 'Generate a gemspec file.' +task :gemspec do + File.open("#{spec.name}.gemspec", 'w') do |f| + f.write spec.to_ruby + end +end + Rake::GemPackageTask.new(spec) do |p| p.gem_spec = spec p.need_tar = true p.need_zip = true end