notification-pusher-actionmailer 1.0.0.beta6 → 1.0.0.beta7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 00ba1406ee16d66a05cdf5be59e296e4c20830b5fee8bfade516fc2572707780
4
- data.tar.gz: a3a78fc78bccc38237732d3395d6bea8a638264343372c9b71a14ad469dde027
3
+ metadata.gz: 0d58e52ac6626844bdc8c506db5b0736f6948c98cc1c6c1f0151d9a9f0f0f6ef
4
+ data.tar.gz: ff0ca32ac607d598c7985ee37f9ef60ff4212b61605db923693ecdbcd0c3d800
5
5
  SHA512:
6
- metadata.gz: d29ca7bc4f056ee3af26c85f36dde40dce6096978a2d2c3b64b918929a648edfd3bd91db66e5081db70943ad7b5bb8c77b028164467997beeae88b4f02cbbb2b
7
- data.tar.gz: 3e00c7699487f1a4eb490517705e3899e50b2bd9b281c428b8c89014426e4991eac8b6b714230800d9b9c9c9ecbd13427ed8881d000311d5ba87130ebaaad3bd
6
+ metadata.gz: 485631804bbd14d20a6502f96177ba7e852129ef51ab923cd03bfc9a2adbc422b4b0e6f0b0e1f55a7fae6e60678ec2184706d3883a9984c001a7fd985ae625f8
7
+ data.tar.gz: 29f3b6c1572bcfb26c0045c1537d478665071f646445e24da75088bd4b58f368fa97393a87d05685de3fd775bf98ebc7e8894836a6f8f78a030a6e0e4e21346f
data/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # Changelog
2
+
3
+ ### master
4
+
5
+ * nothing yet
6
+
7
+ ### 1.0.0.beta6 - 2017-12-28
8
+
9
+ * bugfixes
10
+ * fix lib loading problems
11
+
12
+ ### 1.0.0.beta5 - 2017-12-28
13
+
14
+ * no changes
15
+
16
+ ### 1.0.0.beta4 - 2017-12-27
17
+
18
+ * features
19
+ * add functionality
20
+
21
+ ### 1.0.0.beta3 - 2017-12-25
22
+
23
+ * no changes
24
+
25
+ ### 1.0.0.beta2 - 2017-12-23
26
+
27
+ * no changes
28
+
29
+ ### 1.0.0.beta1 - 2017-12-22
30
+
31
+ * initial release
data/README.md CHANGED
@@ -1,17 +1,16 @@
1
- # NotificationsRails
1
+ # NotificationPusher for ActionMailer
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/notifications-rails.svg)](https://badge.fury.io/rb/notifications-rails) <img src="https://travis-ci.org/jonhue/notifications-rails.svg?branch=master" />
3
+ [![Gem Version](https://badge.fury.io/rb/notification-pusher-actionmailer.svg)](https://badge.fury.io/rb/notification-pusher-actionmailer) <img src="https://travis-ci.org/jonhue/notifications-rails.svg?branch=master" />
4
4
 
5
- The most powerful notification solution for Rails. NotificationsRails simplifies the handling, rendering, user-integration and cross-platform pushing of notifications through its simple API.
6
-
7
- It integrates with the [Native](https://github.com/NativeGap/native-rails) gem to allow you to create a cross platform Rails app.
5
+ A pusher to send your notifications via email utilizing ActionMailer.
8
6
 
9
7
  ---
10
8
 
11
9
  ## Table of Contents
12
10
 
13
- * [Philosophy](#philosophy)
14
11
  * [Installation](#installation)
12
+ * [Usage](#usage)
13
+ * [Options](#options)
15
14
  * [To Do](#to-do)
16
15
  * [Contributing](#contributing)
17
16
  * [Contributors](#contributors)
@@ -20,49 +19,74 @@ It integrates with the [Native](https://github.com/NativeGap/native-rails) gem t
20
19
 
21
20
  ---
22
21
 
23
- ## Philosophy
22
+ ## Installation
24
23
 
25
- NotificationsRails has been built with modularity in mind. It currently consists of four components each of which bringing one essential functionality to the notification-integration in your Rails app.
24
+ NotificationPusher for ActionMailer works with Rails 5 onwards. You can add it to your `Gemfile` with:
26
25
 
27
- **[NotificationHandler](notification-handler):** Create and modify your notifications through a simple API.
26
+ ```ruby
27
+ gem 'notification-pusher-actionmailer'
28
+ ```
28
29
 
29
- **[NotificationRenderer](notification-renderer):** Render your notifications on multiple platforms by specifying notification types.
30
+ And then execute:
30
31
 
31
- **[NotificationPusher](notification-pusher):** Push your notifications to various services. Including [Email](notification-pusher-actionmailer), [ActionCable](notification-pusher-actioncable), [OneSignal](notification-pusher-onesignal).
32
+ $ bundle
32
33
 
33
- **[NotificationSettings](notification-settings):** Integrates with your authentication solution to craft a personalized user notification platform.
34
+ Or install it yourself as:
34
35
 
35
- You may just add the components you actually need, or instead use this gem to bundle everything for a complete notification solution.
36
+ $ gem install notification-pusher-actionmailer
37
+
38
+ If you always want to be up to date fetch the latest from GitHub in your `Gemfile`:
39
+
40
+ ```ruby
41
+ gem 'notification-pusher-actionmailer', github: 'jonhue/notifications-rails'
42
+ ```
36
43
 
37
44
  ---
38
45
 
39
- ## Installation
46
+ ## Usage
40
47
 
41
- NotificationsRails works with Rails 5 onwards. You can add it to your `Gemfile` with:
48
+ Define this pusher in your `NotificationPusher` configuration:
42
49
 
43
50
  ```ruby
44
- gem 'notifications-rails'
51
+ NotificationPusher.configure do |config|
52
+ config.define_pusher :ActionMailer
53
+ end
45
54
  ```
46
55
 
47
- And then execute:
48
-
49
- $ bundle
56
+ You can pass a `from` parameter, which will override the default email address specified in `ApplicationMailer`:
50
57
 
51
- Or install it yourself as:
58
+ ```ruby
59
+ NotificationPusher.configure do |config|
60
+ config.define_pusher :ActionMailer, from: 'my@email.com'
61
+ end
62
+ ```
52
63
 
53
- $ gem install notifications-rails
64
+ Then add a renderer called `_actionmailer.html.erb` to every notification type you aim to support. Learn more [here](https://github.com/jonhue/notifications-rails/tree/master/notification-renderer).
54
65
 
55
- If you always want to be up to date fetch the latest from GitHub in your `Gemfile`:
66
+ Now you can push your notifications:
56
67
 
57
68
  ```ruby
58
- gem 'notifications-rails', github: 'jonhue/notifications-rails'
69
+ notification = Notification.create target: User.first, object: Recipe.first
70
+ notification.push :ActionMailer, to: 'another@email.com'
59
71
  ```
60
72
 
73
+ **Note:** If the email address, you want to push to, is the same as `notification.target.email` you can omit the `to` parameter.
74
+
75
+ It is also possible to override the email address sending this notification, by passing a `from` parameter.
76
+
77
+ ### Options
78
+
79
+ **`to`** Receiver email address. Takes a string.
80
+
81
+ **`from`** Sender email address. Takes a string. Defaults to email specified in `ApplicationMailer`.
82
+
83
+ **`renderer`** Specify a renderer. Takes a string. Defaults to `'actionmailer'`.
84
+
61
85
  ---
62
86
 
63
87
  ## To Do
64
88
 
65
- [Here](https://github.com/jonhue/notifications-rails/projects) is the full list of current projects.
89
+ [Here](https://github.com/jonhue/notifications-rails/projects/6) is the full list of current projects.
66
90
 
67
91
  To propose your ideas, initiate the discussion by adding a [new issue](https://github.com/jonhue/notifications-rails/issues/new).
68
92
 
@@ -70,9 +94,9 @@ To propose your ideas, initiate the discussion by adding a [new issue](https://g
70
94
 
71
95
  ## Contributing
72
96
 
73
- We hope that you will consider contributing to NotificationsRails. Please read this short overview for some information about how to get started:
97
+ We hope that you will consider contributing to NotificationPusher for ActionMailer. Please read this short overview for some information about how to get started:
74
98
 
75
- [Learn more about contributing to this repository](CONTRIBUTING.md), [Code of Conduct](CODE_OF_CONDUCT.md)
99
+ [Learn more about contributing to this repository](https://github.com/jonhue/notifications-rails/blob/master/CONTRIBUTING.md), [Code of Conduct](https://github.com/jonhue/notifications-rails/blob/master/CODE_OF_CONDUCT.md)
76
100
 
77
101
  ### Contributors
78
102
 
@@ -82,7 +106,7 @@ https://github.com/jonhue/notifications-rails/graphs/contributors
82
106
 
83
107
  ### Semantic Versioning
84
108
 
85
- NotificationsRails follows Semantic Versioning 2.0 as defined at http://semver.org.
109
+ NotificationPusher for ActionMailer follows Semantic Versioning 2.0 as defined at http://semver.org.
86
110
 
87
111
  ## License
88
112
 
@@ -0,0 +1,8 @@
1
+ require 'railties'
2
+
3
+ module NotificationPusher
4
+ module ActionMailer
5
+ class Engine < ::Rails::Engine
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,11 @@
1
+ module NotificationPusher
2
+ class ActionMailer
3
+
4
+ require 'action_mailer/engine'
5
+
6
+ def initialize notification, options = {}
7
+ NotificationPusherActionmailerMailer.push notification, options
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ module NotificationPusher
2
+
3
+ require 'notification_pusher/action_mailer'
4
+
5
+ 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.beta6
4
+ version: 1.0.0.beta7
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.beta6
47
+ version: 1.0.0.beta7
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.beta6
54
+ version: 1.0.0.beta7
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.beta6
61
+ version: 1.0.0.beta7
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.beta6
68
+ version: 1.0.0.beta7
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,8 +100,12 @@ executables: []
100
100
  extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
103
+ - CHANGELOG.md
103
104
  - LICENSE
104
105
  - README.md
106
+ - lib/notification_pusher.rb
107
+ - lib/notification_pusher/action_mailer.rb
108
+ - lib/notification_pusher/action_mailer/engine.rb
105
109
  homepage: https://github.com/jonhue/notifications-rails/tree/master/notification-pusher/notification-pusher-actionmailer
106
110
  licenses:
107
111
  - MIT
@@ -109,7 +113,7 @@ metadata: {}
109
113
  post_install_message:
110
114
  rdoc_options: []
111
115
  require_paths:
112
- - lib/notification_pusher.rb
116
+ - lib
113
117
  required_ruby_version: !ruby/object:Gem::Requirement
114
118
  requirements:
115
119
  - - ">="