ocean-rails 2.15.0 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e218968626a16b56c5743be6f22ab1f822e9182
4
- data.tar.gz: 22e60a5c764791a5ac0e424de04dbbcf6d2708aa
3
+ metadata.gz: 12bffa69ee07ff94b7a5ebb69361264cd8d4b9cc
4
+ data.tar.gz: 268b66c8312f1f8594839206f3614a32800c7ebe
5
5
  SHA512:
6
- metadata.gz: bac3e80e4203e4df89b28da660296e29599ddf64bfa8b443c5d053095219c2a230f2ade0dc6fe026f15bb1e71c0f393723aef2d2144e7934815fc473401a188d
7
- data.tar.gz: 183633c8d48c1d629b36328c11cb2b0905a55bb1561ff6cee1d5e8eceec725b5fdea2f0ca90870dc4fd36c576c0da6f2bd977f6e7a1868bfe35682f5faf0b8b6
6
+ metadata.gz: 9becfd91ec5c58822a2fe6780e8d9fe87a416b6e6162d80cb17699894946672d117b2e7023c818a4cf51d44fdb40e3b504e0ac9a8e4f75e0d3ed0f6b0fa7d1bf
7
+ data.tar.gz: 38d7536afe681685dcf28718f21ee11d8954f1216074111e448e4d0abd6e07f3a6339f2f397f2e2cdd902f12d2aa8e5b3cdac5ecf9f3264c2dedb74c341662da
@@ -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
  #
@@ -1,3 +1,3 @@
1
1
  module Ocean
2
- VERSION = "2.15.0"
2
+ VERSION = "2.16.0"
3
3
  end
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.15.0
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-24 00:00:00.000000000 Z
11
+ date: 2014-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus