ocean-rails 2.15.0 → 2.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean/api.rb +16 -0
- data/lib/ocean/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12bffa69ee07ff94b7a5ebb69361264cd8d4b9cc
|
4
|
+
data.tar.gz: 268b66c8312f1f8594839206f3614a32800c7ebe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9becfd91ec5c58822a2fe6780e8d9fe87a416b6e6162d80cb17699894946672d117b2e7023c818a4cf51d44fdb40e3b504e0ac9a8e4f75e0d3ed0f6b0fa7d1bf
|
7
|
+
data.tar.gz: 38d7536afe681685dcf28718f21ee11d8954f1216074111e448e4d0abd6e07f3a6339f2f397f2e2cdd902f12d2aa8e5b3cdac5ecf9f3264c2dedb74c341662da
|
data/lib/ocean/api.rb
CHANGED
@@ -274,6 +274,22 @@ class Api
|
|
274
274
|
end
|
275
275
|
|
276
276
|
|
277
|
+
#
|
278
|
+
# Send an email asynchronously. The Mailer role is required.
|
279
|
+
#
|
280
|
+
def self.send_mail(from: from, to: to, subject: subject, plaintext: plaintext, html: html,
|
281
|
+
plaintext_url: plaintext_url, html_url: html_url, substitutions: substitutions)
|
282
|
+
Api.request "#{INTERNAL_OCEAN_API_URL}/v1/mails", :post,
|
283
|
+
x_api_token: Api.service_token,
|
284
|
+
body: {
|
285
|
+
from: from, to: to, subject: subject,
|
286
|
+
plaintext: plaintext, html: html,
|
287
|
+
plaintext_url: plaintext_url, html_url: html_url,
|
288
|
+
substitutions: substitutions
|
289
|
+
}.to_json
|
290
|
+
end
|
291
|
+
|
292
|
+
|
277
293
|
#
|
278
294
|
# This escapes BAN request paths, which is needed as they are regexes.
|
279
295
|
#
|
data/lib/ocean/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocean-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|