silent_bob 0.2.0 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/silent_bob.rb +1 -0
- data/lib/silent_bob/email_sender.rb +9 -1
- data/lib/silent_bob/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32eb6004a8e892ed5eb61d3faecd2aa246dbf349ce0f0ef5500bd0e9b34b621a
|
4
|
+
data.tar.gz: b4e694d2bac987d1cd237767c226e3fef21ada50c891084deb69311906bccf82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45cfef0803c0b129260ec08420a4b4be3e396658a97f2bfb937200c7e4e94d1b0573beef1ac808013ef2d00e86cd9d014001a8eb3562de268eda5c2e81d76b12
|
7
|
+
data.tar.gz: 5cc607a6a99cb383a2b9e17c53d81f358f11d98bbf1fb6cf3f5545bf19e9f95df34289eecf2d95a8feb0d9ab5a5af907bc6a01d58c22b177c581d0d192b0609c
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -47,7 +47,7 @@ SilentBob::SmsSender.new(to: '78881214455', body: 'sms-text', configuration: con
|
|
47
47
|
To connect `SilentBob` to `ActionMailer`
|
48
48
|
|
49
49
|
```ruby
|
50
|
-
ActionMailer::Base.add_delivery_method :
|
50
|
+
ActionMailer::Base.add_delivery_method :silent_bob_delivery, SilentBob::Delivery
|
51
51
|
```
|
52
52
|
|
53
53
|
In this case `SilentBob::ConfigurationKeeper.default_config` **must be initialized**
|
data/lib/silent_bob.rb
CHANGED
@@ -44,8 +44,16 @@ module SilentBob
|
|
44
44
|
|
45
45
|
def handle_attachments(attachments)
|
46
46
|
attachments&.map do |attachment|
|
47
|
-
{
|
47
|
+
{
|
48
|
+
name: attachment[:name],
|
49
|
+
body: Base64.encode64(attachment_body(attachment))
|
50
|
+
}
|
48
51
|
end
|
49
52
|
end
|
53
|
+
|
54
|
+
def attachment_body(attachment)
|
55
|
+
body = attachment[:body]
|
56
|
+
body.is_a?(Mail::Part) ? body.decoded&.to_s : body.to_s
|
57
|
+
end
|
50
58
|
end
|
51
59
|
end
|
data/lib/silent_bob/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: silent_bob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Lobanov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-12-
|
11
|
+
date: 2020-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|