require 'rubygems' require 'rake' NAME = "cgi_multipart_eof_fix" begin require 'rake/clean' require 'echoe' require 'fileutils' AUTHOR = "Evan Weaver" EMAIL = "evan at cloudbur dot st" DESCRIPTION = "Fix an exploitable bug in CGI multipart parsing which affects Ruby <= 1.8.5 when multipart boundary attribute contains a non-halting regular expression string." RUBYFORGE_NAME = "fauna" GEM_NAME = "cgi_multipart_eof_fix" HOMEPATH = "http://blog.evanweaver.com" RELEASE_TYPES = ["gem"] REV = nil VERS = "2.1" CLEAN.include ['**/.*.sw?', '*.gem', '.config'] RDOC_OPTS = ['--quiet', '--title', "cgi_multipart_eof_fix documentation", "--opname", "index.html", "--line-numbers", "--main", "README", "--inline-source"] include FileUtils require File.join(File.dirname(__FILE__), 'lib', 'cgi_multipart_eof_fix') echoe = Echoe.new(GEM_NAME, VERS) do |p| p.author = AUTHOR p.rubyforge_name = RUBYFORGE_NAME p.name = NAME p.description = DESCRIPTION p.email = EMAIL p.summary = DESCRIPTION p.url = HOMEPATH p.test_globs = ["*_test.rb"] p.clean_globs = CLEAN end rescue LoadError => boom puts "You are missing a dependency required for meta-operations on this gem." puts "#{boom.to_s.capitalize}." desc 'Run the default tasks' task :default => :test desc 'Run the test suite.' task :test do system "ruby -Ibin:lib:test #{NAME}_test.rb" end end