activity_notification 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +7 -0
  2. data/.coveralls.yml +1 -0
  3. data/.gitignore +56 -0
  4. data/.rspec +3 -0
  5. data/.travis.yml +28 -0
  6. data/Gemfile +8 -0
  7. data/Gemfile.lock +174 -0
  8. data/MIT-LICENSE +20 -0
  9. data/README.md +437 -0
  10. data/Rakefile +19 -0
  11. data/activity_notification.gemspec +33 -0
  12. data/app/controllers/activity_notification/notifications_controller.rb +119 -0
  13. data/app/controllers/activity_notification/notifications_with_devise_controller.rb +29 -0
  14. data/app/mailers/activity_notification/mailer.rb +13 -0
  15. data/app/views/activity_notification/mailer/default/default.html.erb +7 -0
  16. data/app/views/activity_notification/notifications/default/_default.html.erb +36 -0
  17. data/app/views/activity_notification/notifications/default/_index.html.erb +9 -0
  18. data/app/views/activity_notification/notifications/default/destroy.js.erb +2 -0
  19. data/app/views/activity_notification/notifications/default/index.html.erb +17 -0
  20. data/app/views/activity_notification/notifications/default/open.js.erb +2 -0
  21. data/app/views/activity_notification/notifications/default/open_all.js.erb +2 -0
  22. data/app/views/activity_notification/notifications/default/show.html.erb +2 -0
  23. data/config/locales/en.yml +8 -0
  24. data/lib/activity_notification.rb +52 -0
  25. data/lib/activity_notification/apis/notification_api.rb +147 -0
  26. data/lib/activity_notification/common.rb +86 -0
  27. data/lib/activity_notification/config.rb +23 -0
  28. data/lib/activity_notification/controllers/store_controller.rb +30 -0
  29. data/lib/activity_notification/helpers/polymorphic_helpers.rb +32 -0
  30. data/lib/activity_notification/helpers/view_helpers.rb +108 -0
  31. data/lib/activity_notification/mailers/helpers.rb +97 -0
  32. data/lib/activity_notification/models/notifiable.rb +136 -0
  33. data/lib/activity_notification/models/notification.rb +50 -0
  34. data/lib/activity_notification/models/notifier.rb +11 -0
  35. data/lib/activity_notification/models/target.rb +104 -0
  36. data/lib/activity_notification/rails.rb +6 -0
  37. data/lib/activity_notification/rails/routes.rb +105 -0
  38. data/lib/activity_notification/renderable.rb +142 -0
  39. data/lib/activity_notification/roles/acts_as_notifiable.rb +37 -0
  40. data/lib/activity_notification/roles/acts_as_target.rb +30 -0
  41. data/lib/activity_notification/version.rb +3 -0
  42. data/lib/generators/activity_notification/controllers_generator.rb +44 -0
  43. data/lib/generators/activity_notification/install_generator.rb +45 -0
  44. data/lib/generators/activity_notification/migration/migration_generator.rb +17 -0
  45. data/lib/generators/activity_notification/notification/notification_generator.rb +17 -0
  46. data/lib/generators/activity_notification/views_generator.rb +44 -0
  47. data/lib/generators/templates/README +53 -0
  48. data/lib/generators/templates/active_record/migration.rb +18 -0
  49. data/lib/generators/templates/activity_notification.rb +18 -0
  50. data/lib/generators/templates/controllers/README +13 -0
  51. data/lib/generators/templates/controllers/notifications_controller.rb +66 -0
  52. data/lib/generators/templates/controllers/notifications_with_devise_controller.rb +74 -0
  53. data/lib/generators/templates/notification/notification.rb +3 -0
  54. data/lib/tasks/activity_notification_tasks.rake +4 -0
  55. data/spec/concerns/notification_api_spec.rb +531 -0
  56. data/spec/factories/articles.rb +5 -0
  57. data/spec/factories/comments.rb +6 -0
  58. data/spec/factories/notifications.rb +7 -0
  59. data/spec/factories/users.rb +5 -0
  60. data/spec/models/notification_spec.rb +259 -0
  61. data/spec/rails_app/Rakefile +6 -0
  62. data/spec/rails_app/app/controllers/application_controller.rb +5 -0
  63. data/spec/rails_app/app/controllers/concerns/.keep +0 -0
  64. data/spec/rails_app/app/helpers/application_helper.rb +2 -0
  65. data/spec/rails_app/app/mailers/.keep +0 -0
  66. data/spec/rails_app/app/models/.keep +0 -0
  67. data/spec/rails_app/app/models/article.rb +12 -0
  68. data/spec/rails_app/app/models/comment.rb +18 -0
  69. data/spec/rails_app/app/models/concerns/.keep +0 -0
  70. data/spec/rails_app/app/models/user.rb +8 -0
  71. data/spec/rails_app/app/views/layouts/application.html.erb +14 -0
  72. data/spec/rails_app/bin/bundle +3 -0
  73. data/spec/rails_app/bin/rails +4 -0
  74. data/spec/rails_app/bin/rake +4 -0
  75. data/spec/rails_app/bin/setup +29 -0
  76. data/spec/rails_app/config.ru +4 -0
  77. data/spec/rails_app/config/application.rb +20 -0
  78. data/spec/rails_app/config/boot.rb +5 -0
  79. data/spec/rails_app/config/database.yml +25 -0
  80. data/spec/rails_app/config/environment.rb +12 -0
  81. data/spec/rails_app/config/environments/development.rb +44 -0
  82. data/spec/rails_app/config/environments/production.rb +79 -0
  83. data/spec/rails_app/config/environments/test.rb +45 -0
  84. data/spec/rails_app/config/initializers/activity_notification.rb +18 -0
  85. data/spec/rails_app/config/initializers/assets.rb +11 -0
  86. data/spec/rails_app/config/initializers/backtrace_silencers.rb +7 -0
  87. data/spec/rails_app/config/initializers/cookies_serializer.rb +3 -0
  88. data/spec/rails_app/config/initializers/devise.rb +274 -0
  89. data/spec/rails_app/config/initializers/filter_parameter_logging.rb +4 -0
  90. data/spec/rails_app/config/initializers/inflections.rb +16 -0
  91. data/spec/rails_app/config/initializers/mime_types.rb +4 -0
  92. data/spec/rails_app/config/initializers/session_store.rb +3 -0
  93. data/spec/rails_app/config/initializers/wrap_parameters.rb +14 -0
  94. data/spec/rails_app/config/routes.rb +5 -0
  95. data/spec/rails_app/config/secrets.yml +22 -0
  96. data/spec/rails_app/db/migrate/20160715050420_create_notifications.rb +18 -0
  97. data/spec/rails_app/db/migrate/20160715050433_create_test_tables.rb +36 -0
  98. data/spec/rails_app/db/schema.rb +73 -0
  99. data/spec/rails_app/public/404.html +67 -0
  100. data/spec/rails_app/public/422.html +67 -0
  101. data/spec/rails_app/public/500.html +66 -0
  102. data/spec/rails_app/public/favicon.ico +0 -0
  103. data/spec/spec_helper.rb +34 -0
  104. metadata +309 -0
metadata ADDED
@@ -0,0 +1,309 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: activity_notification
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.8
5
+ platform: ruby
6
+ authors:
7
+ - Shota Yamazaki
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-07-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: i18n
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.5.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.5.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: activerecord
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: sqlite3
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.3.11
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.3.11
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 3.5.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 3.5.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: factory_girl_rails
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 4.7.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 4.7.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 0.12.0
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 0.12.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: devise
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 4.2.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 4.2.0
125
+ description: Integrated user activity notifications for Rails. Provides functions
126
+ to configure multiple notification targets and make activity notifications with
127
+ notifiable models, like adding comments, responding etc.
128
+ email:
129
+ - shota.yamazaki.8@gmail.com
130
+ executables: []
131
+ extensions: []
132
+ extra_rdoc_files: []
133
+ files:
134
+ - ".coveralls.yml"
135
+ - ".gitignore"
136
+ - ".rspec"
137
+ - ".travis.yml"
138
+ - Gemfile
139
+ - Gemfile.lock
140
+ - MIT-LICENSE
141
+ - README.md
142
+ - Rakefile
143
+ - activity_notification.gemspec
144
+ - app/controllers/activity_notification/notifications_controller.rb
145
+ - app/controllers/activity_notification/notifications_with_devise_controller.rb
146
+ - app/mailers/activity_notification/mailer.rb
147
+ - app/views/activity_notification/mailer/default/default.html.erb
148
+ - app/views/activity_notification/notifications/default/_default.html.erb
149
+ - app/views/activity_notification/notifications/default/_index.html.erb
150
+ - app/views/activity_notification/notifications/default/destroy.js.erb
151
+ - app/views/activity_notification/notifications/default/index.html.erb
152
+ - app/views/activity_notification/notifications/default/open.js.erb
153
+ - app/views/activity_notification/notifications/default/open_all.js.erb
154
+ - app/views/activity_notification/notifications/default/show.html.erb
155
+ - config/locales/en.yml
156
+ - lib/activity_notification.rb
157
+ - lib/activity_notification/apis/notification_api.rb
158
+ - lib/activity_notification/common.rb
159
+ - lib/activity_notification/config.rb
160
+ - lib/activity_notification/controllers/store_controller.rb
161
+ - lib/activity_notification/helpers/polymorphic_helpers.rb
162
+ - lib/activity_notification/helpers/view_helpers.rb
163
+ - lib/activity_notification/mailers/helpers.rb
164
+ - lib/activity_notification/models/notifiable.rb
165
+ - lib/activity_notification/models/notification.rb
166
+ - lib/activity_notification/models/notifier.rb
167
+ - lib/activity_notification/models/target.rb
168
+ - lib/activity_notification/rails.rb
169
+ - lib/activity_notification/rails/routes.rb
170
+ - lib/activity_notification/renderable.rb
171
+ - lib/activity_notification/roles/acts_as_notifiable.rb
172
+ - lib/activity_notification/roles/acts_as_target.rb
173
+ - lib/activity_notification/version.rb
174
+ - lib/generators/activity_notification/controllers_generator.rb
175
+ - lib/generators/activity_notification/install_generator.rb
176
+ - lib/generators/activity_notification/migration/migration_generator.rb
177
+ - lib/generators/activity_notification/notification/notification_generator.rb
178
+ - lib/generators/activity_notification/views_generator.rb
179
+ - lib/generators/templates/README
180
+ - lib/generators/templates/active_record/migration.rb
181
+ - lib/generators/templates/activity_notification.rb
182
+ - lib/generators/templates/controllers/README
183
+ - lib/generators/templates/controllers/notifications_controller.rb
184
+ - lib/generators/templates/controllers/notifications_with_devise_controller.rb
185
+ - lib/generators/templates/notification/notification.rb
186
+ - lib/tasks/activity_notification_tasks.rake
187
+ - spec/concerns/notification_api_spec.rb
188
+ - spec/factories/articles.rb
189
+ - spec/factories/comments.rb
190
+ - spec/factories/notifications.rb
191
+ - spec/factories/users.rb
192
+ - spec/models/notification_spec.rb
193
+ - spec/rails_app/Rakefile
194
+ - spec/rails_app/app/controllers/application_controller.rb
195
+ - spec/rails_app/app/controllers/concerns/.keep
196
+ - spec/rails_app/app/helpers/application_helper.rb
197
+ - spec/rails_app/app/mailers/.keep
198
+ - spec/rails_app/app/models/.keep
199
+ - spec/rails_app/app/models/article.rb
200
+ - spec/rails_app/app/models/comment.rb
201
+ - spec/rails_app/app/models/concerns/.keep
202
+ - spec/rails_app/app/models/user.rb
203
+ - spec/rails_app/app/views/layouts/application.html.erb
204
+ - spec/rails_app/bin/bundle
205
+ - spec/rails_app/bin/rails
206
+ - spec/rails_app/bin/rake
207
+ - spec/rails_app/bin/setup
208
+ - spec/rails_app/config.ru
209
+ - spec/rails_app/config/application.rb
210
+ - spec/rails_app/config/boot.rb
211
+ - spec/rails_app/config/database.yml
212
+ - spec/rails_app/config/environment.rb
213
+ - spec/rails_app/config/environments/development.rb
214
+ - spec/rails_app/config/environments/production.rb
215
+ - spec/rails_app/config/environments/test.rb
216
+ - spec/rails_app/config/initializers/activity_notification.rb
217
+ - spec/rails_app/config/initializers/assets.rb
218
+ - spec/rails_app/config/initializers/backtrace_silencers.rb
219
+ - spec/rails_app/config/initializers/cookies_serializer.rb
220
+ - spec/rails_app/config/initializers/devise.rb
221
+ - spec/rails_app/config/initializers/filter_parameter_logging.rb
222
+ - spec/rails_app/config/initializers/inflections.rb
223
+ - spec/rails_app/config/initializers/mime_types.rb
224
+ - spec/rails_app/config/initializers/session_store.rb
225
+ - spec/rails_app/config/initializers/wrap_parameters.rb
226
+ - spec/rails_app/config/routes.rb
227
+ - spec/rails_app/config/secrets.yml
228
+ - spec/rails_app/db/migrate/20160715050420_create_notifications.rb
229
+ - spec/rails_app/db/migrate/20160715050433_create_test_tables.rb
230
+ - spec/rails_app/db/schema.rb
231
+ - spec/rails_app/public/404.html
232
+ - spec/rails_app/public/422.html
233
+ - spec/rails_app/public/500.html
234
+ - spec/rails_app/public/favicon.ico
235
+ - spec/spec_helper.rb
236
+ homepage: https://github.com/simukappu/activity_notification
237
+ licenses:
238
+ - MIT
239
+ metadata: {}
240
+ post_install_message:
241
+ rdoc_options: []
242
+ require_paths:
243
+ - lib
244
+ required_ruby_version: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - ">="
247
+ - !ruby/object:Gem::Version
248
+ version: 2.1.0
249
+ required_rubygems_version: !ruby/object:Gem::Requirement
250
+ requirements:
251
+ - - ">="
252
+ - !ruby/object:Gem::Version
253
+ version: '0'
254
+ requirements: []
255
+ rubyforge_project:
256
+ rubygems_version: 2.5.1
257
+ signing_key:
258
+ specification_version: 4
259
+ summary: Integrated user activity notifications for Rails
260
+ test_files:
261
+ - spec/concerns/notification_api_spec.rb
262
+ - spec/factories/articles.rb
263
+ - spec/factories/comments.rb
264
+ - spec/factories/notifications.rb
265
+ - spec/factories/users.rb
266
+ - spec/models/notification_spec.rb
267
+ - spec/rails_app/Rakefile
268
+ - spec/rails_app/app/controllers/application_controller.rb
269
+ - spec/rails_app/app/controllers/concerns/.keep
270
+ - spec/rails_app/app/helpers/application_helper.rb
271
+ - spec/rails_app/app/mailers/.keep
272
+ - spec/rails_app/app/models/.keep
273
+ - spec/rails_app/app/models/article.rb
274
+ - spec/rails_app/app/models/comment.rb
275
+ - spec/rails_app/app/models/concerns/.keep
276
+ - spec/rails_app/app/models/user.rb
277
+ - spec/rails_app/app/views/layouts/application.html.erb
278
+ - spec/rails_app/bin/bundle
279
+ - spec/rails_app/bin/rails
280
+ - spec/rails_app/bin/rake
281
+ - spec/rails_app/bin/setup
282
+ - spec/rails_app/config.ru
283
+ - spec/rails_app/config/application.rb
284
+ - spec/rails_app/config/boot.rb
285
+ - spec/rails_app/config/database.yml
286
+ - spec/rails_app/config/environment.rb
287
+ - spec/rails_app/config/environments/development.rb
288
+ - spec/rails_app/config/environments/production.rb
289
+ - spec/rails_app/config/environments/test.rb
290
+ - spec/rails_app/config/initializers/activity_notification.rb
291
+ - spec/rails_app/config/initializers/assets.rb
292
+ - spec/rails_app/config/initializers/backtrace_silencers.rb
293
+ - spec/rails_app/config/initializers/cookies_serializer.rb
294
+ - spec/rails_app/config/initializers/devise.rb
295
+ - spec/rails_app/config/initializers/filter_parameter_logging.rb
296
+ - spec/rails_app/config/initializers/inflections.rb
297
+ - spec/rails_app/config/initializers/mime_types.rb
298
+ - spec/rails_app/config/initializers/session_store.rb
299
+ - spec/rails_app/config/initializers/wrap_parameters.rb
300
+ - spec/rails_app/config/routes.rb
301
+ - spec/rails_app/config/secrets.yml
302
+ - spec/rails_app/db/migrate/20160715050420_create_notifications.rb
303
+ - spec/rails_app/db/migrate/20160715050433_create_test_tables.rb
304
+ - spec/rails_app/db/schema.rb
305
+ - spec/rails_app/public/404.html
306
+ - spec/rails_app/public/422.html
307
+ - spec/rails_app/public/500.html
308
+ - spec/rails_app/public/favicon.ico
309
+ - spec/spec_helper.rb