Skip to content

Commit

Permalink
Add RubyForge tasks/configuration. Prepare for 0.1.1 release to rubyf…
Browse files Browse the repository at this point in the history
…orge.
  • Loading branch information
jtrupiano committed Apr 25, 2009
1 parent 7a93900 commit 7d156ab
Showing 1 changed file with 39 additions and 11 deletions.
50 changes: 39 additions & 11 deletions Rakefile
Expand Up @@ -4,16 +4,17 @@ require 'rake/rdoctask'

begin
require 'jeweler'
Jeweler::Tasks.new do |s|
s.name = "sanitize_email"
s.summary = "Gemified fork of pboling's sanitize_email plugin: allows you to play with your application's email abilities without worrying that emails will get sent to actual live addresses."
s.email = "jtrupiano@gmail.com"
s.homepage = "http://github.com/jtrupiano/sanitize_email"
s.description = "allows you to play with your application's email abilities without worrying that emails will get sent to actual live addresses"
s.authors = ["John Trupiano", "Peter Boling"]
Jeweler::Tasks.new do |gem|
gem.name = "sanitize_email"
gem.rubyforge_project = "johntrupiano"
gem.summary = "Tool to aid in development, testing, qa, and production troubleshooting of email issues without worrying that emails will get sent to actual live addresses."
gem.email = "jtrupiano@gmail.com"
gem.homepage = "http://github.com/jtrupiano/sanitize_email"
gem.description = "allows you to play with your application's email abilities without worrying that emails will get sent to actual live addresses"
gem.authors = ["John Trupiano", "Peter Boling"]
end
rescue LoadError
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler"
end

desc 'Default: run unit tests.'
Expand All @@ -27,11 +28,38 @@ Rake::TestTask.new(:test) do |t|
end

desc 'Generate documentation for the sanitize_email plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
Rake::RDocTask.new do |rdoc|
config = YAML.load(File.read('VERSION.yml'))
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'SanitizeEmail'
rdoc.title = "sanitize_email #{config[:major]}.#{config[:minor]}.#{config[:patch]}"
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end

# Rubyforge documentation task
begin
require 'rake/contrib/sshpublisher'
namespace :rubyforge do

desc "Release gem and RDoc documentation to RubyForge"
task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]

namespace :release do
desc "Publish RDoc to RubyForge."
task :docs => [:rdoc] do
config = YAML.load(
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
)

host = "#{config['username']}@rubyforge.org"
remote_dir = "/var/www/gforge-projects/johntrupiano/sanitize_email/"
local_dir = 'rdoc'

Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
end
end
end
rescue LoadError
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
end

0 comments on commit 7d156ab

Please sign in to comment.