Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/tags/rel_0-9-4-1/actionmailer/Rakefile

Revision 460, 2.8 kB (checked in by david, 4 years ago)

Tagged the 0.9.4.1 release

  • Property svn:executable set to *
Line 
1 require 'rubygems'
2 require 'rake'
3 require 'rake/testtask'
4 require 'rake/rdoctask'
5 require 'rake/packagetask'
6 require 'rake/gempackagetask'
7 require 'rake/contrib/rubyforgepublisher'
8
9 PKG_BUILD     = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
10 PKG_NAME      = 'actionmailer'
11 PKG_VERSION   = '0.6.1' + PKG_BUILD
12 PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
13
14 desc "Default Task"
15 task :default => [ :test ]
16
17 # Run the unit tests
18
19 Rake::TestTask.new { |t|
20   t.libs << "test"
21   t.pattern = 'test/*_test.rb'
22   t.verbose = true
23 }
24
25
26 # Genereate the RDoc documentation
27
28 Rake::RDocTask.new { |rdoc|
29   rdoc.rdoc_dir = 'doc'
30   rdoc.title    = "Action Mailer -- Easy email delivery and testing"
31   rdoc.options << '--line-numbers --inline-source --main README'
32   rdoc.rdoc_files.include('README', 'CHANGELOG')
33   rdoc.rdoc_files.include('lib/action_mailer.rb')
34   rdoc.rdoc_files.include('lib/action_mailer/*.rb')
35 }
36
37
38 # Create compressed packages
39
40
41 spec = Gem::Specification.new do |s|
42   s.platform = Gem::Platform::RUBY
43   s.name = PKG_NAME
44   s.summary = "Service layer for easy email delivery and testing."
45   s.description = %q{Makes it trivial to test and deliver emails sent from a single service layer.}
46   s.version = PKG_VERSION
47
48   s.author = "David Heinemeier Hansson"
49   s.email = "david@loudthinking.com"
50   s.rubyforge_project = "actionmailer"
51   s.homepage = "http://actionmailer.rubyonrails.org"
52
53   s.add_dependency('actionpack', '>= 0.9.5')
54
55   s.has_rdoc = true
56   s.requirements << 'none'
57   s.require_path = 'lib'
58   s.autorequire = 'action_mailer'
59
60   s.files = [ "rakefile", "install.rb", "README", "CHANGELOG", "MIT-LICENSE" ]
61   s.files = s.files + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
62   s.files = s.files + Dir.glob( "test/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
63 end
64  
65 Rake::GemPackageTask.new(spec) do |p|
66   p.gem_spec = spec
67   p.need_tar = true
68   p.need_zip = true
69 end
70
71
72 # Publish beta gem
73 desc "Publish the API documentation"
74 task :pgem => [:package] do
75   Rake::SshFilePublisher.new("davidhh@comox.textdrive.com", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
76 end
77
78 # Publish documentation
79 desc "Publish the API documentation"
80 task :pdoc => [:rdoc] do
81   Rake::SshDirPublisher.new("davidhh@comox.textdrive.com", "public_html/am", "doc").upload
82 end
83
84 desc "Publish to RubyForge"
85 task :rubyforge do
86     Rake::RubyForgePublisher.new('actionmailer', 'webster132').upload
87 end
88
89
90 desc "Count lines in the main rake file"
91 task :lines do
92   lines = 0
93   codelines = 0
94   Dir.foreach("lib/action_mailer") { |file_name|
95     next unless file_name =~ /.*rb/
96    
97     f = File.open("lib/action_mailer/" + file_name)
98
99     while line = f.gets
100       lines += 1
101       next if line =~ /^\s*$/
102       next if line =~ /^\s*#/
103       codelines += 1
104     end
105   }
106   puts "Lines #{lines}, LOC #{codelines}"
107 end
Note: See TracBrowser for help on using the browser.