postageapp 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/postageapp/mailer.rb +3 -2
- data/postageapp.gemspec +1 -1
- data/test/mailer_helper_methods_test.rb +1 -4
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2
|
data/lib/postageapp/mailer.rb
CHANGED
@@ -31,7 +31,7 @@ class PostageApp::Request
|
|
31
31
|
|
32
32
|
def to
|
33
33
|
out = self.arguments_to_send.dig('arguments', 'recipients')
|
34
|
-
out
|
34
|
+
out.is_a?(Hash) ? out : [out].flatten
|
35
35
|
end
|
36
36
|
|
37
37
|
def from
|
@@ -43,7 +43,8 @@ class PostageApp::Request
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def body
|
46
|
-
self.arguments_to_send.dig('arguments', 'content')
|
46
|
+
out = self.arguments_to_send.dig('arguments', 'content')
|
47
|
+
out.is_a?(Hash) ? out.values.join("\n\n") : out.to_s
|
47
48
|
end
|
48
49
|
|
49
50
|
end
|
data/postageapp.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{postageapp}
|
8
|
-
s.version = "1.0.
|
8
|
+
s.version = "1.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Oleg Khabarov, The Working Group Inc"]
|
@@ -15,10 +15,7 @@ class MailerHelperMethodsTest < Test::Unit::TestCase
|
|
15
15
|
assert_equal ['test@test.test'], request.to
|
16
16
|
assert_equal ['sender@test.test'], request.from
|
17
17
|
assert_equal 'Test Message', request.subject
|
18
|
-
assert_equal
|
19
|
-
'text/html' => 'html content',
|
20
|
-
'text/plain' => 'text content'
|
21
|
-
}).to_s, request.body
|
18
|
+
assert_equal "html content\n\ntext content", request.body
|
22
19
|
end
|
23
20
|
|
24
21
|
end
|