notification-handler 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 +4 -4
- data/app/models/notification_handler/notification.rb +6 -0
- data/lib/generators/templates/install/notification_model.rb +1 -5
- data/lib/notification-handler.rb +2 -0
- data/lib/notification_handler/configuration.rb +3 -1
- data/lib/notification_handler/engine.rb +7 -0
- data/lib/notification_handler/group.rb +1 -1
- data/lib/notification_handler/notification_library.rb +2 -0
- data/lib/notification_handler/notification_scopes.rb +2 -0
- data/lib/notification_handler/object.rb +3 -3
- data/lib/notification_handler/railtie.rb +1 -0
- data/lib/notification_handler/target.rb +2 -2
- metadata +17 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e19e115e549d5f4719e0d3cccabb810d81f0ee26cc819a4aaca95fba05c51dc6
|
4
|
+
data.tar.gz: a9c2163c46eac8da67283de29903d9f697270570bc34872bac5596893310826d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1f9abe475b408800b7da6bee0268b11266048b6db5ae4582f6cef001a255abe0daa62500a32ad8957a5a87f80fdccb55f40fc3386c61826bf9bbad53e5f9107
|
7
|
+
data.tar.gz: 257a40edbf8e496b28946f26b04118cd23ebcb00370a9c565174beafe746f9187b9329eec1be8a3437282b59cb66b03bc9db4db1849f2f47cd5c03fc998b7dc3
|
data/lib/notification-handler.rb
CHANGED
@@ -11,14 +11,16 @@ module NotificationHandler
|
|
11
11
|
|
12
12
|
class Configuration
|
13
13
|
|
14
|
+
attr_accessor :groups
|
14
15
|
attr_accessor :cache
|
15
16
|
|
16
17
|
def initialize
|
18
|
+
@groups = []
|
17
19
|
@cache = false
|
18
20
|
end
|
19
21
|
|
20
22
|
def define_group name, target_scope
|
21
|
-
::NotificationHandler::Group.new
|
23
|
+
self.groups << ::NotificationHandler::Group.new(name.to_sym, target_scope)
|
22
24
|
end
|
23
25
|
|
24
26
|
end
|
@@ -10,7 +10,7 @@ module NotificationHandler
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.find_by_name name
|
13
|
-
|
13
|
+
NotificationHandler.configuration.groups.select { |group| group.name == name.to_sym }
|
14
14
|
end
|
15
15
|
|
16
16
|
end
|
@@ -9,9 +9,9 @@ module NotificationHandler
|
|
9
9
|
def notification_object
|
10
10
|
has_many :belonging_notifications, as: :object, class_name: 'Notification', dependent: :destroy
|
11
11
|
include NotificationHandler::Object::InstanceMethods
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
|
13
|
+
include NotificationSettings::Object if defined?(NotificationSettings)
|
14
|
+
include NotificationSettings::Subscribable if defined?(NotificationSettings)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -10,8 +10,8 @@ module NotificationHandler
|
|
10
10
|
has_many :notifications, as: :target, dependent: :destroy
|
11
11
|
include NotificationHandler::Target::InstanceMethods
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
include NotificationSettings::Target if defined?(NotificationSettings)
|
14
|
+
include NotificationSettings::Subscriber if defined?(NotificationSettings)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notification-handler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Hübotter
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '5.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: activesupport
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rspec
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,6 +89,7 @@ files:
|
|
75
89
|
- CHANGELOG.md
|
76
90
|
- LICENSE
|
77
91
|
- README.md
|
92
|
+
- app/models/notification_handler/notification.rb
|
78
93
|
- lib/generators/notification_handler/install_generator.rb
|
79
94
|
- lib/generators/templates/install/README.md
|
80
95
|
- lib/generators/templates/install/initializer.rb
|
@@ -82,6 +97,7 @@ files:
|
|
82
97
|
- lib/generators/templates/install/notifications_migration.rb.erb
|
83
98
|
- lib/notification-handler.rb
|
84
99
|
- lib/notification_handler/configuration.rb
|
100
|
+
- lib/notification_handler/engine.rb
|
85
101
|
- lib/notification_handler/group.rb
|
86
102
|
- lib/notification_handler/notification_library.rb
|
87
103
|
- lib/notification_handler/notification_scopes.rb
|