sendhub 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sendhub/client.rb +1 -1
- data/lib/sendhub/rails2.rb +4 -20
- metadata +3 -3
data/lib/sendhub/client.rb
CHANGED
data/lib/sendhub/rails2.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module SendhubMethods
|
2
2
|
def perform_delivery_sendhub(message)
|
3
3
|
client = Sendhub::Client.new(
|
4
|
-
:api_key =>
|
5
|
-
: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
|
35
|
-
|
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:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Richard Taylor
|