malone 1.0.7 → 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/.gems +2 -0
- data/.gitignore +1 -0
- data/Makefile +4 -0
- data/lib/malone.rb +3 -26
- data/malone.gemspec +8 -15
- metadata +17 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f172561f109c7824a28eebefc1f46b602af464f5
|
4
|
+
data.tar.gz: 553c691a79fff0dc2b7582e6c13d57c9f83324fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 334ff5a81a3317702616e41adfa8d34fbb82849a280c214a662e8c40208d4cba284d6a1e321d4d65752f61b34f395d7969841faa429422c292861e5aeafaf9c9
|
7
|
+
data.tar.gz: 1cffdd95f5367221bf2ba17b7bc194036adbe06d8a07faedaf02a7e4b22eeb35ba0ccd384ef2e6a485062c20a7162368df0e93ea2ae61a673bb0f678fc6ef165
|
data/.gems
ADDED
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/pkg
|
data/Makefile
ADDED
data/lib/malone.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require "cgi"
|
2
|
-
require "
|
2
|
+
require "kuvert"
|
3
3
|
require "net/smtp"
|
4
4
|
require "uri"
|
5
5
|
|
@@ -36,22 +36,14 @@ class Malone
|
|
36
36
|
|
37
37
|
begin
|
38
38
|
smtp.start(config.domain, config.user, config.password, config.auth)
|
39
|
-
smtp.send_message(mail.to_s, mail.from.first, *recipients
|
39
|
+
smtp.send_message(mail.to_s, mail.from.first, *mail.recipients)
|
40
40
|
ensure
|
41
41
|
smtp.finish if smtp.started?
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
def recipients(mail)
|
46
|
-
[].tap do |ret|
|
47
|
-
ret.push(*mail.to)
|
48
|
-
ret.push(*mail.cc)
|
49
|
-
ret.push(*mail.bcc)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
45
|
def envelope(dict)
|
54
|
-
envelope =
|
46
|
+
envelope = Kuvert.new
|
55
47
|
envelope.from = dict[:from]
|
56
48
|
envelope.to = dict[:to]
|
57
49
|
envelope.replyto = dict[:replyto]
|
@@ -62,7 +54,6 @@ class Malone
|
|
62
54
|
envelope.subject = dict[:subject]
|
63
55
|
|
64
56
|
envelope.attach(dict[:attach]) if dict[:attach]
|
65
|
-
|
66
57
|
envelope.add_attachment_as(*dict[:attach_as]) if dict[:attach_as]
|
67
58
|
|
68
59
|
return envelope
|
@@ -110,18 +101,4 @@ class Malone
|
|
110
101
|
CGI.unescape(val)
|
111
102
|
end
|
112
103
|
end
|
113
|
-
|
114
|
-
class Envelope < MailFactory
|
115
|
-
attr :bcc
|
116
|
-
|
117
|
-
def initialize
|
118
|
-
super
|
119
|
-
|
120
|
-
@bcc = []
|
121
|
-
end
|
122
|
-
|
123
|
-
def bcc=(bcc)
|
124
|
-
@bcc.push(bcc)
|
125
|
-
end
|
126
|
-
end
|
127
104
|
end
|
data/malone.gemspec
CHANGED
@@ -1,23 +1,16 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'malone'
|
3
|
-
s.version = "1.0
|
4
|
-
s.summary = %{
|
3
|
+
s.version = "1.1.0"
|
4
|
+
s.summary = %{The Mailman}
|
5
|
+
s.description = %{Dead-simple Ruby mailing solution which always delivers.}
|
5
6
|
s.date = "2011-01-10"
|
6
7
|
s.author = "Cyril David"
|
7
|
-
s.email = "
|
8
|
+
s.email = "cyx@cyx.is"
|
8
9
|
s.homepage = "http://github.com/cyx/malone"
|
9
|
-
|
10
|
-
s.files = Dir[
|
11
|
-
"CHANGELOG",
|
12
|
-
"LICENSE",
|
13
|
-
"README.md",
|
14
|
-
"lib/**/*.rb",
|
15
|
-
"test/*.*",
|
16
|
-
"*.gemspec"
|
17
|
-
]
|
18
|
-
|
10
|
+
s.files = `git ls-files`.split("\n")
|
19
11
|
s.require_paths = ["lib"]
|
20
12
|
|
21
|
-
s.add_dependency "
|
22
|
-
s.add_development_dependency "cutest"
|
13
|
+
s.add_dependency "kuvert", "~> 0.0"
|
14
|
+
s.add_development_dependency "cutest", "~> 1.2"
|
15
|
+
s.license = "MIT"
|
23
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: malone
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril David
|
@@ -11,41 +11,44 @@ cert_chain: []
|
|
11
11
|
date: 2011-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: kuvert
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0.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
|
-
version: '
|
26
|
+
version: '0.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cutest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.2'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
description:
|
42
|
-
email:
|
40
|
+
version: '1.2'
|
41
|
+
description: Dead-simple Ruby mailing solution which always delivers.
|
42
|
+
email: cyx@cyx.is
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
+
- ".gems"
|
48
|
+
- ".gitignore"
|
47
49
|
- CHANGELOG
|
48
50
|
- LICENSE
|
51
|
+
- Makefile
|
49
52
|
- README.md
|
50
53
|
- lib/malone.rb
|
51
54
|
- lib/malone/test.rb
|
@@ -53,7 +56,8 @@ files:
|
|
53
56
|
- test/helper.rb
|
54
57
|
- test/malone.rb
|
55
58
|
homepage: http://github.com/cyx/malone
|
56
|
-
licenses:
|
59
|
+
licenses:
|
60
|
+
- MIT
|
57
61
|
metadata: {}
|
58
62
|
post_install_message:
|
59
63
|
rdoc_options: []
|
@@ -71,8 +75,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
75
|
version: '0'
|
72
76
|
requirements: []
|
73
77
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.
|
78
|
+
rubygems_version: 2.4.5
|
75
79
|
signing_key:
|
76
80
|
specification_version: 4
|
77
|
-
summary:
|
81
|
+
summary: The Mailman
|
78
82
|
test_files: []
|