notification_hub 0.1.6 → 0.1.7
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 708615fe63cf8fd32c073bfa9d01ba4bfd541d4d
|
4
|
+
data.tar.gz: debf3903c4c72d983900b0da0dc6d10503d6e8d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6617c56ac4edf20a9235a91241c41cc016e91aee25e0aff271920344249cbea3f446cd832a885a505fae2c6d48e56c002478af6a52b0c4eb53c523e33de3fa1
|
7
|
+
data.tar.gz: 384fe49ca00b06de86b1dfbee51091525dee71e8fc3afd29aaf990045f8d21a98a03fb9bf3ed629ff061df35d7f5c886161421977b8a8b6e7a61395104299b58
|
@@ -5,8 +5,8 @@ class NotificationHubJob < ActiveJob::Base
|
|
5
5
|
channel_code=nil, gateway_code=nil)
|
6
6
|
if method == "deliver"
|
7
7
|
NotificationHub.send_message(association_model_id, event_code, data)
|
8
|
-
elsif method == "
|
9
|
-
NotificationHub.
|
8
|
+
elsif method == "deliver_global"
|
9
|
+
NotificationHub.send_global_message(event_code, data, device_details,
|
10
10
|
channel_code, gateway_code)
|
11
11
|
end
|
12
12
|
end
|
@@ -6,8 +6,8 @@ class NotificationHubJob
|
|
6
6
|
channel_code=nil, gateway_code=nil)
|
7
7
|
if method == "deliver"
|
8
8
|
NotificationHub.send_message(association_model_id, event_code, data)
|
9
|
-
elsif method == "
|
10
|
-
NotificationHub.
|
9
|
+
elsif method == "deliver_global"
|
10
|
+
NotificationHub.send_global_message(event_code, data, device_details,
|
11
11
|
channel_code, gateway_code)
|
12
12
|
end
|
13
13
|
end
|
data/lib/notification_hub.rb
CHANGED
@@ -41,15 +41,15 @@ module NotificationHub
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
def
|
45
|
-
|
44
|
+
def deliver_global_now(event_code, data, device_details, channel_code, gateway_code=nil)
|
45
|
+
send_global_message(event_code, data, device_details, channel_code, gateway_code)
|
46
46
|
end
|
47
47
|
|
48
|
-
def
|
48
|
+
def deliver_global(event_code, data, device_details, channel_code, gateway_code=nil)
|
49
49
|
if NotificationHubJob.respond_to?("perform_later".to_sym)
|
50
|
-
NotificationHubJob.perform_later("
|
50
|
+
NotificationHubJob.perform_later("deliver_global", nil, event_code, data, device_details, channel_code, gateway_code)
|
51
51
|
elsif NotificationHubJob.respond_to?("perform_async".to_sym)
|
52
|
-
NotificationHubJob.perform_async("
|
52
|
+
NotificationHubJob.perform_async("deliver_global", nil, event_code, data, device_details, channel_code, gateway_code)
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -93,7 +93,7 @@ module NotificationHub
|
|
93
93
|
end
|
94
94
|
end
|
95
95
|
|
96
|
-
def
|
96
|
+
def send_global_message(event_code, data_wrapper, device_details, channel_code, gateway_code=nil)
|
97
97
|
|
98
98
|
# Fetch data from the database if record id is passed.
|
99
99
|
data = {}
|
data/notification_hub.gemspec
CHANGED
@@ -9,8 +9,14 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.authors = ["Viduranga Wijesooriya"]
|
10
10
|
spec.email = ["vpowerrc@gmail.com"]
|
11
11
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
12
|
+
spec.summary = "This gem can be used to centralize the notification dispatching of an application."
|
13
|
+
spec.description = "Currently, this gem supports 5 notification channels.
|
14
|
+
|
15
|
+
Email
|
16
|
+
Webhook
|
17
|
+
SMS
|
18
|
+
Mobile Push Notifications
|
19
|
+
Browser Push Notifications"
|
14
20
|
spec.homepage = "http://mygemserver.com"
|
15
21
|
spec.license = "MIT"
|
16
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notification_hub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Viduranga Wijesooriya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,7 +66,14 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2'
|
69
|
-
description:
|
69
|
+
description: |-
|
70
|
+
Currently, this gem supports 5 notification channels.
|
71
|
+
|
72
|
+
Email
|
73
|
+
Webhook
|
74
|
+
SMS
|
75
|
+
Mobile Push Notifications
|
76
|
+
Browser Push Notifications
|
70
77
|
email:
|
71
78
|
- vpowerrc@gmail.com
|
72
79
|
executables: []
|
@@ -163,5 +170,5 @@ rubyforge_project:
|
|
163
170
|
rubygems_version: 2.5.1
|
164
171
|
signing_key:
|
165
172
|
specification_version: 4
|
166
|
-
summary:
|
173
|
+
summary: This gem can be used to centralize the notification dispatching of an application.
|
167
174
|
test_files: []
|