action_mailer_verp 0.0.4 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.4
1
+ 0.1.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{action_mailer_verp}
8
- s.version = "0.0.4"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Golick"]
@@ -1,7 +1,7 @@
1
1
  require 'actionmailer'
2
2
 
3
3
  module ActionMailerVerp
4
- module FromRewriter
4
+ module VERPMail
5
5
  class MultipleFromsError < ArgumentError; end
6
6
  class MultipleRecipientsError < ArgumentError; end
7
7
 
@@ -11,12 +11,12 @@ module ActionMailerVerp
11
11
 
12
12
  def create_mail_with_verp
13
13
  create_mail_without_verp
14
- verpify_from(@mail)
14
+ verpify(@mail)
15
15
  @mail
16
16
  end
17
17
 
18
18
  private
19
- def verpify_from(mail)
19
+ def verpify(mail)
20
20
  if mail.from_addrs.length > 1
21
21
  raise MultipleFromsError, "Multiple from addresses not supported."
22
22
  end
@@ -2,7 +2,7 @@ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe "ActionMailerVerp" do
4
4
  class MyMailer < ActionMailer::Base
5
- include ActionMailerVerp::FromRewriter
5
+ include ActionMailerVerp::VERPMail
6
6
  self.template_root = File.dirname(__FILE__) + "/templates"
7
7
 
8
8
  def some_mail(address)
@@ -24,7 +24,7 @@ describe "ActionMailerVerp" do
24
24
  end
25
25
  end
26
26
 
27
- describe "ActionMailerVerp::FromRewriter" do
27
+ describe "ActionMailerVerp::VERPMail" do
28
28
  describe "with one from address" do
29
29
  before do
30
30
  @mail = MyMailer.create_some_mail("james@example.com")
@@ -41,7 +41,7 @@ describe "ActionMailerVerp" do
41
41
  it "raises an error because that is not supported" do
42
42
  lambda {
43
43
  MyMailer.create_multiple_froms
44
- }.should raise_error(ActionMailerVerp::FromRewriter::MultipleFromsError)
44
+ }.should raise_error(ActionMailerVerp::VERPMail::MultipleFromsError)
45
45
  end
46
46
  end
47
47
 
@@ -49,7 +49,7 @@ describe "ActionMailerVerp" do
49
49
  it "raises an error because that is not supported" do
50
50
  lambda {
51
51
  MyMailer.create_multiple_recipients
52
- }.should raise_error(ActionMailerVerp::FromRewriter::MultipleRecipientsError)
52
+ }.should raise_error(ActionMailerVerp::VERPMail::MultipleRecipientsError)
53
53
  end
54
54
  end
55
55
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_mailer_verp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 0
9
- - 4
10
- version: 0.0.4
8
+ - 1
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Golick