adzap-ar_mailer 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/Rakefile +2 -2
- data/lib/action_mailer/ar_sendmail.rb +3 -3
- data/test/{action_mailer.rb → resources/action_mailer.rb} +2 -6
- data/test/test_armailer.rb +4 -11
- data/test/test_arsendmail.rb +1 -6
- data/test/test_helper.rb +9 -0
- metadata +4 -3
data/History.txt
CHANGED
@@ -1,9 +1,19 @@
|
|
1
|
+
= 2.1.2
|
2
|
+
|
3
|
+
* Bugs fixed
|
4
|
+
* Require ar_mailer in ar_sendmail since the change to remove TableName and use email_class
|
5
|
+
|
6
|
+
= 2.1.1
|
7
|
+
|
8
|
+
* Force gem rebuild
|
9
|
+
|
1
10
|
= 2.1.0
|
2
11
|
|
3
12
|
* Switched to using a Rails generator for migration and model files. The ar_sendmail options have been removed.
|
4
13
|
|
5
14
|
= 2.0.2
|
6
15
|
|
16
|
+
* Removed TableName option from ar_sendmail options as its redundant. The Rails environment gets loaded so the settings for email class also get loaded
|
7
17
|
* Bugs fixed
|
8
18
|
* Email class reloading issue in development mode causing AR email class defaults to be lost when cached
|
9
19
|
|
data/Rakefile
CHANGED
@@ -17,7 +17,7 @@ ar_mailer_gemspec = Gem::Specification.new do |s|
|
|
17
17
|
s.email = %q{adam.meehan@gmail.com}
|
18
18
|
s.executables = ["ar_sendmail"]
|
19
19
|
s.extra_rdoc_files = ["History.txt", "LICENSE.txt", "Manifest.txt", "README.rdoc"]
|
20
|
-
s.files = ["History.txt", "LICENSE.txt", "Manifest.txt", "README.rdoc", "Rakefile", "bin/ar_sendmail", "generators/ar_mailer/ar_mailer_generator.rb", "generators/ar_mailer/templates/migration.rb", "generators/ar_mailer/templates/model.rb", "lib/action_mailer/ar_mailer.rb", "lib/action_mailer/ar_sendmail.rb", "lib/smtp_tls.rb", "share/bsd/ar_sendmail", "share/linux/ar_sendmail", "share/linux/ar_sendmail.conf", "test/action_mailer.rb", "test/test_armailer.rb", "test/test_arsendmail.rb"]
|
20
|
+
s.files = ["History.txt", "LICENSE.txt", "Manifest.txt", "README.rdoc", "Rakefile", "bin/ar_sendmail", "generators/ar_mailer/ar_mailer_generator.rb", "generators/ar_mailer/templates/migration.rb", "generators/ar_mailer/templates/model.rb", "lib/action_mailer/ar_mailer.rb", "lib/action_mailer/ar_sendmail.rb", "lib/smtp_tls.rb", "share/bsd/ar_sendmail", "share/linux/ar_sendmail", "share/linux/ar_sendmail.conf", "test/resources/action_mailer.rb", "test/test_armailer.rb", "test/test_arsendmail.rb", "test/test_helper.rb"]
|
21
21
|
s.has_rdoc = true
|
22
22
|
s.homepage = %q{http://github.com/adzap/ar_mailer}
|
23
23
|
s.rdoc_options = ["--main", "README.rdoc"]
|
@@ -53,6 +53,6 @@ task :default => :test
|
|
53
53
|
desc 'Test the ar_mailer gem.'
|
54
54
|
Rake::TestTask.new(:test) do |t|
|
55
55
|
t.libs << 'lib' << 'test'
|
56
|
-
t.
|
56
|
+
t.test_files = FileList['test/**/test_*.rb'].exclude("test/test_helper.rb")
|
57
57
|
t.verbose = true
|
58
58
|
end
|
@@ -2,6 +2,8 @@ require 'optparse'
|
|
2
2
|
require 'net/smtp'
|
3
3
|
require 'smtp_tls' unless Net::SMTP.instance_methods.include?("enable_starttls_auto")
|
4
4
|
require 'rubygems'
|
5
|
+
require 'action_mailer'
|
6
|
+
require 'action_mailer/ar_mailer'
|
5
7
|
|
6
8
|
##
|
7
9
|
# Hack in RSET
|
@@ -21,8 +23,6 @@ class SMTP # :nodoc:
|
|
21
23
|
end
|
22
24
|
end
|
23
25
|
|
24
|
-
module ActionMailer; end # :nodoc:
|
25
|
-
|
26
26
|
##
|
27
27
|
# ActionMailer::ARSendmail delivers email from the email table to the
|
28
28
|
# SMTP server configured in your application's config/environment.rb.
|
@@ -43,7 +43,7 @@ class ActionMailer::ARSendmail
|
|
43
43
|
##
|
44
44
|
# The version of ActionMailer::ARSendmail you are running.
|
45
45
|
|
46
|
-
VERSION = '2.1.
|
46
|
+
VERSION = '2.1.2'
|
47
47
|
|
48
48
|
##
|
49
49
|
# Maximum number of times authentication will be consecutively retried
|
@@ -18,8 +18,7 @@ class Net::SMTP
|
|
18
18
|
attr_reader :send_message_block
|
19
19
|
attr_accessor :reset_called
|
20
20
|
|
21
|
-
send :remove_method, :start
|
22
|
-
|
21
|
+
# send :remove_method, :start
|
23
22
|
end
|
24
23
|
|
25
24
|
def self.on_send_message(&block)
|
@@ -184,9 +183,7 @@ class Email
|
|
184
183
|
|
185
184
|
end
|
186
185
|
|
187
|
-
|
188
|
-
|
189
|
-
class Newsletter < Email; end
|
186
|
+
Newsletter = Email
|
190
187
|
|
191
188
|
class String
|
192
189
|
def classify
|
@@ -198,4 +195,3 @@ class String
|
|
198
195
|
end
|
199
196
|
|
200
197
|
end
|
201
|
-
|
data/test/test_armailer.rb
CHANGED
@@ -1,11 +1,4 @@
|
|
1
|
-
require '
|
2
|
-
require 'rubygems'
|
3
|
-
require 'active_support'
|
4
|
-
require 'action_mailer'
|
5
|
-
require 'action_mailer/ar_mailer'
|
6
|
-
|
7
|
-
##
|
8
|
-
# Pretend mailer
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/test_helper')
|
9
2
|
|
10
3
|
class Mailer < ActionMailer::Base
|
11
4
|
self.delivery_method = :activerecord
|
@@ -25,15 +18,15 @@ class TestARMailer < Test::Unit::TestCase
|
|
25
18
|
Mailer.email_class = Email
|
26
19
|
|
27
20
|
Email.records.clear
|
28
|
-
|
21
|
+
Newsletter.records.clear
|
29
22
|
end
|
30
23
|
|
31
24
|
def test_self_email_class_equals
|
32
|
-
Mailer.email_class =
|
25
|
+
Mailer.email_class = Newsletter
|
33
26
|
|
34
27
|
Mailer.deliver_mail
|
35
28
|
|
36
|
-
assert_equal 2,
|
29
|
+
assert_equal 2, Newsletter.records.length
|
37
30
|
end
|
38
31
|
|
39
32
|
def test_perform_delivery_activerecord
|
data/test/test_arsendmail.rb
CHANGED
@@ -1,9 +1,4 @@
|
|
1
|
-
require '
|
2
|
-
require 'action_mailer'
|
3
|
-
require 'action_mailer/ar_sendmail'
|
4
|
-
require 'rubygems'
|
5
|
-
require 'minitest/autorun'
|
6
|
-
require 'mocha'
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/test_helper')
|
7
2
|
|
8
3
|
class ActionMailer::ARSendmail
|
9
4
|
attr_accessor :slept
|
data/test/test_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adzap-ar_mailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Hodel
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-06-
|
13
|
+
date: 2009-06-30 00:00:00 -07:00
|
14
14
|
default_executable: ar_sendmail
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -41,9 +41,10 @@ files:
|
|
41
41
|
- share/bsd/ar_sendmail
|
42
42
|
- share/linux/ar_sendmail
|
43
43
|
- share/linux/ar_sendmail.conf
|
44
|
-
- test/action_mailer.rb
|
44
|
+
- test/resources/action_mailer.rb
|
45
45
|
- test/test_armailer.rb
|
46
46
|
- test/test_arsendmail.rb
|
47
|
+
- test/test_helper.rb
|
47
48
|
has_rdoc: false
|
48
49
|
homepage: http://github.com/adzap/ar_mailer
|
49
50
|
post_install_message:
|