sendhub 0.1.8 → 0.1.9

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.
data/lib/sendhub.rb CHANGED
@@ -15,8 +15,8 @@ require 'sendhub/client'
15
15
  if defined? Rails
16
16
  if Rails.version =~ /^2./
17
17
  require 'action_mailer'
18
- require 'sendhub/rails2'
18
+ require 'sendhub/plugins/rails2'
19
19
  elsif Rails.version =~ /^3./
20
- require 'sendhub/rails3'
20
+ require 'sendhub/plugins/rails3'
21
21
  end
22
22
  end
@@ -1,7 +1,7 @@
1
1
  module Sendhub
2
2
  class Client
3
3
 
4
- VERSION = '0.1.8'
4
+ VERSION = '0.1.9'
5
5
 
6
6
  def initialize(config=nil)
7
7
  config[:host] ||= 'api.sendhub.net'
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: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 8
10
- version: 0.1.8
9
+ - 9
10
+ version: 0.1.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Taylor
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-06 00:00:00 +01:00
18
+ date: 2010-09-07 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -48,8 +48,6 @@ files:
48
48
  - lib/sendhub.rb
49
49
  - lib/sendhub/client.rb
50
50
  - lib/sendhub/http.rb
51
- - lib/sendhub/rails2.rb
52
- - lib/sendhub/rails3.rb
53
51
  - lib/sendhub/response.rb
54
52
  has_rdoc: true
55
53
  homepage: http://sendhub.net/
@@ -1,30 +0,0 @@
1
- module SendhubMethods
2
-
3
- def self.included(base)
4
- base.extend(ClassMethods)
5
- end
6
-
7
- module ClassMethods
8
- @sendhub_settings = {}
9
- attr_accessor :sendhub_settings
10
- end
11
-
12
- def perform_delivery_sendhub(message)
13
- client = Sendhub::Client.new(
14
- :api_key => ActionMailer::Base.sendhub_settings[:api_key],
15
- :secret_key => ActionMailer::Base.sendhub_settings[:secret_key]
16
- )
17
- res = client.send_email(
18
- :from => message.from,
19
- :to => message.to,
20
- :subject => message.subject,
21
- :body => message.body,
22
- :content_type => message.content_type
23
- )
24
- end
25
-
26
- end
27
-
28
- class ActionMailer::Base
29
- include SendhubMethods
30
- end
@@ -1,22 +0,0 @@
1
- module Sendhub
2
- class Rails
3
- def initialize(options)
4
- @client = Sendhub::Client.new(
5
- :api_key => options[:api_key],
6
- :secret_key => options[:secret_key]
7
- )
8
- end
9
-
10
- def deliver!(message)
11
- res = @client.send_email(
12
- :from => message.from,
13
- :to => message.to,
14
- :subject => message.subject,
15
- :body => message.body,
16
- :content_type => message.content_type
17
- )
18
- end
19
- end
20
- end
21
-
22
- ActionMailer::Base.add_delivery_method :sendhub, Sendhub::Rails