inline_attachment 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +26 -0
- data/README.markdown +14 -6
- metadata +37 -138
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0de25bff87622de6d73d046b463f5aa3ebced2e8
|
4
|
+
data.tar.gz: f72cde666b7d429ed9465fe7972f2a66d5f1d1de
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 72daa73f008a8141cb9caa253145374307e46ad8c979f491f325231cad798c63e22ee97f0ab9fddceb5b5d564f158c48076f28a0b2c23c0c6a3799b4a178fcda
|
7
|
+
data.tar.gz: 474772737a2f17a2b47614d928f16d24eb80bf67e6a9daecbd01d9a7ac210cd5c4a7083c2da4eda27caf91e29682a2eb60d4da9b240394b085677f4e463c46e0
|
data/LICENSE
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
Copyright 2010 Jason King. All rights reserved.
|
2
|
+
|
3
|
+
Redistribution and use in source and binary forms, with or without modification, are
|
4
|
+
permitted provided that the following conditions are met:
|
5
|
+
|
6
|
+
1. Redistributions of source code must retain the above copyright notice, this list of
|
7
|
+
conditions and the following disclaimer.
|
8
|
+
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list
|
10
|
+
of conditions and the following disclaimer in the documentation and/or other materials
|
11
|
+
provided with the distribution.
|
12
|
+
|
13
|
+
THIS SOFTWARE IS PROVIDED BY Jason King ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
14
|
+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Jason King OR
|
16
|
+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
17
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
18
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
19
|
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
20
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
21
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
22
|
+
|
23
|
+
The views and conclusions contained in the software and documentation are those of the
|
24
|
+
authors and should not be interpreted as representing official policies, either expressed
|
25
|
+
or implied, of Jason King.
|
26
|
+
|
data/README.markdown
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## Officially Unsupported
|
2
|
+
|
3
|
+
From ActionMailer 3.0 and above, inline attachments have been made very simple
|
4
|
+
and are built into Rails. They're not quite as simple as they were with
|
5
|
+
`inline_attachments`, but [see
|
6
|
+
here](http://guides.rubyonrails.org/action_mailer_basics.html#making-inline-attachments)
|
7
|
+
for how to do them.
|
8
|
+
|
9
|
+
---
|
10
|
+
|
1
11
|
Inline Attachment
|
2
12
|
=================
|
3
13
|
|
@@ -11,26 +21,24 @@ Installation
|
|
11
21
|
|
12
22
|
To perform a system wide installation:
|
13
23
|
|
14
|
-
gem
|
15
|
-
gem install JasonKing-inline_attachment
|
24
|
+
gem install inline_attachment
|
16
25
|
|
17
26
|
To use inline_attachment in your project, add the following line to your project's
|
18
27
|
config/environment.rb:
|
19
28
|
|
20
|
-
config.gem '
|
21
|
-
|
29
|
+
config.gem 'inline_attachment'
|
22
30
|
|
23
31
|
### As a Rails Plugin ###
|
24
32
|
|
25
33
|
Use this to install as a plugin in a Ruby on Rails app:
|
26
34
|
|
27
|
-
$ script/plugin install git://github.com/
|
35
|
+
$ script/plugin install git://github.com/smathy/inline_attachment.git
|
28
36
|
|
29
37
|
### As a Rails Plugin (using git submodules) ###
|
30
38
|
|
31
39
|
Use this if you prefer the idea of being able to easily switch between using edge or a tagged version:
|
32
40
|
|
33
|
-
$ git submodule add git://github.com/
|
41
|
+
$ git submodule add git://github.com/smathy/inline_attachment.git vendor/plugins/inline_attachment
|
34
42
|
|
35
43
|
|
36
44
|
Usage
|
metadata
CHANGED
@@ -1,165 +1,64 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_attachment
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Jason King
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2014-11-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
16
14
|
name: mime-types
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.15'
|
17
20
|
type: :runtime
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
21
24
|
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version:
|
24
|
-
|
25
|
-
|
26
|
-
Inline Attachment
|
27
|
-
=================
|
28
|
-
|
29
|
-
This package adds full support for embedding inline images into your HTML emails
|
30
|
-
through ActionMailer.
|
31
|
-
|
32
|
-
Installation
|
33
|
-
------------
|
34
|
-
|
35
|
-
### As a Gem ###
|
36
|
-
|
37
|
-
To perform a system wide installation:
|
38
|
-
|
39
|
-
gem source -a http://gems.github.com
|
40
|
-
gem install JasonKing-inline_attachment
|
41
|
-
|
42
|
-
To use inline_attachment in your project, add the following line to your project's
|
43
|
-
config/environment.rb:
|
44
|
-
|
45
|
-
config.gem 'JasonKing-inline_attachment', :lib => 'inline_attachment'
|
46
|
-
|
47
|
-
|
48
|
-
### As a Rails Plugin ###
|
49
|
-
|
50
|
-
Use this to install as a plugin in a Ruby on Rails app:
|
51
|
-
|
52
|
-
$ script/plugin install git://github.com/JasonKing/inline_attachment.git
|
53
|
-
|
54
|
-
### As a Rails Plugin (using git submodules) ###
|
55
|
-
|
56
|
-
Use this if you prefer the idea of being able to easily switch between using edge or a tagged version:
|
57
|
-
|
58
|
-
$ git submodule add git://github.com/JasonKing/inline_attachment.git vendor/plugins/inline_attachment
|
59
|
-
|
60
|
-
|
61
|
-
Usage
|
62
|
-
-----
|
63
|
-
|
64
|
-
I've rewritten most of Edmond's great work in this version. I now override
|
65
|
-
path_to_image instead of `image_tag` because a big reason for all the Rails2
|
66
|
-
breakages was because `image_tag` was basically reproduced in previous versions,
|
67
|
-
so broke when that method changed.
|
68
|
-
|
69
|
-
Now we override the very simple path_to_image, and most importantly we really
|
70
|
-
just add our own stuff for ActionMailer templates, and resort to the existing
|
71
|
-
code for everything else.
|
72
|
-
|
73
|
-
I've also integrated in with the new implicit multipart stuff. So now, there is
|
74
|
-
so little code required!
|
75
|
-
|
76
|
-
#### notifier.rb
|
77
|
-
class Notifier < ActionMailer::Base
|
78
|
-
def signup
|
79
|
-
recipients %q{"Testing IA" <testing@handle.it>}
|
80
|
-
from %q{"Mr Tester" <tester@handle.it>}
|
81
|
-
subject "Here's a funky test"
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
Oh yeah baby! Read it and weep! So how's this work? Well, you'll need
|
86
|
-
your templates named properly - see the _Multipart email_ section of the
|
87
|
-
ActionMailer::Base docs.
|
88
|
-
|
89
|
-
#### signup.text.plain.erb
|
90
|
-
Your username is: <%= @username %>
|
91
|
-
|
92
|
-
#### signup.text.html.erb
|
93
|
-
<html><head><title>Signup Notification</title></head><body>
|
94
|
-
<%= image_tag "logo.png" %>
|
95
|
-
<p>Your username is: <%=h @username %>
|
96
|
-
</body></html>
|
97
|
-
|
98
|
-
|
99
|
-
That's it! InlineAttachment will look for
|
100
|
-
`#{RAILS_ROOT}/public/images/logo.png` and will do the right thing and embed it
|
101
|
-
inline into the HTML version of the email. ActionMailer will do the right thing
|
102
|
-
and offer the recipient both the `text/plain` and `text/html` parts as alternatives.
|
103
|
-
|
104
|
-
**Note the filenames include the (unusual) major.minor MIME type, look above at
|
105
|
-
the filenames closely.**
|
106
|
-
|
107
|
-
|
108
|
-
Note, that you should still be able to use this in the 0.3.0 way if you have
|
109
|
-
code that uses that. But there were a lot of alternatives, and the examples in
|
110
|
-
here didn't show a crucial step of shuffling the parts around to be sure that
|
111
|
-
the image parts came after the html.
|
112
|
-
|
113
|
-
You can also do the old _manual_ method if you want.
|
114
|
-
|
115
|
-
|
116
|
-
Contributors
|
117
|
-
------------
|
118
|
-
|
119
|
-
* Jason King (JasonKing)
|
120
|
-
* Matt Griffin (betamatt) - file:// and chaining cleanup
|
121
|
-
* Logan Raarup (logandk) - pluginified
|
122
|
-
* Jeffrey Damick (jdamick) - bugfix
|
123
|
-
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
description: Officially Unsupported since ActionMailer added this functionality in
|
28
|
+
v3.0
|
124
29
|
email: jk@handle.it
|
125
30
|
executables: []
|
126
|
-
|
127
31
|
extensions: []
|
128
|
-
|
129
32
|
extra_rdoc_files: []
|
130
|
-
|
131
|
-
|
132
|
-
- rails/init.rb
|
33
|
+
files:
|
34
|
+
- LICENSE
|
133
35
|
- README.markdown
|
134
36
|
- lib/inline_attachment.rb
|
135
|
-
|
37
|
+
- rails/init.rb
|
136
38
|
homepage: http://github.com/JasonKing/inline_attachment
|
137
39
|
licenses: []
|
138
|
-
|
40
|
+
metadata: {}
|
139
41
|
post_install_message:
|
140
|
-
rdoc_options:
|
141
|
-
- --inline-source
|
142
|
-
- --charset=UTF-8
|
143
|
-
require_paths:
|
42
|
+
rdoc_options:
|
43
|
+
- "--inline-source"
|
44
|
+
- "--charset=UTF-8"
|
45
|
+
require_paths:
|
144
46
|
- lib
|
145
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
146
|
-
requirements:
|
47
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
147
49
|
- - ">="
|
148
|
-
- !ruby/object:Gem::Version
|
149
|
-
version:
|
150
|
-
|
151
|
-
|
152
|
-
requirements:
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
153
54
|
- - ">="
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
version:
|
156
|
-
version:
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
157
57
|
requirements: []
|
158
|
-
|
159
58
|
rubyforge_project: InlineAttachment
|
160
|
-
rubygems_version:
|
59
|
+
rubygems_version: 2.2.2
|
161
60
|
signing_key:
|
162
61
|
specification_version: 2
|
163
62
|
summary: Makes image_tag in an ActionMailer template embed the images in the emails
|
164
63
|
test_files: []
|
165
|
-
|
64
|
+
has_rdoc: true
|