aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/README2
-rw-r--r--actionmailer/Rakefile22
-rw-r--r--actionmailer/actionmailer.gemspec5
-rw-r--r--actionmailer/lib/action_mailer/base.rb2
-rw-r--r--actionmailer/lib/action_mailer/railtie.rb8
-rw-r--r--actionmailer/lib/action_mailer/version.rb2
-rw-r--r--actionmailer/test/base_test.rb3
7 files changed, 17 insertions, 27 deletions
diff --git a/actionmailer/README b/actionmailer/README
index e0e2ee436a..2a4d507d8a 100644
--- a/actionmailer/README
+++ b/actionmailer/README
@@ -101,7 +101,7 @@ Example:
This Mailman can be the target for Postfix or other MTAs. In Rails, you would use the runner in the
trivial case like this:
- ./script/runner 'Mailman.receive(STDIN.read)'
+ rails runner 'Mailman.receive(STDIN.read)'
However, invoking Rails in the runner for each mail to be received is very resource intensive. A single
instance of Rails should be run within a daemon if it is going to be utilized to process more than just
diff --git a/actionmailer/Rakefile b/actionmailer/Rakefile
index 2619d9359e..baea591b97 100644
--- a/actionmailer/Rakefile
+++ b/actionmailer/Rakefile
@@ -54,11 +54,11 @@ Rake::GemPackageTask.new(spec) do |p|
p.gem_spec = spec
end
-desc "Publish the API documentation"
-task :pgem => [:package] do
- require 'rake/contrib/sshpublisher'
- Rake::SshFilePublisher.new("gems.rubyonrails.org", "/u/sites/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
- `ssh gems.rubyonrails.org '/u/sites/gems/gemupdate.sh'`
+desc "Release to gemcutter"
+task :release => :package do
+ require 'rake/gemcutter'
+ Rake::Gemcutter::Tasks.new(spec).define
+ Rake::Task['gem:push'].invoke
end
desc "Publish the API documentation"
@@ -66,15 +66,3 @@ task :pdoc => [:rdoc] do
require 'rake/contrib/sshpublisher'
Rake::SshDirPublisher.new("wrath.rubyonrails.org", "public_html/am", "doc").upload
end
-
-desc "Publish the release files to RubyForge."
-task :release => [ :package ] do
- require 'rubyforge'
- require 'rake/contrib/rubyforgepublisher'
-
- packages = %w( gem tgz zip ).collect{ |ext| "pkg/#{PKG_NAME}-#{PKG_VERSION}.#{ext}" }
-
- rubyforge = RubyForge.new
- rubyforge.login
- rubyforge.add_release(PKG_NAME, PKG_NAME, "REL #{PKG_VERSION}", *packages)
-end
diff --git a/actionmailer/actionmailer.gemspec b/actionmailer/actionmailer.gemspec
index c3b1c96832..31d8efc7bf 100644
--- a/actionmailer/actionmailer.gemspec
+++ b/actionmailer/actionmailer.gemspec
@@ -1,9 +1,10 @@
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'actionmailer'
- s.version = '3.0.0.beta'
+ s.version = '3.0.0.beta1'
s.summary = 'Email composition, delivery, and recieval framework (part of Rails).'
s.description = 'Email composition, delivery, and recieval framework (part of Rails).'
+ s.required_ruby_version = '>= 1.8.7'
s.author = 'David Heinemeier Hansson'
s.email = 'david@loudthinking.com'
@@ -16,7 +17,7 @@ Gem::Specification.new do |s|
s.has_rdoc = true
- s.add_dependency('actionpack', '= 3.0.0.beta')
+ s.add_dependency('actionpack', '= 3.0.0.beta1')
s.add_dependency('mail', '~> 2.1.2')
s.add_dependency('text-format', '~> 1.0.0')
end
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index ec85a20f70..4e89c1ea0c 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -9,7 +9,7 @@ module ActionMailer #:nodoc:
#
# To use Action Mailer, you need to create a mailer model.
#
- # $ script/generate mailer Notifier
+ # $ rails generate mailer Notifier
#
# The generated model inherits from ActionMailer::Base. Emails are defined by creating methods
# within the model which are then used to set variables to be used in the mail template, to
diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb
index 4ed70503fd..a3afc23e6a 100644
--- a/actionmailer/lib/action_mailer/railtie.rb
+++ b/actionmailer/lib/action_mailer/railtie.rb
@@ -5,6 +5,10 @@ module ActionMailer
class Railtie < Rails::Railtie
railtie_name :action_mailer
+ initializer "action_mailer.url_for", :before => :load_environment_config do |app|
+ ActionMailer::Base.send(:include, ActionController::UrlFor) if defined?(ActionController)
+ end
+
require "action_mailer/railties/subscriber"
subscriber ActionMailer::Railties::Subscriber.new
@@ -17,9 +21,5 @@ module ActionMailer
ActionMailer::Base.send "#{k}=", v
end
end
-
- initializer "action_mailer.url_for" do |app|
- ActionMailer::Base.send(:include, ActionController::UrlFor) if defined?(ActionController)
- end
end
end \ No newline at end of file
diff --git a/actionmailer/lib/action_mailer/version.rb b/actionmailer/lib/action_mailer/version.rb
index b11c6ef055..56af531d01 100644
--- a/actionmailer/lib/action_mailer/version.rb
+++ b/actionmailer/lib/action_mailer/version.rb
@@ -2,7 +2,7 @@ module ActionMailer
module VERSION #:nodoc:
MAJOR = 3
MINOR = 0
- TINY = "0.beta"
+ TINY = "0.beta1"
STRING = [MAJOR, MINOR, TINY].join('.')
end
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb
index 7e794e10e8..222db66aaa 100644
--- a/actionmailer/test/base_test.rb
+++ b/actionmailer/test/base_test.rb
@@ -461,7 +461,8 @@ class BaseTest < ActiveSupport::TestCase
assert_instance_of Mail::Message, mail
end
- test "calling deliver on the action should increment the deliveries collection" do
+ test "calling deliver on the action should increment the deliveries collection if using the test mailer" do
+ BaseMailer.delivery_method = :test
BaseMailer.deliveries.clear
BaseMailer.welcome.deliver
assert_equal(1, BaseMailer.deliveries.length)