circuit_rails 0.0.1 → 0.0.2
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 +5 -5
- data/lib/circuit_rails/delivery_method.rb +8 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 60d27940ab74644318a802ac043cd60265def815d7494f469838aafc019cfd67
|
4
|
+
data.tar.gz: 7d60891360fe0f17ccbc62d041c9056056ee146649787c78efa7eaee5a4e3e64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98569336b1b66b2615808098218a2c06985223f7e8f27de03f956b21ea71a84ba934214fca3adb02fc97c9777515dbd6b8ace317d92ea5b66550c1456ae72169
|
7
|
+
data.tar.gz: 394ed1c22d77164b7cd2421fd82116d1ab88687f14ee7f06d46974862824e076b787bd469c01ade0d9858261ebb9e26e4f21888bb669683b302f365532f14ab8
|
@@ -7,14 +7,15 @@ module CircuitRails
|
|
7
7
|
attr_accessor :settings
|
8
8
|
|
9
9
|
DEFAULTS = {
|
10
|
-
:
|
11
|
-
:
|
12
|
-
:
|
13
|
-
:
|
10
|
+
host: 'eu.yourcircuit.com',
|
11
|
+
client_id: nil,
|
12
|
+
client_secret: nil,
|
13
|
+
auth_scope: 'ALL',
|
14
|
+
default_conversation: nil
|
14
15
|
}
|
15
16
|
|
16
17
|
def initialize(values)
|
17
|
-
|
18
|
+
self.settings = DEFAULTS.merge(values)
|
18
19
|
end
|
19
20
|
|
20
21
|
def client
|
@@ -22,12 +23,13 @@ module CircuitRails
|
|
22
23
|
c.host = settings[:host]
|
23
24
|
c.client_id = settings[:client_id]
|
24
25
|
c.client_secret = settings[:client_secret]
|
26
|
+
c.auth_scope = settings[:auth_scope]
|
25
27
|
end
|
26
28
|
end
|
27
29
|
|
28
30
|
def deliver!(mail)
|
29
31
|
conv = mail.conversation || settings[:default_conversation]
|
30
|
-
raise MissingParameter,
|
32
|
+
raise MissingParameter, 'a conversation or default_conversation is required for circuit delivery!' if conv.nil?
|
31
33
|
body = mail.multipart? ? mail.text_part.body.decoded : mail.body.decoded
|
32
34
|
options = {}
|
33
35
|
options[:subject] = mail.subject unless mail.subject.nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: circuit_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Benning
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.6
|
103
|
+
rubygems_version: 2.7.6
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Action Mailer adapter for using Circuit in Rails apps.
|