mandrill_mailer 0.5.0 → 0.5.1

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2VmMGFhYjViZGU1MGI5YTk4NzY3OWNkMzk5N2ZhYzE1ZGY1NWU4OQ==
4
+ Zjg1NzY2YjZkNWZjZGJiYjdjNzNiNTdiZDEwZDE3NWU3MjAwM2U0MQ==
5
5
  data.tar.gz: !binary |-
6
- ZWUwMGI0MjU1ZmExNWY2YmI0NzcyZDM0Yjc1OTY4YmUwYjM4MGZkYw==
6
+ MzkyNDllYzdhM2JhNTQwODk1YWRmYzMzMTkyZmIxYzhmOGRmMGU5ZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDhjMzc2Yzk1MGJhZGYzZmE2MTIwNGVlMjBjNDJkYmIzODViN2IzYTZjZjRh
10
- MGJjMWVmMWMwMjI3Mzc5YjQwNDBjODExNTVhZTkwMDdiZGIwOTE4Zjc0YTc0
11
- ZDc4ODAwMmVjNzFjZWI3MmI3NDhiMDc5YWYyNzg0ZDJiMTlhMTQ=
9
+ ZWZkYjIyYjM4YWExNjM2ZTRkYjY2MTBiMTdlNDIwMDAwYjRiNjE1MGFmZmY0
10
+ MzJmYzVlMDcyOGVhN2QwYWY5NDNhZDUzN2JkNTYxZDAwNWM2ZTNjMGJjNmE0
11
+ YTY4NjVjZmI5ZDBjMzhmYWI1OTlkZWY4MTgzMzE5Y2IzY2M5YTk=
12
12
  data.tar.gz: !binary |-
13
- YTI4MTJlNWM1MzdmMTk1NjMwMjM2NzQ1YmRlNmVmMjUxODllYWU2YzIxMTU0
14
- NGI0MWE4NGM2NGU0OWY1YmFlNjk5YjVmNjI0MTljNjM4OTc4ZTE0ZDZjZjRl
15
- ZDgzY2JhODBkOTI3YjcxZWNjYWE3MjdhYTEzNTU4NTBlMzk5YWY=
13
+ YWJlM2IzNzQ2ZDhlNjNhNDU1NGM1NjI0NzllYjUyN2RlZTQ2YzE0M2YwNGVm
14
+ ZTAyNTgzZWYxNDM1YmU0NDFjMjQwNTMyYTQ2MTAzZTI3MTQ1MjE5NjI2Nzdl
15
+ NDJiNjNhZjMxMzgxMGJiZDk2NDhiNjM0MGQ4M2JkMDkwMGY1ODM=
data/README.md CHANGED
@@ -146,12 +146,12 @@ end
146
146
  * `:inline_css` - whether or not to automatically inline all CSS styles provided in the message HTML - only for HTML documents less than 256KB in size.
147
147
 
148
148
  * `:attachments` - An array of file objects with the following keys:
149
- * `content`: The file contents, must be a base64 encoded string
149
+ * `content`: The file contents, this will be encoded into a base64 string internally
150
150
  * `name`: The name of the file
151
151
  * `type`: This is the mimetype of the file. Ex. png = image/png, pdf = application/pdf, txt = text/plain etc etc
152
152
 
153
153
  * `:images` - An array of embedded images to add to the message:
154
- * `content`: The file contents, must be a base64 encoded string
154
+ * `content`: The file contents, this will be encoded into a base64 string internally
155
155
  * `name`: The name of the file
156
156
  * `type`: This is the mimetype of the file. Ex. png = image/png, pdf = application/pdf, txt = text/plain etc etc etc
157
157
 
@@ -190,7 +190,7 @@ class InvitationMailer < MandrillMailer::MessageMailer
190
190
  inline_css: true,
191
191
  attachments: [
192
192
  {
193
- content: Base64.encode64(File.read(File.expand_path('assets/offer.pdf'))),
193
+ content: File.read(File.expand_path('assets/offer.pdf')),
194
194
  name: 'offer.pdf',
195
195
  type: 'application/pdf'
196
196
  }
@@ -98,12 +98,13 @@
98
98
  # message HTML - only for HTML documents less than 256KB in size
99
99
 
100
100
  # :important - whether or not this message is important, and should be delivered ahead of non-important messages
101
+
102
+ # Required for hash.stringify_keys!
103
+ require 'active_support/all'
101
104
  require 'base64'
102
105
 
103
106
  module MandrillMailer
104
107
  class CoreMailer
105
- include ActionView::Helpers::NumberHelper
106
-
107
108
  class InvalidEmail < StandardError; end
108
109
  class InvalidMailerMethod < StandardError; end
109
110
  class InvalidInterceptorParams < StandardError; end
@@ -26,7 +26,7 @@
26
26
  # }
27
27
  # }
28
28
  # end,
29
- # attachments: [{content: Base64.encode64(File.read(File.expand_path('assets/some_image.png'))), name: 'MyImage.png', type: 'image/png'}],
29
+ # attachments: [{content: File.read(File.expand_path('assets/some_image.png')), name: 'MyImage.png', type: 'image/png'}],
30
30
  # important: true,
31
31
  # inline_css: true
32
32
  # end
@@ -62,12 +62,12 @@
62
62
  # ex. [{'someone@email.com' => {'INVITEE_NAME' => 'Roger'}}, {'another@email.com' => {'INVITEE_NAME' => 'Tommy'}}]
63
63
 
64
64
  # :attachments - An array of file objects with the following keys:
65
- # content: The file contents, must be a base64 encoded string
65
+ # content: The file contents, this will be encoded into a base64 string internally
66
66
  # name: The name of the file
67
67
  # type: This is the mimetype of the file. Ex. png = image/png, pdf = application/pdf, txt = text/plain etc
68
68
 
69
69
  # :images - An array of embedded images to add to the message:
70
- # content: The file contents, must be a base64 encoded string
70
+ # content: The file contents, this will be encoded into a base64 string internally
71
71
  # name: The name of the file
72
72
  # type: This is the mimetype of the file. Ex. png = image/png, pdf = application/pdf, txt = text/plain etc
73
73
 
@@ -27,7 +27,7 @@
27
27
  # }
28
28
  # end,
29
29
  # template_content: {},
30
- # attachments: [{contents:Base64.encode64(File.read(File.expand_path('assets/some_image.png'))), name: 'MyImage.png', type: 'image/png'}],
30
+ # attachments: [{contents: File.read(File.expand_path('assets/some_image.png')), name: 'MyImage.png', type: 'image/png'}],
31
31
  # important: true,
32
32
  # inline_css: true
33
33
  # end
@@ -67,12 +67,12 @@
67
67
  # these fields by passing a Hash {'header' => 'my email content'}
68
68
 
69
69
  # :attachments - An array of file objects with the following keys:
70
- # content: The file contents, must be a base64 encoded string
70
+ # content: The file contents, this will be encoded into a base64 string internally
71
71
  # name: The name of the file
72
72
  # type: This is the mimetype of the file. Ex. png = image/png, pdf = application/pdf, txt = text/plain etc
73
73
 
74
74
  # :images - An array of embedded images to add to the message:
75
- # content: The file contents, must be a base64 encoded string
75
+ # content: The file contents, this will be encoded into a base64 string internally
76
76
  # name: The name of the file
77
77
  # type: This is the mimetype of the file. Ex. png = image/png, pdf = application/pdf, txt = text/plain etc
78
78
 
@@ -1,3 +1,3 @@
1
1
  module MandrillMailer
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mandrill_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Rensel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-16 00:00:00.000000000 Z
11
+ date: 2014-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport