send_with_us_mailer 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NzNkNGEzM2I5YzFiM2NhMDUxNjAxMGUxYjAyYWU1YjI1ZGQ4ZDU5Yw==
5
+ data.tar.gz: !binary |-
6
+ ODU2NWVmOTZiOWU0ZmQ3NDQ2MmYyZDY5NzI5NTM2NjM5MjZiMWQzOA==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YjNiN2UwYjllYzE1ZjQ2ZmYwOGYyNmQ0MDk1YWMyYzFhZjhjZDlmZjkxZjc5
10
+ NDBiZmIxNzcwOGM4MmM0MTU3Y2JhZWNjYjg4MDg2MTEyMmRhODFkNWE0MGE4
11
+ YzQ0NDEzMDg1NTk5YTFiN2ZkMjY2MGE5OWRiNTcxMDFkZDM2ZWI=
12
+ data.tar.gz: !binary |-
13
+ ZThlM2ZhNmE4MTllZjk3NWQ4YzhhNTkzMTQwNmFiMTQwMzM5NTllZDhlNDFh
14
+ YzQ1Nzk3ZjdiMzUxNmFkY2E2YjZjNzI3YzllM2QxMGMyNTRmMzJjODQ3M2Ux
15
+ YmU2MDgyNGRkYjRmMWZlZWZkMDAyNWYwYzFmMTgyM2ZmNDZmMGI=
data/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.tmproj
19
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in send_with_us_mailer.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 David Lokhorst
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # SendWithUsMailer
2
+
3
+ [Send With Us](http://sendwithus.com) is a service that provides a convenient way for non-developers to create and edit
4
+ the email content from your app. Send With Us created a gem, send_with_us, that communicates to
5
+ their service using their low-level RESTful API.
6
+
7
+ Ruby on Rails developers are familiar with the ActionMailer interface for sending email. This
8
+ gem implements a small layer over the send_with_us gem that provides and ActionMailer-like API.
9
+
10
+ ## Installation
11
+
12
+ Add this line to your application's Gemfile:
13
+
14
+ gem 'send_with_us_mailer'
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install send_with_us_mailer
23
+
24
+ ## Usage
25
+
26
+ Mailer models inherit from `SendWithUsMailer::Base`. A mailer model defines methods
27
+ used to generate an email message. In these methods, you can assign variables to be sent to
28
+ the Send With Us service and options on the mail itself such as the `:from` address.
29
+
30
+ class Notifier < SendWithUsMailer::Base
31
+ default from: 'no-reply@example.com'
32
+
33
+ def welcome(recipient)
34
+ assign(:account, recipient)
35
+ mail(email_id: 'ID-CODE-FROM-SEND-WITH-US', to: recipient.email)
36
+ end
37
+ end
38
+
39
+ Within the mailer method, you have access to the following methods:
40
+
41
+ * `assign` - Allows you to assign key-value pairs that will be
42
+ data payload used by Send With Us within the email.
43
+ * `mail` - Allows you to specify the email to be sent.
44
+
45
+
46
+ ### Sending mail
47
+
48
+ Once a mailer action is defined, you can deliver your message or create it and save it
49
+ for delivery later:
50
+
51
+ Notifier.welcome(david).deliver # sends the email
52
+ mail = Notifier.welcome(david) # => a SendWithUsMailer::MailParams object
53
+ mail.deliver # sends the email
54
+
55
+ You never instantiate your mailer class. Rather, you just call the method you defined
56
+ on the class itself.
57
+
58
+
59
+ ### Default Hash
60
+
61
+ SendWithUsMailer allows you to specify default values inside the class definition:
62
+
63
+ class Notifier < SendWithUsMailer::Base
64
+ default from: 'system@example.com'
65
+ end
66
+
67
+
68
+
69
+ ## Contributing
70
+
71
+ 1. Fork it
72
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
73
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
74
+ 4. Push to the branch (`git push origin my-new-feature`)
75
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new do |t|
6
+ t.libs << 'lib/send_with_us_mailer'
7
+ t.test_files = FileList['test/lib/send_with_us_mailer/*_test.rb']
8
+ t.verbose = true
9
+ end
10
+
11
+ task :default => :test
@@ -0,0 +1,3 @@
1
+ require "send_with_us_mailer/version"
2
+ require "send_with_us_mailer/base"
3
+ require "send_with_us_mailer/mail_params"
@@ -0,0 +1,142 @@
1
+ module SendWithUsMailer
2
+ # Mailer models inherit from <tt>SendWithUsMailer::Base</tt>. A mailer model defines methods
3
+ # used to generate an email message. In these methods, you can assign variables to be sent to
4
+ # the Send With Us service and options on the mail itself such as the <tt>:from</tt> address.
5
+ #
6
+ # class Notifier < SendWithUsMailer::Base
7
+ # default from: 'no-reply@example.com'
8
+ #
9
+ # def welcome(recipient)
10
+ # assign(:account, recipient)
11
+ # mail(email_id: 'ID-CODE-FROM-SEND-WITH-US', to: recipient.email)
12
+ # end
13
+ # end
14
+ #
15
+ # Within the mailer method, you have access to the following methods:
16
+ #
17
+ # * <tt>assign</tt> - Allows you to assign key-value pairs that will be
18
+ # data payload used by SendWithUs to interpolate the content.
19
+ # * <tt>mail</tt> - Allows you to specify email to be sent.
20
+ #
21
+ # The mail method is used to set the header parameters.
22
+ #
23
+ #
24
+ # = Sending mail
25
+ #
26
+ # Once a mailer action is defined, you can deliver your message or create it and save it
27
+ # for delivery later:
28
+ #
29
+ # Notifier.welcome(david).deliver # sends the email
30
+ # mail = Notifier.welcome(david) # => a SendWithUsMailer::MailParams object
31
+ # mail.deliver # sends the email
32
+ #
33
+ # You never instantiate your mailer class. Rather, you just call the method you defined
34
+ # on the class itself.
35
+ #
36
+ #
37
+ # = Default Hash
38
+ #
39
+ # SendWithUsMailer allows you to specify default values inside the class definition:
40
+ #
41
+ # class Notifier < SendWithUsMailer::Base
42
+ # default from: 'system@example.com'
43
+ # end
44
+ class Base
45
+
46
+ #---------------------- Singleton methods ----------------------------
47
+ class << self
48
+ def defaults
49
+ @defaults || {}
50
+ end
51
+
52
+ # Set default values for any of the parameters passed to the <tt>#mail</tt>
53
+ # method. For example:
54
+ #
55
+ # class Notifier < SendWithUsMailer::Base
56
+ # default from: 'no-reply@test.lindsaar.net',
57
+ # reply_to: 'bounces@test.lindsaar.net'
58
+ # end
59
+ def default(value = nil)
60
+ @defaults = defaults.merge(value)
61
+ end
62
+
63
+ # Return the mailer methods that are defined in any instance
64
+ # of <tt>SendWithUsMailer::Base</tt>. There should not be
65
+ # any reason to call this directly.
66
+ def mailer_methods
67
+ public_instance_methods - superclass.public_instance_methods
68
+ end
69
+
70
+ # We use <tt>::method_missing</tt> to delegate
71
+ # mailer methods to a new instance and return the
72
+ # <tt>SendWithUsMailer::MailParams</tt> object.
73
+ def method_missing(method_name, *args)
74
+ if mailer_methods.include?(method_name.to_sym)
75
+ new(method_name, *args).message
76
+ else
77
+ super
78
+ end
79
+ end
80
+ end
81
+
82
+ #----------------------- Instance methods ----------------------------
83
+ attr_reader :message
84
+
85
+ # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer
86
+ # will be initialized according to the named method.
87
+ def initialize(method_name, *args)
88
+ @message = MailParams.new
89
+ self.send(method_name, *args)
90
+ end
91
+
92
+ # The main method that creates the message parameters. The method accepts
93
+ # a headers hash. This hash allows you to specify the certain headers
94
+ # in an email message, these are:
95
+ #
96
+ # * <tt>:email_id</tt> - The unique code associated with the SendWithUs specific email.
97
+ # * <tt>:to</tt> - Who the message is destined for. Must be a valid email address.
98
+ # * <tt>:from</tt> - Who the message is from. Must be a valid email address.
99
+ # * <tt>:reply_to</tt> - Who to set the Reply-To header of the email to.
100
+ #
101
+ # You can set default values for any of the above headers by using the <tt>::default</tt>
102
+ # class method.
103
+ #
104
+ # For example:
105
+ #
106
+ # class Notifier < ActionMailer::Base
107
+ # default from: 'no-reply@test.example.net'
108
+ #
109
+ # def welcome
110
+ # mail(email_id: 'EMAIL_ID from Send With Us', to: 'dave@test.example.net')
111
+ # end
112
+ # end
113
+ def mail(params = {})
114
+ @message.merge!(self.class.defaults.merge(params))
115
+ end
116
+
117
+ # Assign variables that will be sent in the payload to Send With Us.
118
+ #
119
+ # For example:
120
+ #
121
+ # class Notifier < ActionMailer::Base
122
+ # def welcome
123
+ #
124
+ # assign :login_url, "http://thefastguys.example.com"
125
+ # assign :user, {name: "Dave Lokhorst", role: "admin"}
126
+ # assign :team, {name: "The Fast Guys", captain: "Joe"}
127
+ #
128
+ # mail(email_id: 'EMAIL_ID from Send With Us', to: 'dave@test.example.net')
129
+ # end
130
+ # end
131
+ #
132
+ # makes the following parameters accessible to the Send With Us email:
133
+ # {{ login_url }} => "http://thefastguys.example.com"
134
+ # {{ user.name }} => "Dave Lokhorst"
135
+ # {{ user.role }} => "admin"
136
+ # {{ team.name }} => "The Fast Guys"
137
+ # {{ team.captain }} => "Joe"
138
+ def assign(key, value)
139
+ @message.assign(key, value)
140
+ end
141
+ end
142
+ end
@@ -0,0 +1,42 @@
1
+ require "send_with_us"
2
+
3
+ module SendWithUsMailer
4
+ class MailParams
5
+ attr_reader :to, :from, :email_id, :email_data
6
+
7
+ def initialize #:nodoc:
8
+ @email_data = {}
9
+ @to = {}
10
+ @from = {}
11
+ end
12
+
13
+ def assign(key, value) #:nodoc:
14
+ @email_data.merge!( key.to_sym => value )
15
+ end
16
+
17
+ def merge!(params={}) #:nodoc:
18
+ params.each_pair do |key, value|
19
+ case key
20
+ when :email_id
21
+ @email_id = value
22
+ when :to
23
+ @to.merge!(address: value)
24
+ when :from
25
+ @from.merge!(address: value)
26
+ when :reply_to
27
+ @from.merge!(reply_to: value)
28
+ end
29
+ end
30
+ end
31
+
32
+ # Invoke <tt>SendWithUs::Api</tt> to deliver the message.
33
+ # The <tt>SendWithUs</tt> module is implemented in the +send_with_us+ gem.
34
+ #
35
+ # IMPORTANT NOTE: <tt>SendWithUs</tt> must be configured prior to calling this method.
36
+ # In particular, the +api_key+ must be set (following the guidelines in the
37
+ # +send_with_us+ documentation).
38
+ def deliver
39
+ SendWithUs::Api.new.send_with(@email_id, @to, @email_data, @from)
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,3 @@
1
+ module SendWithUsMailer
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,27 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'send_with_us_mailer/version'
5
+
6
+ Gem::Specification.new do |gem|
7
+ gem.name = "send_with_us_mailer"
8
+ gem.version = SendWithUsMailer::VERSION
9
+ gem.authors = ["David Lokhorst"]
10
+ gem.email = ["david.lokhorst@gmail.com"]
11
+ gem.description = %q{A convenient way to use the Send With Us email
12
+ service with a Ruby on Rails app. SendWilthUsMailer implements a
13
+ mailer API similar to the ActionMailer railtie.}
14
+ gem.summary = %q{An ActionMailer look alike for Send With Us.}
15
+ gem.homepage = 'http://github.com/dlokhorst/SendWithUs-Mailer'
16
+ gem.license = 'MIT'
17
+
18
+ gem.files = `git ls-files`.split($/)
19
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
20
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
21
+ gem.require_paths = ["lib"]
22
+
23
+ gem.add_runtime_dependency 'send_with_us'
24
+ gem.add_development_dependency 'rake'
25
+ gem.add_development_dependency 'minitest-colorize'
26
+ gem.add_development_dependency 'mocha'
27
+ end
@@ -0,0 +1,70 @@
1
+ require_relative '../../test_helper'
2
+
3
+ describe SendWithUsMailer::Base do
4
+ class FirstMailer < SendWithUsMailer::Base
5
+ def send_an_email; end
6
+ end
7
+
8
+ class SecondMailer < SendWithUsMailer::Base
9
+ def send_a_second_email; end
10
+ end
11
+
12
+ describe "::default" do
13
+ it "responds to default" do
14
+ SendWithUsMailer::Base.must_respond_to :default
15
+ FirstMailer.must_respond_to :default
16
+ end
17
+ end
18
+
19
+ describe "::mailer_methods" do
20
+ it "finds the instance methods defined in the classes" do
21
+ FirstMailer.mailer_methods.must_include(:send_an_email)
22
+ SecondMailer.mailer_methods.must_include(:send_a_second_email)
23
+ end
24
+
25
+ it "does not include instance methods from other mailers" do
26
+ FirstMailer.mailer_methods.wont_include(:send_a_second_email)
27
+ SecondMailer.mailer_methods.wont_include(:send_an_email)
28
+ end
29
+
30
+ it "does not include the Base class instance methods" do
31
+ SendWithUsMailer::Base.public_instance_methods.each do |method|
32
+ FirstMailer.mailer_methods.wont_include(method)
33
+ end
34
+ end
35
+ end
36
+
37
+ describe "methods should be called on the class object" do
38
+ class ThirdMailer < SendWithUsMailer::Base
39
+ def send_an_email(a=nil,b=nil) # an instance method
40
+ end
41
+ end
42
+
43
+ it "class wraps the call to the mailer method (which is an instance method)" do
44
+ ThirdMailer.any_instance.expects(:send_an_email)
45
+ ThirdMailer.send_an_email
46
+ end
47
+
48
+ it "calls to mailer methods return a MailParams object" do
49
+ FirstMailer.send_an_email.must_be_kind_of SendWithUsMailer::MailParams
50
+ end
51
+
52
+ it "relays the arguments to the instance" do
53
+ ThirdMailer.any_instance.expects(:send_an_email).with("a","b")
54
+ ThirdMailer.send_an_email("a","b")
55
+ end
56
+ end
57
+
58
+ describe "#assign" do
59
+ class MailerWithAssign < SendWithUsMailer::Base
60
+ def example
61
+ assign :user, "dave"
62
+ end
63
+ end
64
+
65
+ it "delegates the method to its message" do
66
+ SendWithUsMailer::MailParams.any_instance.expects(:assign)
67
+ MailerWithAssign.example
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,107 @@
1
+ require_relative '../../test_helper'
2
+
3
+ describe SendWithUsMailer do
4
+ describe "minimum requirements" do
5
+ class ExampleMailer < SendWithUsMailer::Base
6
+ def send_an_email
7
+ mail email_id: '4bBEddKbhKBu5xsU2p58KX', to: 'dave@example.com'
8
+ end
9
+ end
10
+
11
+ it "sets the email_id" do
12
+ mail = ExampleMailer.send_an_email
13
+ mail.email_id.must_equal '4bBEddKbhKBu5xsU2p58KX'
14
+ end
15
+
16
+ it "sets the recipient" do
17
+ mail = ExampleMailer.send_an_email
18
+ mail.to[:address].must_equal 'dave@example.com'
19
+ end
20
+ end
21
+
22
+ describe "more mail options" do
23
+ class MoreOptionsMailer < SendWithUsMailer::Base
24
+ def example_email
25
+ mail email_id: 'a4bBEddKbhKBu5xsU2p58KX',
26
+ to: 'adave@example.com',
27
+ from: 'asender@company.com',
28
+ reply_to: 'ano-reply@company.com'
29
+ end
30
+ end
31
+
32
+ it "sets the sender" do
33
+ mail = MoreOptionsMailer.example_email
34
+ mail.from[:address].must_equal 'asender@company.com'
35
+ end
36
+
37
+ it "sets the reply-to address" do
38
+ mail = MoreOptionsMailer.example_email
39
+ mail.from[:reply_to].must_equal 'ano-reply@company.com'
40
+ end
41
+ end
42
+
43
+ describe "using default to set a parameter" do
44
+ class MailerWithDefault < SendWithUsMailer::Base
45
+ default email_id: 'def-4bBEddKbhKBu5xsU2p58KX'
46
+
47
+ def send_an_email
48
+ mail to: 'def-dave@example.com'
49
+ end
50
+ end
51
+
52
+ it "sets the email_id" do
53
+ mail = MailerWithDefault.send_an_email
54
+ mail.email_id.must_equal 'def-4bBEddKbhKBu5xsU2p58KX'
55
+ end
56
+
57
+ it "sets the recipient" do
58
+ mail = MailerWithDefault.send_an_email
59
+ mail.to[:address].must_equal 'def-dave@example.com'
60
+ end
61
+ end
62
+
63
+ describe "all parameters can be set by default" do
64
+ class AllDefaultMailer < SendWithUsMailer::Base
65
+ default email_id: 'all4bBEddKbhKBu5xsU2p58KX',
66
+ to: 'alldave@example.com',
67
+ from: 'allsender@company.com',
68
+ reply_to: 'allno-reply@company.com'
69
+
70
+ def send_default_email
71
+ mail
72
+ end
73
+ end
74
+
75
+ it "sets the email_id" do
76
+ mail = AllDefaultMailer.send_default_email
77
+ mail.email_id.must_equal 'all4bBEddKbhKBu5xsU2p58KX'
78
+ end
79
+
80
+ it "sets the recipient" do
81
+ mail = AllDefaultMailer.send_default_email
82
+ mail.to[:address].must_equal 'alldave@example.com'
83
+ end
84
+ end
85
+
86
+ describe "using #assign" do
87
+ User = Struct.new(:first_name, :last_name, :email)
88
+
89
+ class MailerWithAssign < SendWithUsMailer::Base
90
+ default email_id: '4bBEddKbhKBu5xsU2p58KX'
91
+
92
+ def team_notification(user)
93
+ assign :team, "The Winners"
94
+ assign :user, {first_name: user.first_name, last_name: user.last_name}
95
+ mail to: user.email
96
+ end
97
+ end
98
+
99
+ it "creates the nested email_data hash" do
100
+ mail = MailerWithAssign.team_notification(User.new("Dave","Lokhorst","dave@example.com"))
101
+ mail.email_data.must_equal({
102
+ team: "The Winners",
103
+ user: {first_name: "Dave", last_name: "Lokhorst"}
104
+ })
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,65 @@
1
+ require_relative '../../test_helper'
2
+
3
+ describe SendWithUsMailer::MailParams do
4
+ subject { SendWithUsMailer::MailParams.new }
5
+
6
+ describe "initialization" do
7
+ it "email_data is empty on initialization" do
8
+ subject.email_data.empty?.must_equal true
9
+ end
10
+ end
11
+
12
+ describe "#assign" do
13
+ let(:ep) { SendWithUsMailer::MailParams.new }
14
+
15
+ it "adds (key,value) pairs to :email_data Hash" do
16
+ ep.assign(:user, {:name => "Dave", :email => "dave@example.com"})
17
+ ep.email_data.must_equal({
18
+ :user => {:name => "Dave", :email => "dave@example.com"}
19
+ })
20
+
21
+ ep.assign(:url, "http://test.example.com")
22
+ ep.email_data.must_equal({
23
+ :user => {:name => "Dave", :email => "dave@example.com"},
24
+ :url => "http://test.example.com"
25
+ })
26
+ end
27
+
28
+ it "symbolizes the keys" do
29
+ ep.assign("company", "Big Co Inc")
30
+ ep.email_data.has_key?(:company).must_equal true
31
+ end
32
+ end
33
+
34
+ describe "#email_id" do
35
+ it "is readable" do
36
+ subject.respond_to?(:email_id).must_equal true
37
+ subject.respond_to?(:email_id=).must_equal false
38
+ end
39
+ end
40
+
41
+ describe "#to" do
42
+ it "is readable" do
43
+ subject.respond_to?(:to).must_equal true
44
+ subject.respond_to?(:to=).must_equal false
45
+ end
46
+ end
47
+
48
+ describe "#from" do
49
+ it "is readable" do
50
+ subject.respond_to?(:from).must_equal true
51
+ subject.respond_to?(:from=).must_equal false
52
+ end
53
+ end
54
+
55
+ describe "#deliver" do
56
+ it "method exists" do
57
+ subject.respond_to?(:deliver).must_equal true
58
+ end
59
+
60
+ it "calls the send_with_us gem" do
61
+ SendWithUs::Api.any_instance.expects(:send_with)
62
+ subject.deliver
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,4 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/colorize'
3
+ require 'mocha/setup'
4
+ require File.expand_path('../../lib/send_with_us_mailer.rb', __FILE__)
metadata ADDED
@@ -0,0 +1,120 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: send_with_us_mailer
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - David Lokhorst
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-05-08 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: send_with_us
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ! '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest-colorize
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: mocha
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: ! "A convenient way to use the Send With Us email\n service with a
70
+ Ruby on Rails app. SendWilthUsMailer implements a\n mailer API similar to the
71
+ ActionMailer railtie."
72
+ email:
73
+ - david.lokhorst@gmail.com
74
+ executables: []
75
+ extensions: []
76
+ extra_rdoc_files: []
77
+ files:
78
+ - .gitignore
79
+ - Gemfile
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - lib/send_with_us_mailer.rb
84
+ - lib/send_with_us_mailer/base.rb
85
+ - lib/send_with_us_mailer/mail_params.rb
86
+ - lib/send_with_us_mailer/version.rb
87
+ - send_with_us_mailer.gemspec
88
+ - test/lib/send_with_us_mailer/base_test.rb
89
+ - test/lib/send_with_us_mailer/integration_test.rb
90
+ - test/lib/send_with_us_mailer/mail_params_test.rb
91
+ - test/test_helper.rb
92
+ homepage: http://github.com/dlokhorst/SendWithUs-Mailer
93
+ licenses:
94
+ - MIT
95
+ metadata: {}
96
+ post_install_message:
97
+ rdoc_options: []
98
+ require_paths:
99
+ - lib
100
+ required_ruby_version: !ruby/object:Gem::Requirement
101
+ requirements:
102
+ - - ! '>='
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
105
+ required_rubygems_version: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ requirements: []
111
+ rubyforge_project:
112
+ rubygems_version: 2.0.3
113
+ signing_key:
114
+ specification_version: 4
115
+ summary: An ActionMailer look alike for Send With Us.
116
+ test_files:
117
+ - test/lib/send_with_us_mailer/base_test.rb
118
+ - test/lib/send_with_us_mailer/integration_test.rb
119
+ - test/lib/send_with_us_mailer/mail_params_test.rb
120
+ - test/test_helper.rb