notification-pusher 1.0.0.beta10 → 1.0.0.beta11
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3389befe3b78fc16d567501785c291d3df968498f45703a109650dc4f6fcaa24
|
4
|
+
data.tar.gz: 3887f3617fa6da2c532c62f86df358be8d1872a231d8f0cbcf21d829da69cbc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f6ebeb06eb9c23c24ea539ea1def734569f2308e62a5470a7a1c01a86784d006d4363e9d4f5ffb96fcebbb29564f2271ad81e295fe2d62d4f8ea241de78c4cc
|
7
|
+
data.tar.gz: 73df929584ab73f5192c3203de279828be712e01282501f827784dc894b4ac9110cd34baec97f6f4e8a91f7a2b57fff26b43728ecc0aea017e67bc1f9bbf12a4
|
@@ -11,8 +11,14 @@ module NotificationPusher
|
|
11
11
|
|
12
12
|
class Configuration
|
13
13
|
|
14
|
+
attr_accessor :pushers
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
@pushers = []
|
18
|
+
end
|
19
|
+
|
14
20
|
def define_pusher name, options = {}
|
15
|
-
::NotificationPusher::Pusher.new
|
21
|
+
self.pushers << ::NotificationPusher::Pusher.new(name, options)
|
16
22
|
end
|
17
23
|
|
18
24
|
end
|
@@ -13,15 +13,15 @@ module NotificationPusher
|
|
13
13
|
|
14
14
|
def push notification, options = {}
|
15
15
|
default_options = self.options
|
16
|
-
options = default_options.merge!
|
17
|
-
if defined?(NotificationPusher.const_get(
|
16
|
+
options = options.nil? ? default_options : default_options.merge!(options)
|
17
|
+
if defined?(NotificationPusher.const_get(self.name))
|
18
18
|
instance = NotificationPusher.const_get(self.name).new notification, options
|
19
19
|
self.instances << instance
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
23
|
def self.find_by_name name
|
24
|
-
|
24
|
+
NotificationPusher.configuration.pushers.select { |pusher| pusher.name == name }
|
25
25
|
end
|
26
26
|
|
27
27
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notification-pusher
|
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
|
@@ -10,20 +10,34 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2017-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5.0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: notification-handler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - '='
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.0.0.
|
33
|
+
version: 1.0.0.beta11
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - '='
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.0.0.
|
40
|
+
version: 1.0.0.beta11
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|