notification-pusher-actionmailer 1.0.0.beta10 → 1.0.0.beta11

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
2
  SHA256:
3
- metadata.gz: c7193d4eae4d91b59732c025f7656a84436ca08f032fd205a210c96dd8f615bb
4
- data.tar.gz: 9e784add8cb55086dcb9fb6f0164affcdd8f1166e42adacf51666a4e050ddcef
3
+ metadata.gz: 9e05dc95ea45bcdfca6f9eac891e4f4f608a34134fc213aac8785609934561ff
4
+ data.tar.gz: 2eed7dc94d162628c51ef36b72e7f889411d2658dfeb7df42ff96acfab137d31
5
5
  SHA512:
6
- metadata.gz: 6eccbcbdeb6b21c7040ba51f51522d3c3dde379aba53ba2e90f5e7b93159cb72cd9c2121dc81e63af94d39fd518f9eb164db62dfb8501acf68448009fcac6248
7
- data.tar.gz: 49e591211206d0b75901b78c35883230dc153d39c03a687d383e8b23088c0a22ca4dcd892e2561bdfeabab2fc3440f9d29346aa77d900d2e926224b89f924a7b
6
+ metadata.gz: 72c0d495c612778445708da5e8ddabfe3319e19ae3dd97ddb189ee4f70170bc6ffa393e29e607910adabdda2e86b61afd5533c411f5dfe281aedbabaad606816
7
+ data.tar.gz: 71fc6a8e51f2bbb6cbab931ff0e4b2418cb2f099dc64eef9ccc0e3084a6b6d31594295b1b885943b438e8b1c7b494ac828a2dad9ff30ebd0816f22ce9cf6bc05
@@ -0,0 +1,9 @@
1
+ class NotificationPusher::ActionMailer::NotificationMailer < ApplicationMailer
2
+
3
+ def push notification, options = {}
4
+ @notification = notification
5
+ @renderer = options[:renderer] || 'actionmailer'
6
+ mail to: options[:to] || notification.target.email, from: options[:from]
7
+ end
8
+
9
+ end
@@ -0,0 +1 @@
1
+ <%= render_notification @notification, @renderer %>
@@ -1 +1,2 @@
1
+ require 'notification-pusher'
1
2
  require 'notification_pusher/action_mailer'
@@ -1,4 +1,5 @@
1
1
  require 'rails/railtie'
2
+ require 'action_mailer'
2
3
 
3
4
  module NotificationPusher
4
5
  class ActionMailer
@@ -1,9 +1,11 @@
1
+ require 'notification-renderer'
2
+
1
3
  class NotificationPusher::ActionMailer
2
4
 
3
5
  require 'notification_pusher/action_mailer/engine'
4
6
 
5
7
  def initialize notification, options = {}
6
- NotificationPusherActionmailerMailer.push notification, options
8
+ ::NotificationPusher::ActionMailer::NotificationMailer.push notification, options
7
9
  end
8
10
 
9
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notification-pusher-actionmailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta10
4
+ version: 1.0.0.beta11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 1.0.0.beta10
47
+ version: 1.0.0.beta11
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 1.0.0.beta10
54
+ version: 1.0.0.beta11
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: notification-renderer
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.0.beta10
61
+ version: 1.0.0.beta11
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 1.0.0.beta10
68
+ version: 1.0.0.beta11
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -103,6 +103,8 @@ files:
103
103
  - CHANGELOG.md
104
104
  - LICENSE
105
105
  - README.md
106
+ - app/mailers/notification_pusher/action_mailer/notification_mailer.rb
107
+ - app/views/notification_pusher/action_mailer/notification_mailer/push.html.erb
106
108
  - lib/notification-pusher-actionmailer.rb
107
109
  - lib/notification_pusher/action_mailer.rb
108
110
  - lib/notification_pusher/action_mailer/engine.rb