require 'rake' require 'rake/testtask' require 'rake/clean' require 'rake/gempackagetask' require 'rake/rdoctask' require 'tools/rakehelp' require 'fileutils' include FileUtils setup_tests setup_clean ["pkg", "lib/*.bundle", "*.gem", ".config"] setup_rdoc ['README', 'LICENSE', 'COPYING', 'lib/**/*.rb', 'doc/**/*.rdoc'] desc "Does a full compile, test run" task :default => [:test, :package] version = "0.2.1" name="gem_plugin" setup_gem(name, version) do |spec| spec.author="Zed A. Shaw" spec.summary = "A plugin system based only on rubygems that uses dependencies only" spec.description = spec.summary spec.test_file = "test/test_plugins.rb" spec.files += Dir.glob("resources/**/*") spec.executables=["gpgen"] spec.add_dependency("rake", ">= 0.7") end task :install => [:test, :package] do sh %{sudo gem install pkg/#{name}-#{version}} end task :uninstall => [:clean] do sh %{sudo gem uninstall #{name}} end task :site => [:rerdoc] do sh %{ scp -r doc/rdoc/* #{ENV['SSH_USER']}@rubyforge.org:/var/www/gforge-projects/mongrel/gem_plugin_rdoc/ } end