plain-david 0.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/LICENSE +1 -1
- data/README.md +4 -2
- data/lib/plain_david/action_mailer_extensions.rb +4 -12
- data/lib/plain_david/railtie.rb +1 -1
- data/lib/plain_david/version.rb +1 -1
- data/plain-david.gemspec +2 -0
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40dd6a886b547ce44d9af5d348d813a6c70be11b
|
4
|
+
data.tar.gz: 38f10fff96f6009dad88da011052bcab4e7c3d0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cfc192707b9398ff6e19c7479ffdd605c407715efa6fc8c24314b6a5360107ac72a76887a0c8a7323b32b5ad306ecffe91c24793e1caed2f62ee942af7e92d2
|
7
|
+
data.tar.gz: 3dcb7354ea82060c9e8937e0f34dd9ac368d4f45f00971d93a84f89fb4fd786515d46dd121f30a0963416e2bb130185672837da731a2861cb7ef60586b5e274d
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
|
6
|
+
project adheres to [Semantic Versioning](http://semver.org/)
|
7
|
+
|
8
|
+
## 1.1.0 - 2016-09-19
|
9
|
+
|
10
|
+
### Changed
|
11
|
+
|
12
|
+
* Add support for Rails 5. Rails 3 and 4 should still work, but we need Ruby 2+ now.
|
13
|
+
|
14
|
+
## 0.0.1 - 2015-01-23
|
15
|
+
|
16
|
+
### Changed
|
17
|
+
|
18
|
+
* Initial release (as a gem).
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -6,7 +6,7 @@ Plain David automatically generatess a text part for your HTML emails.
|
|
6
6
|
|
7
7
|
Add the gem to Rails' Gemfile
|
8
8
|
|
9
|
-
gem 'plain-david'
|
9
|
+
gem 'plain-david'
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
@@ -14,6 +14,8 @@ Nothing. Just send emails as normal, and a text part will be automatically gener
|
|
14
14
|
|
15
15
|
It works seamlessly with css inliners like [Roadie](https://github.com/kandadaboggu/roadie).
|
16
16
|
|
17
|
+
Works with Rails 3, 4 and 5.
|
18
|
+
|
17
19
|
## Conversion Strategies
|
18
20
|
|
19
21
|
You can set your own conversion strategy. The default `MarkdownStrategy` converts the HTML to Markdown. If you want to use your own you just need to set the `strategy` option.
|
@@ -48,4 +50,4 @@ MIT License. See `LICENSE` for details.
|
|
48
50
|
|
49
51
|
## Copyright
|
50
52
|
|
51
|
-
Copyright (c) 2013 Luca Spiller.
|
53
|
+
Copyright (c) 2013-2016 Luca Spiller.
|
@@ -2,19 +2,11 @@ module PlainDavid
|
|
2
2
|
module ActionMailerExtensions
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
|
-
included do
|
6
|
-
if method_defined?(:collect_responses)
|
7
|
-
alias_method_chain :collect_responses, :text_part
|
8
|
-
else
|
9
|
-
alias_method_chain :collect_responses_and_parts_order, :text_part
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
5
|
protected
|
14
6
|
|
15
7
|
# Rails 4
|
16
|
-
def
|
17
|
-
responses =
|
8
|
+
def collect_responses(headers, &block)
|
9
|
+
responses = super(headers, &block)
|
18
10
|
|
19
11
|
html_part, text_part = detect_parts(responses)
|
20
12
|
if html_part && !text_part
|
@@ -26,8 +18,8 @@ module PlainDavid
|
|
26
18
|
end
|
27
19
|
|
28
20
|
# Rails 3
|
29
|
-
def
|
30
|
-
responses, order =
|
21
|
+
def collect_responses_and_parts_order(headers, &block)
|
22
|
+
responses, order = super(headers, &block)
|
31
23
|
|
32
24
|
html_part, text_part = detect_parts(responses)
|
33
25
|
if html_part && !text_part
|
data/lib/plain_david/railtie.rb
CHANGED
data/lib/plain_david/version.rb
CHANGED
data/plain-david.gemspec
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plain-david
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Spiller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: html2markdown
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: htmlentities
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: Auto email plain text part generator
|
@@ -45,6 +45,7 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
+
- CHANGELOG.md
|
48
49
|
- LICENSE
|
49
50
|
- README.md
|
50
51
|
- lib/plain-david.rb
|
@@ -64,18 +65,19 @@ require_paths:
|
|
64
65
|
- lib
|
65
66
|
required_ruby_version: !ruby/object:Gem::Requirement
|
66
67
|
requirements:
|
67
|
-
- -
|
68
|
+
- - ">="
|
68
69
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
70
|
+
version: '2'
|
70
71
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
72
|
requirements:
|
72
|
-
- -
|
73
|
+
- - ">="
|
73
74
|
- !ruby/object:Gem::Version
|
74
75
|
version: '0'
|
75
76
|
requirements: []
|
76
77
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.
|
78
|
+
rubygems_version: 2.5.1
|
78
79
|
signing_key:
|
79
80
|
specification_version: 4
|
80
81
|
summary: Auto email plain text part generator
|
81
82
|
test_files: []
|
83
|
+
has_rdoc:
|