sendhub 0.1.5 → 0.1.6

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.
@@ -1,7 +1,7 @@
1
1
  module Sendhub
2
2
  class Client
3
3
 
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.6'
5
5
 
6
6
  def initialize(config=nil)
7
7
  config[:host] ||= 'api.sendhub.net'
@@ -1,8 +1,8 @@
1
1
  module SendhubMethods
2
2
  def perform_delivery_sendhub(message)
3
3
  client = Sendhub::Client.new(
4
- :api_key => SENDHUB_API_KEY,
5
- :secret_key => SENDHUB_SECRET_KEY
4
+ :api_key => @@sendhub_settings[:api_key],
5
+ :secret_key => @@sendhub_settings[:secret_key]
6
6
  )
7
7
  res = client.send_email(
8
8
  :from => message.from,
@@ -13,29 +13,13 @@ module SendhubMethods
13
13
  )
14
14
  end
15
15
 
16
- def tag(value)
17
- @tag = value
18
- end
19
-
20
16
  def self.included(base)
21
17
  base.extend(ClassMethods)
22
- base.class_eval do
23
- alias_method_chain :create_mail, :tag
24
- end
25
- end
26
-
27
- def create_mail_with_tag
28
- returning create_mail_without_tag do |mail|
29
- mail.tag = @tag if @tag
30
- end
31
18
  end
32
19
 
33
20
  module ClassMethods
34
- def sendhub_api_key=(value)
35
- #Sendhub.api_key = value
36
- end
37
- def sendhub_secret_key=(value)
38
- #Sendhub.api_key = value
21
+ def sendhub_settings=(options)
22
+ @@sendhub_settings = options
39
23
  end
40
24
  end
41
25
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendhub
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 5
10
- version: 0.1.5
9
+ - 6
10
+ version: 0.1.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Taylor