notify_user 0.0.29 → 0.0.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +61 -6
- data/app/models/notify_user/houston.rb +4 -1
- data/lib/generators/notify_user/install/templates/initializer.rb +0 -3
- data/lib/notify_user/version.rb +1 -1
- data/lib/notify_user.rb +0 -4
- data/spec/dummy/rails-3.2.17/app/notifications/new_post_notification.rb +6 -2
- data/spec/dummy/rails-3.2.17/config/initializers/secret_token.rb +1 -1
- data/spec/dummy/rails-3.2.17/config/keys/development_push.pem +0 -0
- data/spec/dummy/rails-3.2.17/db/migrate/{20150106040852_create_users.rb → 20141102231350_create_users.rb} +0 -0
- data/spec/dummy/rails-3.2.17/db/migrate/{20150106040854857857604000_create_notify_user_notifications.rb → 20141102231353649649586000_create_notify_user_notifications.rb} +0 -0
- data/spec/dummy/rails-3.2.17/db/migrate/{20150106040854860860323000_create_notify_user_unsubscribes.rb → 20141102231353650650817000_create_notify_user_unsubscribes.rb} +0 -0
- data/spec/dummy/rails-3.2.17/db/migrate/{20150106040854862862248000_create_notify_user_user_hashes.rb → 20141102231353651651843000_create_notify_user_user_hashes.rb} +0 -0
- data/spec/dummy/rails-3.2.17/db/schema.rb +1 -1
- data/spec/dummy/rails-3.2.17/log/test.log +9319 -678
- data/spec/dummy/rails-4.0.4/app/notifications/new_post_notification.rb +6 -2
- data/spec/dummy/rails-4.0.4/config/initializers/secret_token.rb +1 -1
- data/spec/dummy/rails-4.0.4/config/keys/development_push.pem +136 -0
- data/spec/dummy/rails-4.0.4/db/migrate/{20140624075850_create_users.rb → 20141102231412_create_users.rb} +0 -0
- data/spec/dummy/rails-4.0.4/db/migrate/{20140624075852587587217000_create_notify_user_notifications.rb → 20141102231413669669843000_create_notify_user_notifications.rb} +0 -0
- data/spec/dummy/rails-4.0.4/db/migrate/{20140624075852588588765000_create_notify_user_unsubscribes.rb → 20141102231413670670945000_create_notify_user_unsubscribes.rb} +0 -0
- data/spec/dummy/rails-4.0.4/db/migrate/{20140624075852590590153000_create_notify_user_user_hashes.rb → 20141102231413671671735000_create_notify_user_user_hashes.rb} +0 -0
- data/spec/dummy/rails-4.0.4/db/schema.rb +1 -1
- data/spec/dummy/rails-4.0.4/log/test.log +33797 -68931
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{9c7f6978ddc871d6e3ac0032be398a00 → 0e8918f38b9bf3fc19fca4efda1600a1} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/1bded108b40ef13c7e07be129e2cd83c +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/1ebdd9dfe7e88e90bee37951e2da1ea2 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/23fe609acece1521082ad6b8249f96b1 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{5c85b1b5ac27b699c5f800c4e7ec82fb → 40fd179449501b801f80c852d1635a16} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{35025e256922e55fb999ec21dd95fa29 → 4499e16a29d89bdf30304de41c456b43} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{c5b062f65e9c52603e1d81e4a1e66a86 → 49088e1598df49c63ff7d874c97e958f} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{1d6bc1877ba2bbb89f393e10e8303d39 → 7398a3a743326d3576cbb05a000df04b} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{fa138a16887e031c0ae1b4caccfb4c05 → 8eedfb1d9aee665c9f5a77df67b64a81} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/91d718eeae4552c702b8eafd9e8bbe76 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/9e2c26ef339b5827a5c296acb284ab99 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{fa5fa8289c6899f4bf819fb198773fcf → a4f2f445b4f8578493957e4f7b0c76e3} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/af361e697648848dbf0282eba1d15c2f +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{80e5f8379c6b79f7685b1a2124c2c032 → af95fe3d35c9fe417700e8c3625329fe} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/b89f385c2540cb58f04dbfed561d3902 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{0a7202620c53dddd506d0a94e2800d40 → bc1864fd5bfa875243b05071735cbb82} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{0d3ce22aa7fdd86ca27a4cf75e4f57d7 → bede0f0813e15081ea4ee32b640c92c4} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/c1ba4e65491e8bb9fcdc38b22cb64aa9 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/cb741827a22668ecf975f78242076b6b +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{8bab520aad78da438df1c428288cf229 → d3516b65bb025bc333e0f91647a7b119} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/df7c1d81da90fb0287da1e283291dc81 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/f78ea05f6019d54c3572513ebae03556 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/{8b79deab756579c0e92b62a86f6a5fef → f7c2f64864ec1995aee8dcead45d7f24} +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/fbbb5b21a4144f5e3efee9eda4fc38e5 +0 -0
- data/spec/dummy/rails-4.1.0/Gemfile +37 -0
- data/spec/dummy/rails-4.1.0/README.rdoc +28 -0
- data/spec/dummy/rails-4.1.0/Rakefile +6 -0
- data/spec/dummy/rails-4.1.0/app/assets/javascripts/application.js +16 -0
- data/spec/dummy/rails-4.1.0/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/rails-4.1.0/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/rails-4.1.0/app/controllers/notify_user/notifications_controller.rb +9 -0
- data/spec/dummy/rails-4.1.0/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/rails-4.1.0/app/models/user.rb +2 -0
- data/spec/dummy/rails-4.1.0/app/notifications/new_post_notification.rb +15 -0
- data/spec/dummy/rails-4.1.0/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/rails-4.1.0/app/views/notify_user/layouts/action_mailer.html.erb +39 -0
- data/spec/dummy/rails-4.1.0/app/views/notify_user/new_post_notification/action_mailer/notification.html.erb +1 -0
- data/spec/dummy/rails-4.1.0/bin/bundle +3 -0
- data/spec/dummy/rails-4.1.0/bin/rails +4 -0
- data/spec/dummy/rails-4.1.0/bin/rake +4 -0
- data/spec/dummy/rails-4.1.0/config/application.rb +23 -0
- data/spec/dummy/rails-4.1.0/config/boot.rb +4 -0
- data/spec/dummy/rails-4.1.0/config/database.yml +24 -0
- data/spec/dummy/rails-4.1.0/config/environment.rb +5 -0
- data/spec/dummy/rails-4.1.0/config/environments/development.rb +37 -0
- data/spec/dummy/rails-4.1.0/config/environments/production.rb +83 -0
- data/spec/dummy/rails-4.1.0/config/environments/test.rb +39 -0
- data/spec/dummy/rails-4.1.0/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/rails-4.1.0/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/rails-4.1.0/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/rails-4.1.0/config/initializers/inflections.rb +16 -0
- data/spec/dummy/rails-4.1.0/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/rails-4.1.0/config/initializers/notify_user.rb +14 -0
- data/spec/dummy/rails-4.1.0/config/initializers/session_store.rb +3 -0
- data/spec/dummy/rails-4.1.0/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/rails-4.1.0/config/locales/en.yml +23 -0
- data/spec/dummy/rails-4.1.0/config/routes.rb +56 -0
- data/spec/dummy/rails-4.1.0/config/secrets.yml +22 -0
- data/spec/dummy/rails-4.1.0/config.ru +4 -0
- data/spec/dummy/rails-4.1.0/db/migrate/20141102231432_create_users.rb +9 -0
- data/spec/dummy/rails-4.1.0/db/migrate/20141102231434012012157000_create_notify_user_notifications.rb +13 -0
- data/spec/dummy/rails-4.1.0/db/migrate/20141102231434013013078000_create_notify_user_unsubscribes.rb +10 -0
- data/spec/dummy/rails-4.1.0/db/migrate/20141102231434013013847000_create_notify_user_user_hashes.rb +12 -0
- data/spec/dummy/rails-4.1.0/db/schema.rb +53 -0
- data/spec/dummy/rails-4.1.0/db/seeds.rb +7 -0
- data/spec/dummy/rails-4.1.0/log/test.log +11433 -0
- data/spec/dummy/rails-4.1.0/public/404.html +67 -0
- data/spec/dummy/rails-4.1.0/public/422.html +67 -0
- data/spec/dummy/rails-4.1.0/public/500.html +66 -0
- data/spec/dummy/rails-4.1.0/public/favicon.ico +0 -0
- data/spec/dummy/rails-4.1.0/public/robots.txt +5 -0
- data/spec/dummy/rails-4.1.0/test/fixtures/users.yml +7 -0
- data/spec/dummy/rails-4.1.0/test/models/user_test.rb +7 -0
- data/spec/dummy/rails-4.1.0/test/test_helper.rb +13 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/spec/dummy/{rails-4.0.4/tmp/cache/assets/test/sprockets/13195a56ea8581e42f709ea01ea4604f → rails-4.1.0/tmp/cache/assets/test/sprockets/1bded108b40ef13c7e07be129e2cd83c} +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/1ebdd9dfe7e88e90bee37951e2da1ea2 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/23fe609acece1521082ad6b8249f96b1 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/3fa5cc1bc06bfb81887b971eb8d36258 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/796287194e2490ae173cabd0f8e0fce7 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/8d2563dcd2d59f9e020fc2623eda3999 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/8ebc0d0c963e18c7c16e6e7f55fd379f +0 -0
- data/spec/dummy/{rails-4.0.4/tmp/cache/assets/test/sprockets/311d2b645a860b78f79ff156f12092ce → rails-4.1.0/tmp/cache/assets/test/sprockets/91d718eeae4552c702b8eafd9e8bbe76} +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/9e2c26ef339b5827a5c296acb284ab99 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/a098882f88a8b3ca91d2efaada23dba3 +0 -0
- data/spec/dummy/{rails-4.0.4/tmp/cache/assets/test/sprockets/39651f0f2ac78423732234ebf092c632 → rails-4.1.0/tmp/cache/assets/test/sprockets/af361e697648848dbf0282eba1d15c2f} +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/b89f385c2540cb58f04dbfed561d3902 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/c1ba4e65491e8bb9fcdc38b22cb64aa9 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/cb741827a22668ecf975f78242076b6b +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/df7c1d81da90fb0287da1e283291dc81 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/f031b3342a7246183ffa1bb7819f293e +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/f78ea05f6019d54c3572513ebae03556 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/spec/dummy/rails-4.1.0/tmp/cache/assets/test/sprockets/fbbb5b21a4144f5e3efee9eda4fc38e5 +0 -0
- metadata +219 -57
- data/spec/dummy/rails-3.2.17/app/views/notify_user/new_post_notification/mobile_sdk/notification.html.erb +0 -1
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/148f39f7dc2ea6cb194598111dbd4598 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/68752c7ddc300bee3e9823db8befc306 +0 -0
- data/spec/dummy/rails-4.0.4/tmp/cache/assets/test/sprockets/8698d6fed0ef2f173a377160752b959f +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5980a65a991cb1e398fbbcda1ce3f44f446752a0
|
4
|
+
data.tar.gz: 8d5ce270933bb2cf0739d5c15835e5653ace2b52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d409a8e666e78e51ab3f6b5e8c6344c5717a994bf099a82b1fd089a6a912f8c86d520d7ceb86628e83f80cf5b2e8e2153787933adc86c8c3e8c039b592c61278
|
7
|
+
data.tar.gz: 62aa3a3c24b490c11420d5021b6ad749f99d47b156908ff61b3b803ce6d35acf670ba6233014bac2b76071722fc378cdb98bcede15200fd9139d16c2bdea6edd
|
data/README.md
CHANGED
@@ -35,7 +35,7 @@ channel :action_mailer,
|
|
35
35
|
To enable APNS add this line to your app/notification/notification_type.rb
|
36
36
|
```
|
37
37
|
channel :apns,
|
38
|
-
aggregate_per: false
|
38
|
+
aggregate_per: false
|
39
39
|
```
|
40
40
|
|
41
41
|
To run the tests:
|
@@ -50,6 +50,61 @@ gem install wwtd
|
|
50
50
|
wwtd
|
51
51
|
```
|
52
52
|
|
53
|
+
## APNS providers
|
54
|
+
By default, we use [Houston](https://github.com/nomad/houston/) to deliver push notifications via APNS from the server.
|
55
|
+
|
56
|
+
The initialiser for `notify_user` contains the following configuration when delivering via Houston:
|
57
|
+
```
|
58
|
+
# Number of connections Houston will maintain to APNS:
|
59
|
+
config.connection_pool_size = 3
|
60
|
+
|
61
|
+
# Time in seconds Houston will wait for a free connection before failing:
|
62
|
+
config.connection_pool_timeout = 300
|
63
|
+
```
|
64
|
+
|
65
|
+
We maintain persistent connections to APNS via background workers, and these values will allow you to configure how many connections the workers maintain, as well as the amount of time to wait for an idle connection before timing out.
|
66
|
+
|
67
|
+
You also need to provide exported versions of your push notification certificate and key as .pem files, these instructions come from the [APN on Rails](https://github.com/PRX/apn_on_rails) project on how to do that:
|
68
|
+
|
69
|
+
Once you have the certificate from Apple for your application, export your key
|
70
|
+
and the apple certificate as p12 files. Here is a quick walkthrough on how to do this:
|
71
|
+
|
72
|
+
1. Click the disclosure arrow next to your certificate in Keychain Access and select the certificate and the key.
|
73
|
+
2. Right click and choose `Export 2 items…`.
|
74
|
+
3. Choose the p12 format from the drop down and name it `cert.p12`.
|
75
|
+
|
76
|
+
Now covert the p12 file to a pem file:
|
77
|
+
|
78
|
+
$ openssl pkcs12 -in cert.p12 -out apple_push_notification.pem -nodes -clcerts
|
79
|
+
|
80
|
+
`notify_user` will look for your pem files within `"#{Rails.root}/config/keys/`, named `development_push.pem` and `production_push`, for the development and production APNS gateways respectively.
|
81
|
+
|
82
|
+
## The Device model
|
83
|
+
|
84
|
+
When delivering via Houston, we also need access to a model which has access to device tokens that is related to your notification target. i.e. Assuming your notification target is a User:
|
85
|
+
|
86
|
+
```
|
87
|
+
class User < ActiveRecord::Base
|
88
|
+
has_many :devices
|
89
|
+
end
|
90
|
+
|
91
|
+
class Device < ActiveRecord::Base
|
92
|
+
belongs_to :user
|
93
|
+
|
94
|
+
validates :token, presence:true # A string representation of your device's token, the only thing need to delivery push notifications.
|
95
|
+
end
|
96
|
+
```
|
97
|
+
|
98
|
+
A gem that provides such a model is [arcade](https://github.com/Papercloud/arcade), a mountable Rails engine that lets you flag a model (e.g. `User`) as a device owner and provides a number of routes to allow device registration.
|
99
|
+
|
100
|
+
By default, we assume the relation is named `:devices`, but this can be passed through when enabling APNS for a notification if you want to use something else:
|
101
|
+
|
102
|
+
```
|
103
|
+
channel :apns,
|
104
|
+
aggregate_per: false,
|
105
|
+
device_method: :some_other_method
|
106
|
+
```
|
107
|
+
|
53
108
|
##Web interface
|
54
109
|
Display a list of notifications for a logged in user
|
55
110
|
```
|
@@ -69,7 +124,7 @@ config.action_mailer.default_url_options = { :host => "http://example.com" }
|
|
69
124
|
```
|
70
125
|
|
71
126
|
##Subscriptions
|
72
|
-
Unsubscribing from a notification type, first add it to the notify_user.rb initilizer
|
127
|
+
Unsubscribing from a notification type, first add it to the notify_user.rb initilizer
|
73
128
|
```
|
74
129
|
# Override the default notification type
|
75
130
|
config.unsubscribable_notifications = ['NewPostNotification','NewSale']
|
@@ -90,19 +145,19 @@ Unsubscribe link helper - add this to your views/notify_user/layouts/action_mail
|
|
90
145
|
##Upgrading to JSON params data type
|
91
146
|
Run json_update generator which generates the migrations to change the params datatype to json as well as convert the current data to json
|
92
147
|
```
|
93
|
-
rails generate notify_user:json_update
|
148
|
+
rails generate notify_user:json_update
|
94
149
|
rake db:migrate
|
95
150
|
```
|
96
151
|
|
97
152
|
##Changes
|
98
153
|
Notification description and aggregates has changed syntax slighly from
|
99
154
|
```
|
100
|
-
@@description = "please override this type description"
|
155
|
+
@@description = "please override this type description"
|
101
156
|
@@aggregate_per = 10.minutes
|
102
157
|
```
|
103
|
-
to
|
158
|
+
to
|
104
159
|
```
|
105
|
-
self.description = "please override this type description"
|
160
|
+
self.description = "please override this type description"
|
106
161
|
self.aggregate_per = 10.minutes
|
107
162
|
```
|
108
163
|
|
@@ -36,8 +36,11 @@ module NotifyUser
|
|
36
36
|
def setup_options
|
37
37
|
space_allowance = PAYLOAD_LIMIT - used_space
|
38
38
|
|
39
|
+
mobile_message = @notification.mobile_message(space_allowance)
|
40
|
+
mobile_message.gsub!('\n', "\n")
|
41
|
+
|
39
42
|
push_options = {
|
40
|
-
alert:
|
43
|
+
alert: mobile_message,
|
41
44
|
badge: @notification.count_for_target,
|
42
45
|
category: @notification.params[:category] || @notification.type,
|
43
46
|
custom_data: @notification.params,
|
data/lib/notify_user/version.rb
CHANGED
data/lib/notify_user.rb
CHANGED
@@ -28,10 +28,6 @@ module NotifyUser
|
|
28
28
|
mattr_accessor :connection_pool_timeout
|
29
29
|
@@connection_pool_timeout = nil
|
30
30
|
|
31
|
-
# Number of times Houston can fail to send via APNS:
|
32
|
-
mattr_accessor :failure_tolerance
|
33
|
-
@@failure_tolerance = nil
|
34
|
-
|
35
31
|
# Used to set up NotifyUser from the initializer.
|
36
32
|
def self.setup
|
37
33
|
yield self
|
@@ -4,8 +4,12 @@ class NewPostNotification < NotifyUser::BaseNotification
|
|
4
4
|
subject: "Rails3217: You have a new Newpostnotification notification.",
|
5
5
|
aggregate: {
|
6
6
|
subject: "Rails3217: You have new Newpostnotification notifications."
|
7
|
-
}
|
7
|
+
}
|
8
8
|
|
9
|
-
self.description = "please override this type description"
|
9
|
+
self.description = "please override this type description"
|
10
10
|
self.aggregate_per = 10.minutes
|
11
|
+
|
12
|
+
def message
|
13
|
+
"New Post Notification happened with #{params.as_json}"
|
14
|
+
end
|
11
15
|
end
|
@@ -4,4 +4,4 @@
|
|
4
4
|
# If you change this key, all old signed cookies will become invalid!
|
5
5
|
# Make sure the secret is at least 30 characters and all random,
|
6
6
|
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
Rails3217::Application.config.secret_token = '
|
7
|
+
Rails3217::Application.config.secret_token = 'e441b89f2f6bd8a3c835b54c996970a8de238ccb26501de6ee386f8d57de3f5fd59d2b587aecf4fe5351f468cdd78973a55910b443480692115383f855780d96'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -11,7 +11,7 @@
|
|
11
11
|
#
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
13
13
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
14
|
+
ActiveRecord::Schema.define(:version => 20141102231353651651843000) do
|
15
15
|
|
16
16
|
create_table "notify_user_notifications", :force => true do |t|
|
17
17
|
t.string "type"
|