circuit_rails 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 27fa28d9036f01f15a25b9ad3cce938585159a76
4
- data.tar.gz: 742f7713e8f5b6abb88af1ea18f8bb8e59024349
2
+ SHA256:
3
+ metadata.gz: 60d27940ab74644318a802ac043cd60265def815d7494f469838aafc019cfd67
4
+ data.tar.gz: 7d60891360fe0f17ccbc62d041c9056056ee146649787c78efa7eaee5a4e3e64
5
5
  SHA512:
6
- metadata.gz: dec4fa01974e4e0a925282223ac5608f6d1b68554131eee52c31b65ca8bdc524d81a5ccee053363c1e6c7c351fa623985f3195666f77046f7fd7c54b80b90229
7
- data.tar.gz: '08433f1112da200b1dc64b5dbfc546a94e0db135c108819cda65583405bb668778e84743f4ae61d213df36771b5db8310f45fe396ffd7446d24b60f2d8047058'
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
- :host => 'eu.yourcircuit.com',
11
- :client_id => nil,
12
- :client_secret => nil,
13
- :default_conversation => nil,
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
- self.settings = DEFAULTS.merge(values)
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, "a conversation or default_conversation is required for circuit delivery!" if conv.nil?
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.1
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-02-26 00:00:00.000000000 Z
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.8
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.