postmark-rails 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +14 -1
- data/CHANGELOG.rdoc +5 -0
- data/README.md +3 -2
- data/gemfiles/Gemfile.actionmailer-3.0.x +6 -1
- data/gemfiles/Gemfile.actionmailer-3.2.x +7 -2
- data/gemfiles/Gemfile.actionmailer-4.0.x +4 -1
- data/gemfiles/Gemfile.actionmailer-4.1.x +4 -1
- data/gemfiles/Gemfile.actionmailer-4.2.x +4 -1
- data/lib/postmark-rails.rb +1 -0
- data/lib/postmark-rails/version.rb +1 -1
- data/postmark-rails.gemspec +3 -2
- data/spec/postmark-rails_spec.rb +13 -5
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45b0ab0fc524d9e41455ca2946c5b042963cae19
|
4
|
+
data.tar.gz: 18a4e14304c400af3e1661346292785d3abf23c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23297a3fe1f0d506987591a010bbe2c75bfcdec95b1bcdfa69e2d9d8f4da9a42168d54d8d4d1c0749b456d4d4c5f39fb82ec17c8a339dff040cbee371eeb4c9b
|
7
|
+
data.tar.gz: 18cf3290e557ae5932060612504aecf7dc1ea217d22210ed909d2c63ca1185281686942365fe96e0e51f4cadd9fce905e95976f506262ab6b8c99d3626b4e4fc
|
data/.travis.yml
CHANGED
@@ -3,7 +3,8 @@ rvm:
|
|
3
3
|
- 1.8.7
|
4
4
|
- 1.9.3
|
5
5
|
- 2.0.0
|
6
|
-
- 2.1.
|
6
|
+
- 2.1.9
|
7
|
+
- 2.2.5
|
7
8
|
script: bundle exec rake spec
|
8
9
|
gemfile:
|
9
10
|
- Gemfile
|
@@ -11,11 +12,23 @@ gemfile:
|
|
11
12
|
- gemfiles/Gemfile.actionmailer-3.2.x
|
12
13
|
- gemfiles/Gemfile.actionmailer-4.0.x
|
13
14
|
- gemfiles/Gemfile.actionmailer-4.1.x
|
15
|
+
- gemfiles/Gemfile.actionmailer-4.2.x
|
14
16
|
matrix:
|
15
17
|
exclude:
|
16
18
|
- rvm: 1.8.7
|
17
19
|
gemfile: Gemfile
|
20
|
+
- rvm: 1.9.3
|
21
|
+
gemfile: Gemfile
|
22
|
+
- rvm: 2.0.0
|
23
|
+
gemfile: Gemfile
|
24
|
+
- rvm: 2.1.9
|
25
|
+
gemfile: Gemfile
|
18
26
|
- rvm: 1.8.7
|
19
27
|
gemfile: gemfiles/Gemfile.actionmailer-4.0.x
|
20
28
|
- rvm: 1.8.7
|
21
29
|
gemfile: gemfiles/Gemfile.actionmailer-4.1.x
|
30
|
+
- rvm: 1.8.7
|
31
|
+
gemfile: gemfiles/Gemfile.actionmailer-4.2.x
|
32
|
+
before_install:
|
33
|
+
- gem update --system
|
34
|
+
- gem install bundler
|
data/CHANGELOG.rdoc
CHANGED
data/README.md
CHANGED
@@ -2,10 +2,11 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/wildbit/postmark-rails.svg?branch=master)](https://travis-ci.org/wildbit/postmark-rails) [![Code Climate](https://codeclimate.com/github/wildbit/postmark-rails/badges/gpa.svg)](https://codeclimate.com/github/wildbit/postmark-rails)
|
4
4
|
|
5
|
-
The Postmark Rails Gem is a drop-in plug-in for ActionMailer to send emails via [Postmark](https://postmarkapp.com), an email delivery service for web apps. The gem has been created for fast implementation and fully supports all of [Postmark’s features](https://postmarkapp.com/why
|
5
|
+
The Postmark Rails Gem is a drop-in plug-in for ActionMailer to send emails via [Postmark](https://postmarkapp.com), an email delivery service for web apps. The gem has been created for fast implementation and fully supports all of [Postmark’s features](https://postmarkapp.com/why).
|
6
6
|
|
7
7
|
## Supported Rails Versions
|
8
8
|
|
9
|
+
* Rails 5.0
|
9
10
|
* Rails 4.x
|
10
11
|
* Rails 3.x
|
11
12
|
|
@@ -16,7 +17,7 @@ For Rails 2.3 please take a look at [version 0.4](https://github.com/wildbit/pos
|
|
16
17
|
Add this to your Gemfile: (change version numbers if needed)
|
17
18
|
|
18
19
|
``` ruby
|
19
|
-
gem 'postmark-rails', '~> 0.
|
20
|
+
gem 'postmark-rails', '~> 0.13.0'
|
20
21
|
```
|
21
22
|
|
22
23
|
Don’t forget to run `bundle install` command every time you change something in the Gemfile.
|
@@ -1,7 +1,12 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
|
3
|
+
gemspec :path => '../'
|
4
|
+
|
5
|
+
gem 'json', '< 2.0.0'
|
6
|
+
gem 'rake', '< 11.0.0'
|
7
|
+
gem 'postmark', '~> 1.8.0', :path => ENV['POSTMARK_GEM_PATH']
|
4
8
|
gem 'actionmailer', '~> 3.0.0'
|
9
|
+
gem 'rack-cache', '~> 1.2.0'
|
5
10
|
|
6
11
|
group :test do
|
7
12
|
gem 'rspec', '~> 2.14.0'
|
@@ -1,8 +1,13 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
gemspec :path => '../'
|
4
|
+
|
5
|
+
gem 'json', '< 2.0.0'
|
6
|
+
gem 'rake', '< 11.0.0'
|
7
|
+
gem 'postmark', '~> 1.8.0', :path => ENV['POSTMARK_GEM_PATH']
|
8
|
+
gem 'actionmailer', :github => 'rails', :branch => '3-2-stable'
|
5
9
|
gem 'i18n', '~> 0.6.0'
|
10
|
+
gem 'rack-cache', '~> 1.2.0'
|
6
11
|
|
7
12
|
group :test do
|
8
13
|
gem 'rspec', '~> 2.14.0'
|
data/lib/postmark-rails.rb
CHANGED
data/postmark-rails.gemspec
CHANGED
@@ -17,8 +17,9 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.rdoc_options = ["--charset=UTF-8"]
|
18
18
|
|
19
19
|
s.add_dependency('actionmailer', ">= 3.0.0")
|
20
|
-
s.add_dependency('postmark', "~> 1.
|
21
|
-
|
20
|
+
s.add_dependency('postmark', "~> 1.8.0")
|
21
|
+
|
22
|
+
s.add_development_dependency("rake")
|
22
23
|
|
23
24
|
s.files = `git ls-files`.split("\n")
|
24
25
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
data/spec/postmark-rails_spec.rb
CHANGED
@@ -3,6 +3,14 @@ require 'spec_helper'
|
|
3
3
|
describe "PostmarkRails3" do
|
4
4
|
let!(:api_client) { Postmark::ApiClient.new('api-token') }
|
5
5
|
|
6
|
+
def deliver(message)
|
7
|
+
if message.respond_to?(:deliver_now)
|
8
|
+
message.deliver_now
|
9
|
+
else
|
10
|
+
message.deliver
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
6
14
|
it 'should allow setting an api token' do
|
7
15
|
ActionMailer::Base.postmark_settings = {:api_token => 'api-token'}
|
8
16
|
expect(ActionMailer::Base.postmark_settings[:api_token]).to eq('api-token')
|
@@ -13,7 +21,7 @@ describe "PostmarkRails3" do
|
|
13
21
|
expect(api_client).to receive(:deliver_message) do |message|
|
14
22
|
expect(message.subject).to eq("hello")
|
15
23
|
end
|
16
|
-
TestMailer.simple_message
|
24
|
+
deliver(TestMailer.simple_message)
|
17
25
|
end
|
18
26
|
|
19
27
|
it "should allow tagging of message" do
|
@@ -21,7 +29,7 @@ describe "PostmarkRails3" do
|
|
21
29
|
expect(api_client).to receive(:deliver_message) do |message|
|
22
30
|
expect(message.tag.to_s).to eq("delivery")
|
23
31
|
end
|
24
|
-
TestMailer.tagged_message
|
32
|
+
deliver(TestMailer.tagged_message)
|
25
33
|
end
|
26
34
|
|
27
35
|
it "allows to enable open tracking" do
|
@@ -30,7 +38,7 @@ describe "PostmarkRails3" do
|
|
30
38
|
expect(message.track_opens).to be_true
|
31
39
|
expect(message.to_postmark_hash['TrackOpens']).to be_true
|
32
40
|
end
|
33
|
-
TestMailer.tracked_message
|
41
|
+
deliver(TestMailer.tracked_message)
|
34
42
|
end
|
35
43
|
|
36
44
|
it "should work with multipart messages" do
|
@@ -40,7 +48,7 @@ describe "PostmarkRails3" do
|
|
40
48
|
expect(message.body_text.strip).to eq("hello")
|
41
49
|
expect(message.body_html.strip).to eq("<b>hello</b>")
|
42
50
|
end
|
43
|
-
TestMailer.multipart_message
|
51
|
+
deliver(TestMailer.multipart_message)
|
44
52
|
end
|
45
53
|
|
46
54
|
it 'should work with messages containing attachments' do
|
@@ -48,6 +56,6 @@ describe "PostmarkRails3" do
|
|
48
56
|
expect(api_client).to receive(:deliver_message) do |message|
|
49
57
|
expect(message).to have_attachments
|
50
58
|
end
|
51
|
-
TestMailer.message_with_attachment
|
59
|
+
deliver(TestMailer.message_with_attachment)
|
52
60
|
end
|
53
61
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postmark-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Petyo Ivanov
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: actionmailer
|
@@ -32,14 +32,14 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 1.
|
35
|
+
version: 1.8.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 1.
|
42
|
+
version: 1.8.0
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: rake
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
114
|
version: '0'
|
115
115
|
requirements: []
|
116
116
|
rubyforge_project:
|
117
|
-
rubygems_version: 2.4.
|
117
|
+
rubygems_version: 2.4.5.1
|
118
118
|
signing_key:
|
119
119
|
specification_version: 4
|
120
120
|
summary: Postmark adapter for ActionMailer
|