pboling / sanitize_email

SanitizeEmail allows you to play with your application's email abilities without worrying that emails will get sent to actual live addresses.

This URL has Read+Write access

pboling (author)
Tue Nov 10 10:06:57 -0800 2009
commit  e7592622a22c4cbe53f2e9b466b02bbf3a4d9c8b
tree    27808259a6c3d51d5b87432ed1a7418e10137c98
parent  8a6bbc499b1600ded660bd6ec905627f26556560
sanitize_email / Rakefile
100644 78 lines (68 sloc) 2.697 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
 
begin
  require 'jeweler'
  Jeweler::Tasks.new do |gemspec|
    gemspec.name = "sanitize_email"
    gemspec.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."
    gemspec.description = %q{Test an application's email abilities without ever sending a message to actual live addresses}
    gemspec.email = ['peter.boling@gmail.com', 'jtrupiano@gmail.com', 'george@benevolentcode.com']
    gemspec.homepage = "http://github.com/pboling/sanitize_email"
    gemspec.authors = ["Peter Boling", "John Trupiano", "George Anderson"]
    gemspec.add_dependency 'actionmailer'
    gemspec.files = ["lib/sanitize_email/custom_environments.rb",
             "lib/sanitize_email/sanitize_email.rb",
             "lib/sanitize_email.rb",
             "init.rb",
             "MIT-LICENSE",
             "Rakefile",
             "README.rdoc",
             "sanitize_email.gemspec",
             "VERSION.yml",
             "test/sample_mailer.rb",
             "test/sanitize_email_test.rb"]
  end
  Jeweler::GemcutterTasks.new
rescue LoadError
  puts "Jeweler not available. Install it with: sudo gem install jeweler"
end
 
desc 'Default: run unit tests.'
task :default => :test
 
desc 'Test the sanitize_email plugin.'
Rake::TestTask.new(:test) do |t|
  t.libs << 'lib'
  t.pattern = 'test/**/*_test.rb'
  t.verbose = true
end
 
desc 'Generate documentation for the sanitize_email plugin.'
Rake::RDocTask.new do |rdoc|
  config = YAML.load(File.read('VERSION.yml'))
  rdoc.rdoc_dir = 'rdoc'
  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('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