plain-david 0.0.1 → 1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64f568f2fbb872d1fff35baa76c1aca6cc500783
4
- data.tar.gz: d4743a120e6ee5939099884b7a6f3efce990b5a1
3
+ metadata.gz: 40dd6a886b547ce44d9af5d348d813a6c70be11b
4
+ data.tar.gz: 38f10fff96f6009dad88da011052bcab4e7c3d0e
5
5
  SHA512:
6
- metadata.gz: 50cc8f751a1a7c4f96551d3ef3b21cfeb8ae5ffb8b6c9f0ff7e4302850672d8d85658cdf4645b3db4ed1414495016258c907a20994e2acd18a1745ba776c2ca2
7
- data.tar.gz: 4ec7e5b0e52696f60daa561f4a99de99bb2e12b7b0a5cb9b07ec6fbb008d891ada7e6cf7bf0c51546d28258ec73d7ec3eef63f68ba5b07a7ed69c3ca3b27bf63
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
@@ -1,4 +1,4 @@
1
- Copyright © 2013 Luca Spiller
1
+ Copyright © 2013-2016 Luca Spiller
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person
4
4
  obtaining a copy of this software and associated documentation
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', github: 'lucaspiller/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 collect_responses_with_text_part(headers, &block)
17
- responses = collect_responses_without_text_part(headers, &block)
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 collect_responses_and_parts_order_with_text_part(headers, &block)
30
- responses, order = collect_responses_and_parts_order_without_text_part(headers, &block)
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
@@ -9,7 +9,7 @@ module PlainDavid
9
9
 
10
10
  initializer "plain_david.extend_action_mailer" do
11
11
  ActiveSupport.on_load(:action_mailer) do
12
- include PlainDavid::ActionMailerExtensions
12
+ prepend PlainDavid::ActionMailerExtensions
13
13
  end
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module PlainDavid
2
- VERSION = "0.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
data/plain-david.gemspec CHANGED
@@ -19,4 +19,6 @@ Gem::Specification.new do |gem|
19
19
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
20
20
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
21
21
  gem.require_paths = ["lib"]
22
+
23
+ gem.required_ruby_version = '>= 2'
22
24
  end
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: 0.0.1
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: 2015-01-23 00:00:00.000000000 Z
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: '0'
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.0.7
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: