ez-email 0.1.5 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES +9 -0
- data/MANIFEST +1 -0
- data/README +7 -7
- data/certs/djberg96_pub.pem +22 -17
- data/ez-email.gemspec +23 -14
- data/lib/ez-email.rb +1 -0
- data/lib/ez/email.rb +23 -31
- data/test/test_ez_email.rb +2 -1
- metadata +41 -30
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2910be9ee5bffc25c638731b01f2edd019a530b6a7d547d574cd754ded5d1b3c
|
4
|
+
data.tar.gz: 401ff193bafe2f6418adccb601b2bd0b3a92f1986c447b16c7fb71989f2ccc64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5836548088a911e4abc6f5fb7dea47db16231188f1571eecf62390f5c2101af341fb62223d3501d5a5aadb75ae8003b4f2618ae35d3a83fb0a980eba42e7471
|
7
|
+
data.tar.gz: 85e56dbb85187cc24aea8cb32dd603d93ca71bad38ebf8f544471bbcae2d77376d9be1b2b52b2e9a135415cb987cb0404b05af39f1d012a5f87b6a1a372cb62d
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGES
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
== 0.2.0 - 28-Jan-2019
|
2
|
+
* Changed license to Apache-2.0.
|
3
|
+
* Fixed a bug where it was blowing up on a single "to" argument.
|
4
|
+
* The VERSION constant is now frozen.
|
5
|
+
* Added the ez-mail.rb file for convenience.
|
6
|
+
* Modified code internally to use singletons instead of class variables.
|
7
|
+
* Updated cert, should be good for about 10 years.
|
8
|
+
* Added metadata to the gemspec.
|
9
|
+
|
1
10
|
== 0.1.5 - 12-Dec-2015
|
2
11
|
* This gem is now signed.
|
3
12
|
* Updates to Rakefile and gemspec for gem signing.
|
data/MANIFEST
CHANGED
data/README
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
gem install ez-email
|
6
6
|
|
7
7
|
= Synopsis
|
8
|
-
require 'ez
|
8
|
+
require 'ez-email'
|
9
9
|
|
10
10
|
EZ::Email.deliver(
|
11
11
|
:to => 'your_friend@hotstuff.com',
|
@@ -15,11 +15,11 @@
|
|
15
15
|
)
|
16
16
|
|
17
17
|
= Rationale
|
18
|
-
|
19
|
-
for sending email,
|
20
|
-
or
|
18
|
+
When I originally created this library the existing list of email handling
|
19
|
+
libraries were either not designed for sending email, were extremely cumbersome,
|
20
|
+
had lousy interfaces, or were no longer maintained.
|
21
21
|
|
22
|
-
I just
|
22
|
+
I just wanted to send a flippin' email! This library scratched that itch.
|
23
23
|
Hopefully you will find its simplicity useful, too.
|
24
24
|
|
25
25
|
= Bugs
|
@@ -27,10 +27,10 @@
|
|
27
27
|
https://github.com/djberg96/ez-email.
|
28
28
|
|
29
29
|
= License
|
30
|
-
|
30
|
+
Apache-2.0
|
31
31
|
|
32
32
|
= Copyright
|
33
|
-
(C) 2009-
|
33
|
+
(C) 2009-2019, Daniel J. Berger, All Rights Reserved
|
34
34
|
|
35
35
|
= Author
|
36
36
|
Daniel Berger
|
data/certs/djberg96_pub.pem
CHANGED
@@ -1,21 +1,26 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
|
-
|
2
|
+
MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MREwDwYDVQQDDAhkamJl
|
3
3
|
cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
|
4
|
-
|
4
|
+
MB4XDTE4MDMxODE1MjIwN1oXDTI4MDMxNTE1MjIwN1owPzERMA8GA1UEAwwIZGpi
|
5
5
|
ZXJnOTYxFTATBgo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RXZHrFUMlJ5W0mCxl03aazxxKTsVVpZD8QZxvK91OQ
|
19
|
+
h9zr9JBYqCLcCVbr8SkmYCi/laxIZxsNE5YI8cC8vvlLI7AMgSfPSnn/Epq1GjGY
|
20
|
+
6L1iRcEDtanGCIvjqlCXO9+BmsnCfEVehqZkQHeYczA03tpOWb6pon2wzvMKSsKH
|
21
|
+
ks0ApVdstSLz1kzzAqem/uHdG9FyXdbTAwH1G4ZPv69sQAFAOCgAqYmdnzedsQtE
|
22
|
+
1LQfaQrx0twO+CZJPcRLEESjq8ScQxWRRkfuh2VeR7cEU7L7KqT10mtUwrvw7APf
|
23
|
+
DYoeCY9KyjIBjQXfbj2ke5u1hZj94Fsq9FfbEQg8ygCgwThnmkTrrKEiMSs3alYR
|
24
|
+
ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
|
25
|
+
WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
|
21
26
|
-----END CERTIFICATE-----
|
data/ez-email.gemspec
CHANGED
@@ -1,19 +1,28 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
|
3
|
-
Gem::Specification.new do |
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = 'ez-email'
|
5
|
+
spec.version = '0.2.0'
|
6
|
+
spec.license = 'Apache-2.0'
|
7
|
+
spec.summary = 'Really easy emails'
|
8
|
+
spec.description = 'A very simple interface for sending email'
|
9
|
+
spec.author = 'Daniel Berger'
|
10
|
+
spec.email = 'djberg96@gmail.com'
|
11
|
+
spec.homepage = 'https://github.com/djberg96/ez-email'
|
12
|
+
spec.test_file = 'test/test_ez_email.rb'
|
13
|
+
spec.files = Dir['**/*'].reject{ |f| f.include?('git') }
|
14
|
+
spec.cert_chain = Dir['certs/*']
|
15
15
|
|
16
|
-
|
16
|
+
spec.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
|
17
17
|
|
18
|
-
|
18
|
+
spec.add_development_dependency('test-unit')
|
19
|
+
|
20
|
+
spec.metadata = {
|
21
|
+
'homepage_uri' => 'https://github.com/djberg96/ez-email',
|
22
|
+
'bug_tracker_uri' => 'https://github.com/djberg96/ez-email/issues',
|
23
|
+
'changelog_uri' => 'https://github.com/djberg96/ez-email/blob/master/CHANGES',
|
24
|
+
'documentation_uri' => 'https://github.com/djberg96/ez-email/wiki',
|
25
|
+
'source_code_uri' => 'https://github.com/djberg96/ez-email',
|
26
|
+
'wiki_uri' => 'https://github.com/djberg96/ez-email/wiki'
|
27
|
+
}
|
19
28
|
end
|
data/lib/ez-email.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require_relative 'ez/email'
|
data/lib/ez/email.rb
CHANGED
@@ -10,37 +10,27 @@ module EZ
|
|
10
10
|
# used to send simple emails.
|
11
11
|
class Email
|
12
12
|
# The version of the ez-email library
|
13
|
-
VERSION = '0.
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
@@mail_host
|
29
|
-
end
|
30
|
-
|
31
|
-
# Sets the mail host.
|
32
|
-
def self.mail_host=(host)
|
33
|
-
@@mail_host = host
|
34
|
-
end
|
35
|
-
|
36
|
-
# The port to use when sending email. The default is 25.
|
37
|
-
def self.mail_port
|
38
|
-
@@mail_port
|
39
|
-
end
|
13
|
+
VERSION = '0.2.0'.freeze
|
14
|
+
|
15
|
+
class << self
|
16
|
+
attr_writer :mail_host
|
17
|
+
attr_writer :mail_port
|
18
|
+
|
19
|
+
# The name of the mail host to use when sending email. The default
|
20
|
+
# is whatever the address of your system's 'mailhost' resolves to.
|
21
|
+
# If that cannot be determined, your localhost is used.
|
22
|
+
#
|
23
|
+
def mail_host
|
24
|
+
@mail_host ||= Resolv.getaddress('mailhost')
|
25
|
+
rescue Resolv::ResolvError
|
26
|
+
@mail_host ||= 'localhost'
|
27
|
+
end
|
40
28
|
|
41
|
-
|
42
|
-
|
43
|
-
|
29
|
+
# The port to use when sending email. The default is 25.
|
30
|
+
#
|
31
|
+
def mail_port
|
32
|
+
@mail_port ||= 25
|
33
|
+
end
|
44
34
|
end
|
45
35
|
|
46
36
|
# A single email address or an array of email addresses to whom
|
@@ -76,10 +66,12 @@ module EZ
|
|
76
66
|
host = EZ::Email.mail_host
|
77
67
|
port = EZ::Email.mail_port
|
78
68
|
|
69
|
+
to_list = self.to.is_a?(Array) ? self.to : [self.to]
|
70
|
+
|
79
71
|
Net::SMTP.start(host, port, host){ |smtp|
|
80
72
|
smtp.open_message_stream(self.from, self.to){ |stream|
|
81
73
|
stream.puts "From: #{self.from}"
|
82
|
-
stream.puts "To: " +
|
74
|
+
stream.puts "To: " + to_list.join(', ')
|
83
75
|
stream.puts "Subject: #{self.subject}"
|
84
76
|
stream.puts
|
85
77
|
stream.puts self.body
|
data/test/test_ez_email.rb
CHANGED
@@ -25,7 +25,8 @@ class TC_EZ_Email < Test::Unit::TestCase
|
|
25
25
|
end
|
26
26
|
|
27
27
|
test "version is set to expected value" do
|
28
|
-
assert_equal('0.
|
28
|
+
assert_equal('0.2.0', EZ::Email::VERSION)
|
29
|
+
assert_true(EZ::Email::VERSION.frozen?)
|
29
30
|
end
|
30
31
|
|
31
32
|
test "to getter method basic functionality" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ez-email
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Berger
|
@@ -10,27 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
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D5MYQIDAQABo3cwdTAJBgNV
|
26
|
+
HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUFZsMapgzJimzsbaBG2Tm8j5e
|
27
|
+
AzgwHQYDVR0RBBYwFIESZGpiZXJnOTZAZ21haWwuY29tMB0GA1UdEgQWMBSBEmRq
|
28
|
+
YmVyZzk2QGdtYWlsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAW2tnYixXQtKxgGXq
|
29
|
+
/3iSWG2bLwvxS4go3srO+aRXZHrFUMlJ5W0mCxl03aazxxKTsVVpZD8QZxvK91OQ
|
30
|
+
h9zr9JBYqCLcCVbr8SkmYCi/laxIZxsNE5YI8cC8vvlLI7AMgSfPSnn/Epq1GjGY
|
31
|
+
6L1iRcEDtanGCIvjqlCXO9+BmsnCfEVehqZkQHeYczA03tpOWb6pon2wzvMKSsKH
|
32
|
+
ks0ApVdstSLz1kzzAqem/uHdG9FyXdbTAwH1G4ZPv69sQAFAOCgAqYmdnzedsQtE
|
33
|
+
1LQfaQrx0twO+CZJPcRLEESjq8ScQxWRRkfuh2VeR7cEU7L7KqT10mtUwrvw7APf
|
34
|
+
DYoeCY9KyjIBjQXfbj2ke5u1hZj94Fsq9FfbEQg8ygCgwThnmkTrrKEiMSs3alYR
|
35
|
+
ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
|
36
|
+
WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
|
32
37
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
38
|
+
date:
|
34
39
|
dependencies:
|
35
40
|
- !ruby/object:Gem::Dependency
|
36
41
|
name: test-unit
|
@@ -55,22 +60,29 @@ extra_rdoc_files:
|
|
55
60
|
- CHANGES
|
56
61
|
- MANIFEST
|
57
62
|
files:
|
58
|
-
- certs
|
59
|
-
- certs/djberg96_pub.pem
|
60
63
|
- CHANGES
|
64
|
+
- test
|
65
|
+
- test/test_ez_email.rb
|
66
|
+
- README
|
61
67
|
- ez-email.gemspec
|
68
|
+
- Rakefile
|
69
|
+
- MANIFEST
|
62
70
|
- lib
|
63
71
|
- lib/ez
|
64
72
|
- lib/ez/email.rb
|
65
|
-
-
|
66
|
-
-
|
67
|
-
-
|
68
|
-
- test
|
69
|
-
- test/test_ez_email.rb
|
73
|
+
- lib/ez-email.rb
|
74
|
+
- certs
|
75
|
+
- certs/djberg96_pub.pem
|
70
76
|
homepage: https://github.com/djberg96/ez-email
|
71
77
|
licenses:
|
72
|
-
-
|
73
|
-
metadata:
|
78
|
+
- Apache-2.0
|
79
|
+
metadata:
|
80
|
+
homepage_uri: https://github.com/djberg96/ez-email
|
81
|
+
bug_tracker_uri: https://github.com/djberg96/ez-email/issues
|
82
|
+
changelog_uri: https://github.com/djberg96/ez-email/blob/master/CHANGES
|
83
|
+
documentation_uri: https://github.com/djberg96/ez-email/wiki
|
84
|
+
source_code_uri: https://github.com/djberg96/ez-email
|
85
|
+
wiki_uri: https://github.com/djberg96/ez-email/wiki
|
74
86
|
post_install_message:
|
75
87
|
rdoc_options: []
|
76
88
|
require_paths:
|
@@ -86,8 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
98
|
- !ruby/object:Gem::Version
|
87
99
|
version: '0'
|
88
100
|
requirements: []
|
89
|
-
|
90
|
-
rubygems_version: 2.5.1
|
101
|
+
rubygems_version: 3.0.2
|
91
102
|
signing_key:
|
92
103
|
specification_version: 4
|
93
104
|
summary: Really easy emails
|
metadata.gz.sig
CHANGED
Binary file
|