Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 97 lines (76 sloc) 2.94 kb
db045db @dhh Initial
dhh authored
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'
cf38225 @jamis move lib/version.rb to lib/action_mailer/version.rb
jamis authored
8 require File.join(File.dirname(__FILE__), 'lib', 'action_mailer', 'version')
db045db @dhh Initial
dhh authored
9
10 PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
11 PKG_NAME = 'actionmailer'
5cb2aa7 Rename Version constant to VERSION. Closes #2802.
Marcel Molina authored
12 PKG_VERSION = ActionMailer::VERSION::STRING + PKG_BUILD
db045db @dhh Initial
dhh authored
13 PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
14
065cb2a @dhh Made ready for better release automation
dhh authored
15 RELEASE_NAME = "REL #{PKG_VERSION}"
16
17 RUBY_FORGE_PROJECT = "actionmailer"
18 RUBY_FORGE_USER = "webster132"
19
db045db @dhh Initial
dhh authored
20 desc "Default Task"
21 task :default => [ :test ]
22
23 # Run the unit tests
24 Rake::TestTask.new { |t|
25 t.libs << "test"
26 t.pattern = 'test/*_test.rb'
27 t.verbose = true
34df9be @jamis Template paths with dot chars in them no longer mess up implicit temp…
jamis authored
28 t.warning = false
db045db @dhh Initial
dhh authored
29 }
30
31
2af36bb @dhh Fix typos (closes #10378)
dhh authored
32 # Generate the RDoc documentation
db045db @dhh Initial
dhh authored
33 Rake::RDocTask.new { |rdoc|
34 rdoc.rdoc_dir = 'doc'
35 rdoc.title = "Action Mailer -- Easy email delivery and testing"
c4590d5 @dhh Fixed docs
dhh authored
36 rdoc.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
d8b67f7 @jeremy Generate rdoc with utf-8 charset. Closes #7188 [manfred, jferris]
jeremy authored
37 rdoc.options << '--charset' << 'utf-8'
04c7e82 @dhh Made ready for the release of 0.11.1
dhh authored
38 rdoc.template = "#{ENV['template']}.rb" if ENV['template']
db045db @dhh Initial
dhh authored
39 rdoc.rdoc_files.include('README', 'CHANGELOG')
40 rdoc.rdoc_files.include('lib/action_mailer.rb')
41 rdoc.rdoc_files.include('lib/action_mailer/*.rb')
42 }
43
44
45 # Create compressed packages
46 spec = Gem::Specification.new do |s|
47 s.platform = Gem::Platform::RUBY
48 s.name = PKG_NAME
49 s.summary = "Service layer for easy email delivery and testing."
50 s.description = %q{Makes it trivial to test and deliver emails sent from a single service layer.}
51 s.version = PKG_VERSION
52
53 s.author = "David Heinemeier Hansson"
54 s.email = "david@loudthinking.com"
55 s.rubyforge_project = "actionmailer"
d9168fd @dhh Made ready for 0.10.0 release
dhh authored
56 s.homepage = "http://www.rubyonrails.org"
db045db @dhh Initial
dhh authored
57
44d721c @NZKoz Prepare for 2.0.3
NZKoz authored
58 s.add_dependency('actionpack', '= 2.0.3' + PKG_BUILD)
db045db @dhh Initial
dhh authored
59
60 s.has_rdoc = true
61 s.requirements << 'none'
62 s.require_path = 'lib'
63 s.autorequire = 'action_mailer'
64
34a7f66 Not all file systems are case sensitive. Things like 'rake gem' were…
Scott Barron authored
65 s.files = [ "Rakefile", "install.rb", "README", "CHANGELOG", "MIT-LICENSE" ]
4370466 @dhh Dont include svn directories in packages
dhh authored
66 s.files = s.files + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
67 s.files = s.files + Dir.glob( "test/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
db045db @dhh Initial
dhh authored
68 end
69
70 Rake::GemPackageTask.new(spec) do |p|
71 p.gem_spec = spec
72 p.need_tar = true
73 p.need_zip = true
74 end
75
76
77 desc "Publish the API documentation"
78 task :pgem => [:package] do
6ea6a72 @dhh Push to .org instead
dhh authored
79 Rake::SshFilePublisher.new("davidhh@wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
db045db @dhh Initial
dhh authored
80 end
81
82 desc "Publish the API documentation"
83 task :pdoc => [:rdoc] do
6ea6a72 @dhh Push to .org instead
dhh authored
84 Rake::SshDirPublisher.new("davidhh@wrath.rubyonrails.org", "public_html/am", "doc").upload
db045db @dhh Initial
dhh authored
85 end
86
065cb2a @dhh Made ready for better release automation
dhh authored
87 desc "Publish the release files to RubyForge."
98634e7 @dhh Use Aras RubyForge uploader
dhh authored
88 task :release => [ :package ] do
635c7f4 @dhh Run with the latest versions so beta gems will work
dhh authored
89 require 'rubyforge'
98634e7 @dhh Use Aras RubyForge uploader
dhh authored
90
635c7f4 @dhh Run with the latest versions so beta gems will work
dhh authored
91 packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" }
92
93 rubyforge = RubyForge.new
94 rubyforge.login
95 rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages)
335c150 @jeremy Bump versions for 1.2.4 release.
jeremy authored
96 end
Something went wrong with that request. Please try again.