email-delivery 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +13 -0
- data/.rspec +3 -0
- data/.travis.yml +5 -0
- data/Gemfile +7 -0
- data/Gemfile.lock +59 -0
- data/LICENSE.txt +21 -0
- data/README.md +129 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/email-delivery.gemspec +32 -0
- data/lib/email/delivery/client.rb +50 -0
- data/lib/email/delivery/mailgrun_client.rb +52 -0
- data/lib/email/delivery/sendgrid_client.rb +89 -0
- data/lib/email/delivery/version.rb +5 -0
- data/lib/email/delivery.rb +8 -0
- data/lib/generators/mailgum_creds.rb +4 -0
- data/lib/generators/provider_initializer.rb +13 -0
- data/lib/generators/sendgrid_creds.rb +4 -0
- metadata +163 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b738e4413c8ba16e12ce54a080a1f31ac4b14d34
|
4
|
+
data.tar.gz: 44d39a22dcf9dede5ce83ffdf5f3653f8ac91d40
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 01a9a705191fa4bfef31a01d2d63204506d565e75dc02cf86a16026c1f798a22dc69eba851ca83cdfb7dff938003f0d3f19439b3ad20444fa8fa4ff74e72ad0f
|
7
|
+
data.tar.gz: b23baf22896539318b9cb11c5a401ff6138159361dc52598ff5445869b1de615870c3c3ec1804d4c2256f6f396cb7a5b48b0d3563b9b79d2edc8dc27140be3bb
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
email-delivery (0.1.0)
|
5
|
+
rest-client (~> 2.0.2)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
byebug (9.1.0)
|
11
|
+
diff-lcs (1.3)
|
12
|
+
domain_name (0.5.20170404)
|
13
|
+
unf (>= 0.0.5, < 1.0.0)
|
14
|
+
dotenv (2.2.1)
|
15
|
+
http-cookie (1.0.3)
|
16
|
+
domain_name (~> 0.5)
|
17
|
+
mime-types (3.1)
|
18
|
+
mime-types-data (~> 3.2015)
|
19
|
+
mime-types-data (3.2016.0521)
|
20
|
+
netrc (0.11.0)
|
21
|
+
rake (10.5.0)
|
22
|
+
rest-client (2.0.2)
|
23
|
+
http-cookie (>= 1.0.2, < 2.0)
|
24
|
+
mime-types (>= 1.16, < 4.0)
|
25
|
+
netrc (~> 0.8)
|
26
|
+
rspec (3.6.0)
|
27
|
+
rspec-core (~> 3.6.0)
|
28
|
+
rspec-expectations (~> 3.6.0)
|
29
|
+
rspec-mocks (~> 3.6.0)
|
30
|
+
rspec-core (3.6.0)
|
31
|
+
rspec-support (~> 3.6.0)
|
32
|
+
rspec-expectations (3.6.0)
|
33
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
+
rspec-support (~> 3.6.0)
|
35
|
+
rspec-mocks (3.6.0)
|
36
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
37
|
+
rspec-support (~> 3.6.0)
|
38
|
+
rspec-support (3.6.0)
|
39
|
+
unf (0.1.4)
|
40
|
+
unf_ext
|
41
|
+
unf_ext (0.0.7.4)
|
42
|
+
|
43
|
+
PLATFORMS
|
44
|
+
ruby
|
45
|
+
|
46
|
+
DEPENDENCIES
|
47
|
+
bundler (~> 1.16.a)
|
48
|
+
byebug
|
49
|
+
dotenv (~> 2.2.1)
|
50
|
+
email-delivery!
|
51
|
+
rake (~> 10.0)
|
52
|
+
rspec (~> 3.0)
|
53
|
+
rspec-mocks (~> 3.0)
|
54
|
+
|
55
|
+
RUBY VERSION
|
56
|
+
ruby 2.3.3p222
|
57
|
+
|
58
|
+
BUNDLED WITH
|
59
|
+
1.16.0.pre.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Pranava Swaroop
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
# Email::Delivery
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/email/delivery`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
This gem is a service (Backend) that accepts the necessary information and sends emails. It provides an abstraction between two different e-mail sevice providers and quickly falls over to a working provider without affecting the users.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'email-delivery'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install email-delivery
|
22
|
+
|
23
|
+
## Inputs
|
24
|
+
|
25
|
+
Input: Hash
|
26
|
+
{
|
27
|
+
'from':'me@test.com',
|
28
|
+
'to':['you_1@test.com, you_2@test.com'],
|
29
|
+
'cc':'you_3@test.com',
|
30
|
+
'bcc':['you_4@test.com', 'test_bcc2@mail.com'],
|
31
|
+
'subject':'test subject',
|
32
|
+
'text':'Hey testing now...'
|
33
|
+
}
|
34
|
+
|
35
|
+
Output: Hash
|
36
|
+
{
|
37
|
+
'status': 0 || %w(1 2 3 4 5)
|
38
|
+
'message: 'success' || 'failure'
|
39
|
+
}
|
40
|
+
|
41
|
+
Non-zero status code means it's a failure.
|
42
|
+
|
43
|
+
1 from email-id invalid
|
44
|
+
2 to/cc/bcc email-id invalid
|
45
|
+
3 subject && text both are empty
|
46
|
+
4 email send failed (working)
|
47
|
+
5 email provider configuration not complete (working)
|
48
|
+
|
49
|
+
## Usage
|
50
|
+
|
51
|
+
mail = Email::Delivery::Client.new do
|
52
|
+
from 'me@test.com'
|
53
|
+
to 'you@test.com'
|
54
|
+
subject 'Test subject'
|
55
|
+
body 'Hey testing now...'
|
56
|
+
end
|
57
|
+
|
58
|
+
mail.dispatch
|
59
|
+
|
60
|
+
## Test
|
61
|
+
|
62
|
+
### Send email with one email address
|
63
|
+
|
64
|
+
mail = Email::Delivery::Client.new do
|
65
|
+
from 'me@test.com'
|
66
|
+
to 'you@test.com'
|
67
|
+
subject 'Test subject'
|
68
|
+
body 'Hey testing now...'
|
69
|
+
end
|
70
|
+
|
71
|
+
output_hash = mail.dispatch
|
72
|
+
{
|
73
|
+
"message": "success",
|
74
|
+
"status": 0
|
75
|
+
}
|
76
|
+
|
77
|
+
### send email with multiple emails,CC and BCC
|
78
|
+
|
79
|
+
mail = Email::Delivery::Client.new do
|
80
|
+
from 'me@test.com'
|
81
|
+
to ["you@test.com", "you_1@test.com"]
|
82
|
+
cc "you_2@test.com"
|
83
|
+
bcc "you_3@test.com"
|
84
|
+
subject 'Test subject'
|
85
|
+
body 'Hey testing now...'
|
86
|
+
end
|
87
|
+
|
88
|
+
output_hash = mail.dispatch
|
89
|
+
{
|
90
|
+
"message": "success",
|
91
|
+
"status": 0
|
92
|
+
}
|
93
|
+
|
94
|
+
### send email and receive error message
|
95
|
+
mail = Email::Delivery::Client.new do
|
96
|
+
from 'me@test.com'
|
97
|
+
to []
|
98
|
+
cc "BlahBlah"
|
99
|
+
bcc "YoYo"
|
100
|
+
subject 'Test subject'
|
101
|
+
body 'Hey testing now...'
|
102
|
+
end
|
103
|
+
|
104
|
+
output_hash = mail.dispatch
|
105
|
+
{
|
106
|
+
"message": "to/cc/bcc email-ids are not valid. Please provide at least one valid to/cc/bcc email address.",
|
107
|
+
"status": 2
|
108
|
+
}
|
109
|
+
|
110
|
+
## Development
|
111
|
+
|
112
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
113
|
+
|
114
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
115
|
+
|
116
|
+
## Issues
|
117
|
+
Mailgun setting up domain issues: So using the sandbox account where only authorized recepient list can recieve email.
|
118
|
+
|
119
|
+
## Improvements
|
120
|
+
Message builder for the mail clients based on the input.
|
121
|
+
Custom ExceptionHandler based on api error codes.
|
122
|
+
|
123
|
+
## Contributing
|
124
|
+
|
125
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/elitenomad/email-delivery.
|
126
|
+
|
127
|
+
## License
|
128
|
+
|
129
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "email/delivery"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "email/delivery/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "email-delivery"
|
8
|
+
spec.version = Email::Delivery::VERSION
|
9
|
+
spec.authors = ["Pranava Swaroop"]
|
10
|
+
spec.email = ["stalin.pranava@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{A service (Backend) that accepts the necessary information and sends emails.}
|
13
|
+
spec.description = %q{This gem is a service (Backend) that accepts the necessary information and sends emails. It provides an abstraction between two different e-mail sevice providers and quickly falls over to a working provider without affecting the users.}
|
14
|
+
spec.homepage = "https://www.lifemeasure.com"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
|
+
f.match(%r{^(test|spec|features)/})
|
20
|
+
end
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
spec.add_dependency "rest-client", '~> 2.0.2'
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.16.a"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
29
|
+
spec.add_development_dependency "rspec-mocks", "~> 3.0"
|
30
|
+
spec.add_development_dependency "dotenv", "~> 2.2.1"
|
31
|
+
spec.add_development_dependency "byebug"
|
32
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
=begin
|
2
|
+
This class acts like a interface (delegator to provider).
|
3
|
+
It will
|
4
|
+
- initialize default mail-client(MailGun)
|
5
|
+
- call 'do' method to send the emails.
|
6
|
+
- provide fail-over mechanism
|
7
|
+
|
8
|
+
=end
|
9
|
+
require 'email/delivery/mailgrun_client'
|
10
|
+
require 'email/delivery/sendgrid_client'
|
11
|
+
|
12
|
+
module Email
|
13
|
+
module Delivery
|
14
|
+
class Client
|
15
|
+
attr_accessor :from, :to, :cc, :bcc, :subject, :body, :status, :message
|
16
|
+
|
17
|
+
def initialize(from, to, cc, bcc, subject, body)
|
18
|
+
@from = from
|
19
|
+
@to = to
|
20
|
+
@cc = cc
|
21
|
+
@bcc = bcc
|
22
|
+
@subject = subject
|
23
|
+
@body = body
|
24
|
+
@status = nil
|
25
|
+
@message = nil
|
26
|
+
end
|
27
|
+
|
28
|
+
# Goal of this method is to serve email by one of the service providers
|
29
|
+
# In case of a failure return a status code and a failure message.
|
30
|
+
def dispatch
|
31
|
+
response = Email::Delivery::SendgridClient.new.dispatch(from, to, cc, bcc, subject, body)
|
32
|
+
if [200, 202].include?(response[:status])
|
33
|
+
status = 0
|
34
|
+
message = 'success'
|
35
|
+
else
|
36
|
+
response = Email::Delivery::MailgunClient.new.dispatch(from, to, cc, bcc, subject, body)
|
37
|
+
if response[:status] == 200
|
38
|
+
status = 0
|
39
|
+
message = 'success'
|
40
|
+
else
|
41
|
+
status = 4
|
42
|
+
message = "Emails failed in sending. The error message is as followed: #{ response[:message] }"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
{status: status, message: message}
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
=begin
|
2
|
+
This class acts like a interface.
|
3
|
+
It will
|
4
|
+
- initialize default mail-client(MailGun)
|
5
|
+
- call 'do' method to send the emails.
|
6
|
+
- provide fail-over mechanism
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'rest-client'
|
10
|
+
|
11
|
+
module Email
|
12
|
+
module Delivery
|
13
|
+
class MailgunClient
|
14
|
+
def initialize
|
15
|
+
@api_url = "https://api:#{ENV['MAILGUN_API_KEY']}@#{ENV['MAILGUN_API_URL']}"
|
16
|
+
end
|
17
|
+
|
18
|
+
def dispatch(from, to, cc, bcc, subject, body)
|
19
|
+
response = RestClient.post @api_url, payload(from, to, cc, bcc, subject, body)
|
20
|
+
|
21
|
+
{
|
22
|
+
status: response.code,
|
23
|
+
message: response.description
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def payload(from, to, cc, bcc, subject, body)
|
28
|
+
data = {}
|
29
|
+
data[:from] = sandbox_from
|
30
|
+
data[:to] = to
|
31
|
+
data[:subject] = subject
|
32
|
+
data[:text] = body
|
33
|
+
unless cc.nil?
|
34
|
+
data[:cc] = cc
|
35
|
+
end
|
36
|
+
|
37
|
+
unless bcc.nil?
|
38
|
+
data[:bcc] = bcc
|
39
|
+
end
|
40
|
+
data
|
41
|
+
end
|
42
|
+
|
43
|
+
# Requires a custom domain setup
|
44
|
+
# https://app.mailgun.com/app/domains/new to manage custom 'from'
|
45
|
+
def sandbox_from
|
46
|
+
"Mailgun Sandbox <postmaster@sandboxd76a53e1a7614050ad917bab34226253.mailgun.org>"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
|
@@ -0,0 +1,89 @@
|
|
1
|
+
=begin
|
2
|
+
This class acts like a interface.
|
3
|
+
It will
|
4
|
+
- initialize default mail-client(MailGun)
|
5
|
+
- call 'do' method to send the emails.
|
6
|
+
- provide fail-over mechanism
|
7
|
+
=end
|
8
|
+
|
9
|
+
require 'net/http'
|
10
|
+
require 'uri'
|
11
|
+
require 'json'
|
12
|
+
|
13
|
+
module Email
|
14
|
+
module Delivery
|
15
|
+
class SendgridClient
|
16
|
+
def dispatch(from, to, cc, bcc, subject, body)
|
17
|
+
response = RestClient.post("#{ENV['SENDGRID_API_URL']}", JSON.dump(payload(from, to, cc, bcc, subject, body)), headers=headers_hash)
|
18
|
+
|
19
|
+
{
|
20
|
+
status: response.code,
|
21
|
+
message: response.description
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
# This method helps to include all recipients defined within the to, cc, and bcc parameters,
|
26
|
+
# across each object that you include in the personalizations array.
|
27
|
+
def personalizations(to, cc, bcc)
|
28
|
+
personalizations_hash = {
|
29
|
+
"to" => recepient_list(to)
|
30
|
+
}
|
31
|
+
|
32
|
+
unless cc.nil?
|
33
|
+
personalizations_hash.merge!({ "cc" => recepient_list(cc) })
|
34
|
+
end
|
35
|
+
|
36
|
+
unless bcc.nil?
|
37
|
+
personalizations_hash.merge!({ "bcc" => recepient_list(cc) })
|
38
|
+
end
|
39
|
+
|
40
|
+
[
|
41
|
+
personalizations_hash
|
42
|
+
]
|
43
|
+
end
|
44
|
+
|
45
|
+
def from(from)
|
46
|
+
{
|
47
|
+
"email" => from
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
def content(body)
|
52
|
+
[
|
53
|
+
{
|
54
|
+
"type" => "text/plain",
|
55
|
+
"value" => body
|
56
|
+
}
|
57
|
+
]
|
58
|
+
end
|
59
|
+
|
60
|
+
def payload(from, to, cc, bcc, subject, body)
|
61
|
+
{
|
62
|
+
"personalizations" => personalizations(to, cc, bcc) ,
|
63
|
+
"from" => from(from) ,
|
64
|
+
"subject" => subject,
|
65
|
+
"content" => content(body)
|
66
|
+
}
|
67
|
+
end
|
68
|
+
|
69
|
+
def headers_hash
|
70
|
+
{
|
71
|
+
"Authorization" => "Bearer #{ENV['SENDGRID_API_KEY']}",
|
72
|
+
"content-type" => "application/json"
|
73
|
+
}
|
74
|
+
end
|
75
|
+
|
76
|
+
def recepient_list(lst)
|
77
|
+
if lst.is_a?(Array)
|
78
|
+
lst.map {|elem| {"email" => elem } }
|
79
|
+
else
|
80
|
+
[
|
81
|
+
{
|
82
|
+
"email" => lst
|
83
|
+
}
|
84
|
+
]
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Email
|
2
|
+
module Delivery
|
3
|
+
class Generator < Rails::Generators::Base
|
4
|
+
source_root(File.expand_path(File.dirname(__FILE__)))
|
5
|
+
|
6
|
+
desc "This generator creates an initializer file at config/initializers"
|
7
|
+
def copy_initializer_file
|
8
|
+
copy_file 'mailgun_creds.rb', 'config/initializers/mailgun_creds.rb'
|
9
|
+
copy_file 'sendgrid_creds.rb', 'config/initializers/sendgrid_creds.rb'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: email-delivery
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Pranava Swaroop
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-10-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rest-client
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.16.a
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.16.a
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec-mocks
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: dotenv
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.2.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.2.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: byebug
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: This gem is a service (Backend) that accepts the necessary information
|
112
|
+
and sends emails. It provides an abstraction between two different e-mail sevice
|
113
|
+
providers and quickly falls over to a working provider without affecting the users.
|
114
|
+
email:
|
115
|
+
- stalin.pranava@gmail.com
|
116
|
+
executables: []
|
117
|
+
extensions: []
|
118
|
+
extra_rdoc_files: []
|
119
|
+
files:
|
120
|
+
- ".gitignore"
|
121
|
+
- ".rspec"
|
122
|
+
- ".travis.yml"
|
123
|
+
- Gemfile
|
124
|
+
- Gemfile.lock
|
125
|
+
- LICENSE.txt
|
126
|
+
- README.md
|
127
|
+
- Rakefile
|
128
|
+
- bin/console
|
129
|
+
- bin/setup
|
130
|
+
- email-delivery.gemspec
|
131
|
+
- lib/email/delivery.rb
|
132
|
+
- lib/email/delivery/client.rb
|
133
|
+
- lib/email/delivery/mailgrun_client.rb
|
134
|
+
- lib/email/delivery/sendgrid_client.rb
|
135
|
+
- lib/email/delivery/version.rb
|
136
|
+
- lib/generators/mailgum_creds.rb
|
137
|
+
- lib/generators/provider_initializer.rb
|
138
|
+
- lib/generators/sendgrid_creds.rb
|
139
|
+
homepage: https://www.lifemeasure.com
|
140
|
+
licenses:
|
141
|
+
- MIT
|
142
|
+
metadata: {}
|
143
|
+
post_install_message:
|
144
|
+
rdoc_options: []
|
145
|
+
require_paths:
|
146
|
+
- lib
|
147
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - ">="
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0'
|
152
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - ">="
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
requirements: []
|
158
|
+
rubyforge_project:
|
159
|
+
rubygems_version: 2.6.12
|
160
|
+
signing_key:
|
161
|
+
specification_version: 4
|
162
|
+
summary: A service (Backend) that accepts the necessary information and sends emails.
|
163
|
+
test_files: []
|