notifications 0.5.0 → 0.6.0
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 +4 -4
- data/README.md +11 -3
- data/db/migrate/20160328045436_create_notifications.rb +1 -1
- data/lib/notifications/model.rb +6 -15
- data/lib/notifications/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cba82d59d143b6411bffc9075d57c62da33109df3bb44258b6748c4c25fe85b4
|
4
|
+
data.tar.gz: 923fada5c2102c30d43f637ccd450401d6b51eae40be6a1a09ced2e70c2738d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 916a13099e241528a0094eb57f674854edcc6dd25b140c4c1aebadbfa5dd31fd1a5a53b977018edad204b1376151c03aba6b66866fcdf9ef92235ed34a632de3
|
7
|
+
data.tar.gz: e727c786778533d599303e61ad23583d8e7c2ea9255465b48ea54d664a81a9d4997eac77542c9cb1d7b9cb9d3b4239e0bbb6f7fb4a9e026cf2185a75115a0987
|
data/README.md
CHANGED
@@ -11,8 +11,10 @@ Mountable notifications for any Rails applications.
|
|
11
11
|
## Installation
|
12
12
|
|
13
13
|
```ruby
|
14
|
-
# Gemfile
|
15
|
-
gem 'notifications'
|
14
|
+
# Gemfile Rails ~> 5
|
15
|
+
gem 'notifications', '~> 0.6.0'
|
16
|
+
# Gemfile for Rails ~> 4.2
|
17
|
+
gem 'notifications', '~> 0.5.0'
|
16
18
|
```
|
17
19
|
|
18
20
|
And then run `bundle install`.
|
@@ -101,7 +103,13 @@ It is recommended that you use [second_level_cache](https://github.com/hooopo/se
|
|
101
103
|
|
102
104
|
## Contributing
|
103
105
|
|
104
|
-
|
106
|
+
Testing for multiple Rails versions:
|
107
|
+
|
108
|
+
```bash
|
109
|
+
make test_51
|
110
|
+
# or test all
|
111
|
+
make test
|
112
|
+
```
|
105
113
|
|
106
114
|
## Site Used
|
107
115
|
|
data/lib/notifications/model.rb
CHANGED
@@ -5,21 +5,12 @@ module Notifications
|
|
5
5
|
DEFAULT_AVATAR = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPAAAADwCAMAAAAJixmgAAAAFVBMVEWkpKSnp6eqqqq3t7fS0tLV1dXZ2dmshcKEAAAAtklEQVR4Ae3XsRGAAAjAQFRk/5HtqaTz5H+DlInvAQAAAAAAAAAAAAAAAAAAAACymiveO6o7BQsWLFiwYMGCBS8PFixYsGDBggULFixYsGDBggULFixYsGDBggULFixYsGDBc4IFCxYsWLBgwYIFC14ZfOeAPRQ8IliwYMGCBQsWLFiwYMGCBQsWLFiwYMGCBQsWLFiwYMGCBQsWLFiwYMGCBQv+JQAAAAAAAAAAAAAAAAAAAOAB4KJfdHmj+kwAAAAASUVORK5CYII='
|
6
6
|
|
7
7
|
included do
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
belongs_to :third_target, polymorphic: true
|
15
|
-
else
|
16
|
-
belongs_to :actor, class_name: Notifications.config.user_class, optional: true
|
17
|
-
belongs_to :user, class_name: Notifications.config.user_class
|
18
|
-
|
19
|
-
belongs_to :target, polymorphic: true, optional: true
|
20
|
-
belongs_to :second_target, polymorphic: true, optional: true
|
21
|
-
belongs_to :third_target, polymorphic: true, optional: true
|
22
|
-
end
|
8
|
+
belongs_to :actor, class_name: Notifications.config.user_class, optional: true
|
9
|
+
belongs_to :user, class_name: Notifications.config.user_class
|
10
|
+
|
11
|
+
belongs_to :target, polymorphic: true, optional: true
|
12
|
+
belongs_to :second_target, polymorphic: true, optional: true
|
13
|
+
belongs_to :third_target, polymorphic: true, optional: true
|
23
14
|
|
24
15
|
scope :unread, -> { where(read_at: nil) }
|
25
16
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifications
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Lee
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '5'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: kaminari
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|