notification_hub 0.1.1

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.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +105 -0
  6. data/Rakefile +2 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +8 -0
  9. data/lib/generators/active_record/notification_hub_generator.rb +48 -0
  10. data/lib/generators/active_record/templates/migrations/devices.rb +15 -0
  11. data/lib/generators/active_record/templates/migrations/subscription_devices.rb +10 -0
  12. data/lib/generators/active_record/templates/migrations/subscriptions.rb +11 -0
  13. data/lib/generators/active_record/templates/models/device.rb +15 -0
  14. data/lib/generators/active_record/templates/models/subscription.rb +16 -0
  15. data/lib/generators/active_record/templates/models/subscription_device.rb +8 -0
  16. data/lib/generators/notification_hub/job_generator.rb +18 -0
  17. data/lib/generators/notification_hub/notification_hub_generator.rb +25 -0
  18. data/lib/generators/notification_hub/templates/initializer.rb +56 -0
  19. data/lib/generators/notification_hub/templates/jobs/active_job.rb +7 -0
  20. data/lib/generators/notification_hub/templates/jobs/sidekiq_job.rb +8 -0
  21. data/lib/generators/notification_hub/templates/notification_hub/browser_push_notification/estimate/accepted.json.jbuilder +8 -0
  22. data/lib/generators/notification_hub/templates/notification_hub/browser_push_notification/estimate/expired.json.jbuilder +9 -0
  23. data/lib/generators/notification_hub/templates/notification_hub/browser_push_notification/estimate/viewed.json.jbuilder +8 -0
  24. data/lib/generators/notification_hub/templates/notification_hub/browser_push_notification/invoice/overdue.json.jbuilder +8 -0
  25. data/lib/generators/notification_hub/templates/notification_hub/browser_push_notification/invoice/payment_received.json.jbuilder +8 -0
  26. data/lib/generators/notification_hub/templates/notification_hub/browser_push_notification/invoice/unrealized_payment_received.json.jbuilder +9 -0
  27. data/lib/generators/notification_hub/templates/notification_hub/browser_push_notification/invoice/viewed.json.jbuilder +10 -0
  28. data/lib/generators/notification_hub/templates/notification_hub/email/estimate/accepted.html.erb +10 -0
  29. data/lib/generators/notification_hub/templates/notification_hub/email/estimate/accepted.text.erb +9 -0
  30. data/lib/generators/notification_hub/templates/notification_hub/email/estimate/expired.html.erb +9 -0
  31. data/lib/generators/notification_hub/templates/notification_hub/email/estimate/expired.text.erb +9 -0
  32. data/lib/generators/notification_hub/templates/notification_hub/email/estimate/viewed.html.erb +9 -0
  33. data/lib/generators/notification_hub/templates/notification_hub/email/estimate/viewed.text.erb +9 -0
  34. data/lib/generators/notification_hub/templates/notification_hub/email/invoice/overdue.html.erb +9 -0
  35. data/lib/generators/notification_hub/templates/notification_hub/email/invoice/overdue.text.erb +9 -0
  36. data/lib/generators/notification_hub/templates/notification_hub/email/invoice/payment_received.html.erb +11 -0
  37. data/lib/generators/notification_hub/templates/notification_hub/email/invoice/payment_received.text.erb +13 -0
  38. data/lib/generators/notification_hub/templates/notification_hub/email/invoice/unrealized_payment_received.html.erb +10 -0
  39. data/lib/generators/notification_hub/templates/notification_hub/email/invoice/unrealized_payment_received.text.erb +11 -0
  40. data/lib/generators/notification_hub/templates/notification_hub/email/invoice/viewed.html.erb +9 -0
  41. data/lib/generators/notification_hub/templates/notification_hub/email/invoice/viewed.text.erb +9 -0
  42. data/lib/generators/notification_hub/templates/notification_hub/webhook/estimate/accepted.json.jbuilder +6 -0
  43. data/lib/generators/notification_hub/templates/notification_hub/webhook/estimate/expired.json.jbuilder +6 -0
  44. data/lib/generators/notification_hub/templates/notification_hub/webhook/estimate/viewed.json.jbuilder +6 -0
  45. data/lib/generators/notification_hub/templates/notification_hub/webhook/invoice/overdue.json.jbuilder +6 -0
  46. data/lib/generators/notification_hub/templates/notification_hub/webhook/invoice/payment_received.json.jbuilder +7 -0
  47. data/lib/generators/notification_hub/templates/notification_hub/webhook/invoice/unrealized_payment_received.json.jbuilder +7 -0
  48. data/lib/generators/notification_hub/templates/notification_hub/webhook/invoice/viewed.json.jbuilder +6 -0
  49. data/lib/notification_hub/channels/browser_push_notification/base.rb +19 -0
  50. data/lib/notification_hub/channels/browser_push_notification/fcm.rb +42 -0
  51. data/lib/notification_hub/channels/browser_push_notification.rb +16 -0
  52. data/lib/notification_hub/channels/email/action_mailer.rb +31 -0
  53. data/lib/notification_hub/channels/email/base.rb +17 -0
  54. data/lib/notification_hub/channels/email.rb +17 -0
  55. data/lib/notification_hub/channels/mobile_push_notification/base.rb +18 -0
  56. data/lib/notification_hub/channels/mobile_push_notification/fcm.rb +42 -0
  57. data/lib/notification_hub/channels/mobile_push_notification.rb +16 -0
  58. data/lib/notification_hub/channels/sms/aws.rb +32 -0
  59. data/lib/notification_hub/channels/sms/base.rb +18 -0
  60. data/lib/notification_hub/channels/sms.rb +16 -0
  61. data/lib/notification_hub/channels/webhook/base.rb +19 -0
  62. data/lib/notification_hub/channels/webhook/httparty.rb +39 -0
  63. data/lib/notification_hub/channels/webhook.rb +16 -0
  64. data/lib/notification_hub/device_manager.rb +19 -0
  65. data/lib/notification_hub/subscription_manager.rb +55 -0
  66. data/lib/notification_hub/version.rb +3 -0
  67. data/lib/notification_hub.rb +88 -0
  68. data/notification_hub.gemspec +26 -0
  69. metadata +167 -0
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'notification_hub/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "notification_hub"
8
+ spec.version = NotificationHub::VERSION
9
+ spec.authors = ["Viduranga Wijesooriya"]
10
+ spec.email = ["vpowerrc@gmail.com"]
11
+
12
+ spec.summary = %q{Write a short summary, because Rubygems requires one.}
13
+ spec.description = %q{Write a longer description or delete this line.}
14
+ spec.homepage = "http://mygemserver.com"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.12"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_dependency "httparty", "~> 0.13"
25
+ spec.add_dependency "aws-sdk", "~> 2"
26
+ end
metadata ADDED
@@ -0,0 +1,167 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: notification_hub
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Viduranga Wijesooriya
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-05-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.12'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.12'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: httparty
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.13'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.13'
55
+ - !ruby/object:Gem::Dependency
56
+ name: aws-sdk
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '2'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2'
69
+ description: Write a longer description or delete this line.
70
+ email:
71
+ - vpowerrc@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - Gemfile
78
+ - LICENSE.txt
79
+ - README.md
80
+ - Rakefile
81
+ - bin/console
82
+ - bin/setup
83
+ - lib/generators/active_record/notification_hub_generator.rb
84
+ - lib/generators/active_record/templates/migrations/devices.rb
85
+ - lib/generators/active_record/templates/migrations/subscription_devices.rb
86
+ - lib/generators/active_record/templates/migrations/subscriptions.rb
87
+ - lib/generators/active_record/templates/models/device.rb
88
+ - lib/generators/active_record/templates/models/subscription.rb
89
+ - lib/generators/active_record/templates/models/subscription_device.rb
90
+ - lib/generators/notification_hub/job_generator.rb
91
+ - lib/generators/notification_hub/notification_hub_generator.rb
92
+ - lib/generators/notification_hub/templates/initializer.rb
93
+ - lib/generators/notification_hub/templates/jobs/active_job.rb
94
+ - lib/generators/notification_hub/templates/jobs/sidekiq_job.rb
95
+ - lib/generators/notification_hub/templates/notification_hub/browser_push_notification/estimate/accepted.json.jbuilder
96
+ - lib/generators/notification_hub/templates/notification_hub/browser_push_notification/estimate/expired.json.jbuilder
97
+ - lib/generators/notification_hub/templates/notification_hub/browser_push_notification/estimate/viewed.json.jbuilder
98
+ - lib/generators/notification_hub/templates/notification_hub/browser_push_notification/invoice/overdue.json.jbuilder
99
+ - lib/generators/notification_hub/templates/notification_hub/browser_push_notification/invoice/payment_received.json.jbuilder
100
+ - lib/generators/notification_hub/templates/notification_hub/browser_push_notification/invoice/unrealized_payment_received.json.jbuilder
101
+ - lib/generators/notification_hub/templates/notification_hub/browser_push_notification/invoice/viewed.json.jbuilder
102
+ - lib/generators/notification_hub/templates/notification_hub/email/estimate/accepted.html.erb
103
+ - lib/generators/notification_hub/templates/notification_hub/email/estimate/accepted.text.erb
104
+ - lib/generators/notification_hub/templates/notification_hub/email/estimate/expired.html.erb
105
+ - lib/generators/notification_hub/templates/notification_hub/email/estimate/expired.text.erb
106
+ - lib/generators/notification_hub/templates/notification_hub/email/estimate/viewed.html.erb
107
+ - lib/generators/notification_hub/templates/notification_hub/email/estimate/viewed.text.erb
108
+ - lib/generators/notification_hub/templates/notification_hub/email/invoice/overdue.html.erb
109
+ - lib/generators/notification_hub/templates/notification_hub/email/invoice/overdue.text.erb
110
+ - lib/generators/notification_hub/templates/notification_hub/email/invoice/payment_received.html.erb
111
+ - lib/generators/notification_hub/templates/notification_hub/email/invoice/payment_received.text.erb
112
+ - lib/generators/notification_hub/templates/notification_hub/email/invoice/unrealized_payment_received.html.erb
113
+ - lib/generators/notification_hub/templates/notification_hub/email/invoice/unrealized_payment_received.text.erb
114
+ - lib/generators/notification_hub/templates/notification_hub/email/invoice/viewed.html.erb
115
+ - lib/generators/notification_hub/templates/notification_hub/email/invoice/viewed.text.erb
116
+ - lib/generators/notification_hub/templates/notification_hub/webhook/estimate/accepted.json.jbuilder
117
+ - lib/generators/notification_hub/templates/notification_hub/webhook/estimate/expired.json.jbuilder
118
+ - lib/generators/notification_hub/templates/notification_hub/webhook/estimate/viewed.json.jbuilder
119
+ - lib/generators/notification_hub/templates/notification_hub/webhook/invoice/overdue.json.jbuilder
120
+ - lib/generators/notification_hub/templates/notification_hub/webhook/invoice/payment_received.json.jbuilder
121
+ - lib/generators/notification_hub/templates/notification_hub/webhook/invoice/unrealized_payment_received.json.jbuilder
122
+ - lib/generators/notification_hub/templates/notification_hub/webhook/invoice/viewed.json.jbuilder
123
+ - lib/notification_hub.rb
124
+ - lib/notification_hub/channels/browser_push_notification.rb
125
+ - lib/notification_hub/channels/browser_push_notification/base.rb
126
+ - lib/notification_hub/channels/browser_push_notification/fcm.rb
127
+ - lib/notification_hub/channels/email.rb
128
+ - lib/notification_hub/channels/email/action_mailer.rb
129
+ - lib/notification_hub/channels/email/base.rb
130
+ - lib/notification_hub/channels/mobile_push_notification.rb
131
+ - lib/notification_hub/channels/mobile_push_notification/base.rb
132
+ - lib/notification_hub/channels/mobile_push_notification/fcm.rb
133
+ - lib/notification_hub/channels/sms.rb
134
+ - lib/notification_hub/channels/sms/aws.rb
135
+ - lib/notification_hub/channels/sms/base.rb
136
+ - lib/notification_hub/channels/webhook.rb
137
+ - lib/notification_hub/channels/webhook/base.rb
138
+ - lib/notification_hub/channels/webhook/httparty.rb
139
+ - lib/notification_hub/device_manager.rb
140
+ - lib/notification_hub/subscription_manager.rb
141
+ - lib/notification_hub/version.rb
142
+ - notification_hub.gemspec
143
+ homepage: http://mygemserver.com
144
+ licenses:
145
+ - MIT
146
+ metadata: {}
147
+ post_install_message:
148
+ rdoc_options: []
149
+ require_paths:
150
+ - lib
151
+ required_ruby_version: !ruby/object:Gem::Requirement
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ version: '0'
156
+ required_rubygems_version: !ruby/object:Gem::Requirement
157
+ requirements:
158
+ - - ">="
159
+ - !ruby/object:Gem::Version
160
+ version: '0'
161
+ requirements: []
162
+ rubyforge_project:
163
+ rubygems_version: 2.5.1
164
+ signing_key:
165
+ specification_version: 4
166
+ summary: Write a short summary, because Rubygems requires one.
167
+ test_files: []