activity_notification 1.7.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +3 -0
  3. data/.travis.yml +16 -2
  4. data/CHANGELOG.md +22 -2
  5. data/Gemfile +7 -0
  6. data/Procfile +2 -0
  7. data/README.md +366 -32
  8. data/Rakefile +19 -10
  9. data/activity_notification.gemspec +5 -3
  10. data/app/channels/activity_notification/notification_channel.rb +37 -0
  11. data/app/channels/activity_notification/notification_with_devise_channel.rb +51 -0
  12. data/app/controllers/activity_notification/notifications_controller.rb +1 -1
  13. data/app/controllers/activity_notification/subscriptions_controller.rb +1 -1
  14. data/app/jobs/activity_notification/notify_all_job.rb +16 -0
  15. data/app/jobs/activity_notification/notify_job.rb +17 -0
  16. data/app/jobs/activity_notification/notify_to_job.rb +16 -0
  17. data/app/views/activity_notification/notifications/default/_default_without_grouping.html.erb +1 -1
  18. data/app/views/activity_notification/notifications/default/index.html.erb +55 -2
  19. data/bin/_dynamodblocal +4 -0
  20. data/{scripts → bin}/bundle_update.sh +1 -0
  21. data/bin/deploy_on_heroku.sh +14 -0
  22. data/bin/install_dynamodblocal.sh +5 -0
  23. data/bin/start_dynamodblocal.sh +47 -0
  24. data/bin/stop_dynamodblocal.sh +34 -0
  25. data/gemfiles/Gemfile.rails-4.2 +1 -0
  26. data/gemfiles/Gemfile.rails-5.0 +2 -0
  27. data/gemfiles/Gemfile.rails-5.1 +1 -0
  28. data/gemfiles/Gemfile.rails-5.2 +1 -0
  29. data/gemfiles/Gemfile.rails-6.0.rc +21 -0
  30. data/lib/activity_notification.rb +1 -0
  31. data/lib/activity_notification/apis/notification_api.rb +289 -136
  32. data/lib/activity_notification/apis/subscription_api.rb +80 -53
  33. data/lib/activity_notification/common.rb +3 -3
  34. data/lib/activity_notification/config.rb +89 -33
  35. data/lib/activity_notification/controllers/common_controller.rb +19 -7
  36. data/lib/activity_notification/helpers/errors.rb +4 -0
  37. data/lib/activity_notification/helpers/view_helpers.rb +1 -1
  38. data/lib/activity_notification/models/concerns/notifiable.rb +61 -53
  39. data/lib/activity_notification/models/concerns/subscriber.rb +7 -6
  40. data/lib/activity_notification/models/concerns/target.rb +73 -28
  41. data/lib/activity_notification/optional_targets/base.rb +2 -2
  42. data/lib/activity_notification/orm/active_record/notification.rb +4 -23
  43. data/lib/activity_notification/orm/dynamoid.rb +495 -0
  44. data/lib/activity_notification/orm/dynamoid/extension.rb +184 -0
  45. data/lib/activity_notification/orm/dynamoid/notification.rb +189 -0
  46. data/lib/activity_notification/orm/dynamoid/subscription.rb +82 -0
  47. data/lib/activity_notification/orm/mongoid.rb +4 -1
  48. data/lib/activity_notification/orm/mongoid/notification.rb +8 -25
  49. data/lib/activity_notification/orm/mongoid/subscription.rb +1 -1
  50. data/lib/activity_notification/roles/acts_as_notifiable.rb +33 -5
  51. data/lib/activity_notification/roles/acts_as_target.rb +62 -9
  52. data/lib/activity_notification/version.rb +1 -1
  53. data/lib/generators/templates/activity_notification.rb +30 -7
  54. data/lib/tasks/activity_notification_tasks.rake +14 -4
  55. data/spec/channels/notification_channel_shared_examples.rb +59 -0
  56. data/spec/channels/notification_channel_spec.rb +50 -0
  57. data/spec/channels/notification_with_devise_channel_spec.rb +99 -0
  58. data/spec/concerns/apis/notification_api_spec.rb +2 -2
  59. data/spec/concerns/apis/subscription_api_spec.rb +2 -2
  60. data/spec/concerns/models/notifiable_spec.rb +72 -7
  61. data/spec/concerns/models/subscriber_spec.rb +53 -49
  62. data/spec/concerns/models/target_spec.rb +135 -13
  63. data/spec/config_spec.rb +41 -1
  64. data/spec/controllers/notifications_controller_shared_examples.rb +7 -3
  65. data/spec/controllers/subscriptions_controller_shared_examples.rb +7 -3
  66. data/spec/helpers/view_helpers_spec.rb +12 -10
  67. data/spec/models/dummy/dummy_group_spec.rb +4 -0
  68. data/spec/models/dummy/dummy_notifiable_spec.rb +4 -0
  69. data/spec/models/dummy/dummy_notifier_spec.rb +4 -0
  70. data/spec/models/dummy/dummy_subscriber_spec.rb +3 -0
  71. data/spec/models/dummy/dummy_target_spec.rb +4 -0
  72. data/spec/models/notification_spec.rb +164 -45
  73. data/spec/models/subscription_spec.rb +69 -14
  74. data/spec/orm/dynamoid_spec.rb +115 -0
  75. data/spec/rails_app/app/assets/javascripts/application.js +2 -1
  76. data/spec/rails_app/app/assets/javascripts/cable.js +12 -0
  77. data/spec/rails_app/app/controllers/comments_controller.rb +3 -4
  78. data/spec/rails_app/app/models/admin.rb +6 -4
  79. data/spec/rails_app/app/models/article.rb +2 -2
  80. data/spec/rails_app/app/models/comment.rb +17 -5
  81. data/spec/rails_app/app/models/user.rb +5 -3
  82. data/spec/rails_app/app/views/activity_notification/notifications/users/overridden/custom/_test.html.erb +1 -0
  83. data/spec/rails_app/config/application.rb +6 -1
  84. data/spec/rails_app/config/cable.yml +8 -0
  85. data/spec/rails_app/config/dynamoid.rb +5 -0
  86. data/spec/rails_app/config/environment.rb +4 -1
  87. data/spec/rails_app/config/environments/production.rb +1 -1
  88. data/spec/rails_app/config/initializers/activity_notification.rb +30 -7
  89. data/spec/rails_app/config/locales/activity_notification.en.yml +2 -0
  90. data/spec/rails_app/db/seeds.rb +21 -5
  91. data/spec/rails_app/lib/mailer_previews/mailer_preview.rb +12 -4
  92. data/spec/roles/acts_as_notifiable_spec.rb +2 -2
  93. data/spec/roles/acts_as_target_spec.rb +1 -1
  94. data/spec/spec_helper.rb +15 -8
  95. metadata +67 -20
  96. data/spec/rails_app/app/models/.keep +0 -0
  97. data/spec/rails_app/app/views/activity_notification/notifications/users/overriden/custom/_test.html.erb +0 -1
@@ -25,7 +25,7 @@ Rails.application.configure do
25
25
  config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
26
 
27
27
  # Compress JavaScripts and CSS.
28
- config.assets.js_compressor = :uglifier
28
+ # config.assets.js_compressor = :uglifier
29
29
  # config.assets.css_compressor = :sass
30
30
 
31
31
  # Do not fallback to assets pipeline if a precompiled asset is missed.
@@ -1,18 +1,18 @@
1
1
  ActivityNotification.configure do |config|
2
2
 
3
- # Configure ORM name for ActivityNotification.
4
- # Set :active_record or :mongoid.
5
- ENV['AN_ORM'] = 'active_record' unless ENV['AN_ORM'] == 'mongoid'
6
- config.orm = ENV['AN_ORM']
7
-
8
3
  # Configure if all activity notifications are enabled
9
4
  # Set false when you want to turn off activity notifications
10
5
  config.enabled = true
11
6
 
12
- # Configure table name to store notification data
7
+ # Configure ORM name for ActivityNotification.
8
+ # Set :active_record, :mongoid or :dynamoid.
9
+ ENV['AN_ORM'] = 'active_record' if ['mongoid', 'dynamoid'].exclude?(ENV['AN_ORM'])
10
+ config.orm = ENV['AN_ORM'].to_sym
11
+
12
+ # Configure table name to store notification data.
13
13
  config.notification_table_name = "notifications"
14
14
 
15
- # Configure table name to store subscription data
15
+ # Configure table name to store subscription data.
16
16
  config.subscription_table_name = "subscriptions"
17
17
 
18
18
  # Configure if email notification is enabled as default.
@@ -47,6 +47,9 @@ ActivityNotification.configure do |config|
47
47
  # Configure the parent class for activity_notification controllers.
48
48
  # config.parent_controller = 'ApplicationController'
49
49
 
50
+ # Configure the parent class for activity_notification channels.
51
+ # config.parent_channel = 'ActionCable::Channel::Base'
52
+
50
53
  # Configure the custom mailer templates directory
51
54
  # config.mailer_templates_dir = 'activity_notification/mailer'
52
55
 
@@ -56,4 +59,24 @@ ActivityNotification.configure do |config|
56
59
  # Configure ActiveJob queue name for delayed notifications.
57
60
  config.active_job_queue = :activity_notification
58
61
 
62
+ # Configure delimiter of composite key for DynamoDB.
63
+ # config.composite_key_delimiter = '#'
64
+
65
+ # Configure if activity_notification stores notificaion records including associated records like target and notifiable..
66
+ # This store_with_associated_records option can be set true only when you use mongoid or dynamoid ORM.
67
+ config.store_with_associated_records = false
68
+
69
+ # Configure if WebSocket subscription using ActionCable is enabled.
70
+ # Note that you can configure them for each model by acts_as roles.
71
+ # Set true when you want to turn on WebSocket subscription using ActionCable as default.
72
+ config.action_cable_enabled = false
73
+
74
+ # Configure if ctivity_notification publishes WebSocket notifications using ActionCable only to authenticated target with Devise.
75
+ # Note that you can configure them for each model by acts_as roles.
76
+ # Set true when you want to use Device integration with WebSocket subscription using ActionCable as default.
77
+ config.action_cable_with_devise = false
78
+
79
+ # Configure notification channel prefix for ActionCable.
80
+ config.notification_channel_prefix = 'activity_notification_channel'
81
+
59
82
  end
@@ -11,6 +11,8 @@ en:
11
11
  destroy:
12
12
  text: 'Some user removed an article!'
13
13
  comment:
14
+ create:
15
+ text: '%{notifier_name} posted a comment on the article "%{article_title}"'
14
16
  post:
15
17
  text:
16
18
  one: "<p>%{notifier_name} posted a comment on your article %{article_title}</p>"
@@ -1,9 +1,9 @@
1
1
  # coding: utf-8
2
2
  # This file is seed file for test data on development environment.
3
3
 
4
- def clear_database
5
- [ActivityNotification::Notification, ActivityNotification::Subscription, Comment, Article, Admin, User].each do |model|
6
- model.delete_all
4
+ def clean_database
5
+ [ActivityNotification::Notification, ActivityNotification::Subscription, Comment, Article, Admin, User].each do |model_class|
6
+ model_class.delete_all
7
7
  end
8
8
  end
9
9
 
@@ -29,8 +29,11 @@ def reset_pk_sequence
29
29
  end
30
30
  end
31
31
 
32
- clear_database
32
+ clean_database
33
+ puts "* Cleaned database"
34
+
33
35
  reset_pk_sequence
36
+ puts "* Reset sequences for primary keys"
34
37
 
35
38
  ['Ichiro', 'Stephen', 'Klay', 'Kevin'].each do |name|
36
39
  user = User.new(
@@ -42,6 +45,7 @@ reset_pk_sequence
42
45
  user.skip_confirmation!
43
46
  user.save!
44
47
  end
48
+ puts "* Created #{User.count} user records"
45
49
 
46
50
  ['Ichiro'].each do |name|
47
51
  user = User.find_by(name: name)
@@ -51,6 +55,7 @@ end
51
55
  slack_username: ENV['OPTIONAL_TARGET_SLACK_USERNAME']
52
56
  )
53
57
  end
58
+ puts "* Created #{Admin.count} admin records"
54
59
 
55
60
  User.all.each do |user|
56
61
  article = user.articles.create(
@@ -59,6 +64,10 @@ User.all.each do |user|
59
64
  )
60
65
  article.notify :users, send_email: false
61
66
  end
67
+ puts "* Created #{Article.count} article records"
68
+ notifications = ActivityNotification::Notification.filtered_by_type("Article")
69
+ puts "** Generated #{ActivityNotification::Notification.filtered_by_type("Article").count} notification records for new articles"
70
+ puts "*** #{ActivityNotification::Notification.filtered_by_type("Article").filtered_by_target_type("User").count} notifications as #{ActivityNotification::Notification.filtered_by_type("Article").filtered_by_target_type("User").group_owners_only.count} groups to users"
62
71
 
63
72
  Article.all.each do |article|
64
73
  User.all.each do |user|
@@ -68,4 +77,11 @@ Article.all.each do |article|
68
77
  )
69
78
  comment.notify :users, send_email: false
70
79
  end
71
- end
80
+ end
81
+ puts "* Created #{Comment.count} comment records"
82
+ notifications = ActivityNotification::Notification.filtered_by_type("Comment")
83
+ puts "** Generated #{ActivityNotification::Notification.filtered_by_type("Comment").count} notification records for new comments"
84
+ puts "*** #{ActivityNotification::Notification.filtered_by_type("Comment").filtered_by_target_type("User").count} notifications as #{ActivityNotification::Notification.filtered_by_type("Comment").filtered_by_target_type("User").group_owners_only.count} groups to users"
85
+ puts "*** #{ActivityNotification::Notification.filtered_by_type("Comment").filtered_by_target_type("Admin").count} notifications as #{ActivityNotification::Notification.filtered_by_type("Comment").filtered_by_target_type("Admin").group_owners_only.count} groups to admins"
86
+
87
+ puts "Created ActivityNotification test records!"
@@ -1,14 +1,22 @@
1
1
  class ActivityNotification::MailerPreview < ActionMailer::Preview
2
2
 
3
3
  def send_notification_email_single
4
- target_notification = ActivityNotification::Notification.where(group: nil).first
4
+ target_notification =
5
+ case ActivityNotification.config.orm
6
+ when :active_record then ActivityNotification::Notification.where(group: nil).first
7
+ when :mongoid then ActivityNotification::Notification.where(group: nil).first
8
+ when :dynamoid then ActivityNotification::Notification.where('group_key.null': true).first
9
+ end
5
10
  ActivityNotification::Mailer.send_notification_email(target_notification)
6
11
  end
7
12
 
8
13
  def send_notification_email_with_group
9
- target_notification = ActivityNotification.config.orm == :active_record ?
10
- ActivityNotification::Notification.where.not(group: nil).first :
11
- ActivityNotification::Notification.where(:group_id.nin => ["", nil]).first
14
+ target_notification =
15
+ case ActivityNotification.config.orm
16
+ when :active_record then ActivityNotification::Notification.where.not(group: nil).first
17
+ when :mongoid then ActivityNotification::Notification.where(:group_id.nin => ["", nil]).first
18
+ when :dynamoid then ActivityNotification::Notification.where('group_key.not_null': true).first
19
+ end
12
20
  ActivityNotification::Mailer.send_notification_email(target_notification)
13
21
  end
14
22
 
@@ -312,7 +312,7 @@ describe ActivityNotification::ActsAsNotifiable do
312
312
  if ActivityNotification.config.orm == :active_record
313
313
  expect { @notifiable_1.destroy }.to raise_error(ActiveRecord::DeleteRestrictionError)
314
314
  else
315
- expect { @notifiable_1.destroy }.to raise_error(RuntimeError)
315
+ expect { @notifiable_1.destroy }.to raise_error(ActivityNotification::DeleteRestrictionError)
316
316
  end
317
317
  end
318
318
  end
@@ -427,7 +427,7 @@ describe ActivityNotification::ActsAsNotifiable do
427
427
  describe ".available_notifiable_options" do
428
428
  it "returns list of available options in acts_as_notifiable" do
429
429
  expect(dummy_model_class.available_notifiable_options)
430
- .to eq([:targets, :group, :group_expiry_delay, :notifier, :parameters, :email_allowed, :notifiable_path, :printable_notifiable_name, :printable_name, :dependent_notifications, :optional_targets])
430
+ .to eq([:targets, :group, :group_expiry_delay, :notifier, :parameters, :email_allowed, :action_cable_allowed, :notifiable_path, :printable_notifiable_name, :printable_name, :dependent_notifications, :optional_targets])
431
431
  end
432
432
  end
433
433
  end
@@ -33,7 +33,7 @@ describe ActivityNotification::ActsAsTarget do
33
33
  describe ".available_target_options" do
34
34
  it "returns list of available options in acts_as_target" do
35
35
  expect(dummy_model_class.available_target_options)
36
- .to eq([:email, :email_allowed, :batch_email_allowed, :subscription_allowed, :devise_resource, :printable_notification_target_name, :printable_name])
36
+ .to eq([:email, :email_allowed, :batch_email_allowed, :subscription_allowed, :action_cable_enabled, :action_cable_with_devise, :devise_resource, :printable_notification_target_name, :printable_name])
37
37
  end
38
38
  end
39
39
  end
@@ -16,35 +16,42 @@ SimpleCov.start('rails') do
16
16
  add_filter '/lib/generators/templates/'
17
17
  add_filter '/lib/activity_notification/version.rb'
18
18
  if Rails::VERSION::MAJOR >= 5
19
- nocov_token 'except-rails5+'
19
+ skip_token_tag = 'except-rails5-plus'
20
20
  else
21
- nocov_token 'only-rails5+'
21
+ skip_token_tag = 'only-rails5-plus'
22
+ add_filter '/app/channels/activity_notification/'
22
23
  end
23
24
  if Gem::Version.new("5.1.6") <= Rails.gem_version && Rails.gem_version < Gem::Version.new("5.2.2")
24
- nocov_token 'only-rails-without-callback-issue'
25
+ skip_token_tag += '#only-rails-without-callback-issue'
25
26
  else
26
- nocov_token 'only-rails-with-callback-issue'
27
+ skip_token_tag += '#only-rails-with-callback-issue'
27
28
  end
28
29
  if ENV['AN_ORM'] == 'mongoid'
29
30
  add_filter '/lib/activity_notification/orm/active_record'
31
+ add_filter '/lib/activity_notification/orm/dynamoid'
32
+ elsif ENV['AN_ORM'] == 'dynamoid'
33
+ add_filter '/lib/activity_notification/orm/active_record'
34
+ add_filter '/lib/activity_notification/orm/mongoid'
35
+ skip_token_tag += '#except-dynamoid'
30
36
  else
31
37
  add_filter '/lib/activity_notification/orm/mongoid'
38
+ add_filter '/lib/activity_notification/orm/dynamoid'
32
39
  end
40
+ skip_token skip_token_tag
33
41
  end
34
42
 
35
- # Testing with Devise
36
- require 'devise'
37
43
  # Dummy application
38
44
  require 'rails_app/config/environment'
39
45
 
40
46
  require 'rspec/rails'
41
47
  require 'ammeter/init'
48
+ require "action_cable/testing/rspec" if Rails::VERSION::MAJOR == 5
42
49
  require 'factory_bot_rails'
43
50
  require 'activity_notification'
44
51
 
45
52
  Dir[Rails.root.join("../../spec/support/**/*.rb")].each { |file| require file }
46
53
 
47
- def clear_database
54
+ def clean_database
48
55
  [ActivityNotification::Notification, ActivityNotification::Subscription, Comment, Article, Admin, User].each do |model_class|
49
56
  model_class.delete_all
50
57
  end
@@ -54,7 +61,7 @@ RSpec.configure do |config|
54
61
  config.include FactoryBot::Syntax::Methods
55
62
  config.before(:all) do
56
63
  FactoryBot.reload
57
- clear_database
64
+ clean_database
58
65
  end
59
66
  config.include Devise::Test::ControllerHelpers, type: :controller
60
67
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activity_notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shota Yamazaki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-30 00:00:00.000000000 Z
11
+ date: 2019-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 4.2.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '5.3'
22
+ version: '6.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 4.2.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '5.3'
32
+ version: '6.1'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: i18n
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -58,6 +58,20 @@ dependencies:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
60
  version: 3.1.1
61
+ - !ruby/object:Gem::Dependency
62
+ name: puma
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 3.12.0
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 3.12.0
61
75
  - !ruby/object:Gem::Dependency
62
76
  name: sqlite3
63
77
  requirement: !ruby/object:Gem::Requirement
@@ -65,9 +79,6 @@ dependencies:
65
79
  - - ">="
66
80
  - !ruby/object:Gem::Version
67
81
  version: 1.3.13
68
- - - "<"
69
- - !ruby/object:Gem::Version
70
- version: 1.4.0
71
82
  type: :development
72
83
  prerelease: false
73
84
  version_requirements: !ruby/object:Gem::Requirement
@@ -75,9 +86,6 @@ dependencies:
75
86
  - - ">="
76
87
  - !ruby/object:Gem::Version
77
88
  version: 1.3.13
78
- - - "<"
79
- - !ruby/object:Gem::Version
80
- version: 1.4.0
81
89
  - !ruby/object:Gem::Dependency
82
90
  name: mysql2
83
91
  requirement: !ruby/object:Gem::Requirement
@@ -113,19 +121,33 @@ dependencies:
113
121
  - - ">="
114
122
  - !ruby/object:Gem::Version
115
123
  version: 4.0.0
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: 4.0.0
131
+ - !ruby/object:Gem::Dependency
132
+ name: dynamoid
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: 3.0.0
116
138
  - - "<"
117
139
  - !ruby/object:Gem::Version
118
- version: 7.0.0
140
+ version: 3.2.0
119
141
  type: :development
120
142
  prerelease: false
121
143
  version_requirements: !ruby/object:Gem::Requirement
122
144
  requirements:
123
145
  - - ">="
124
146
  - !ruby/object:Gem::Version
125
- version: 4.0.0
147
+ version: 3.0.0
126
148
  - - "<"
127
149
  - !ruby/object:Gem::Version
128
- version: 7.0.0
150
+ version: 3.2.0
129
151
  - !ruby/object:Gem::Dependency
130
152
  name: rspec-rails
131
153
  requirement: !ruby/object:Gem::Requirement
@@ -263,9 +285,12 @@ files:
263
285
  - CHANGELOG.md
264
286
  - Gemfile
265
287
  - MIT-LICENSE
288
+ - Procfile
266
289
  - README.md
267
290
  - Rakefile
268
291
  - activity_notification.gemspec
292
+ - app/channels/activity_notification/notification_channel.rb
293
+ - app/channels/activity_notification/notification_with_devise_channel.rb
269
294
  - app/controllers/activity_notification/notifications_controller.rb
270
295
  - app/controllers/activity_notification/notifications_with_devise_controller.rb
271
296
  - app/controllers/activity_notification/subscriptions_controller.rb
@@ -302,10 +327,17 @@ files:
302
327
  - app/views/activity_notification/subscriptions/default/unsubscribe.js.erb
303
328
  - app/views/activity_notification/subscriptions/default/unsubscribe_to_email.js.erb
304
329
  - app/views/activity_notification/subscriptions/default/unsubscribe_to_optional_target.js.erb
330
+ - bin/_dynamodblocal
331
+ - bin/bundle_update.sh
332
+ - bin/deploy_on_heroku.sh
333
+ - bin/install_dynamodblocal.sh
334
+ - bin/start_dynamodblocal.sh
335
+ - bin/stop_dynamodblocal.sh
305
336
  - gemfiles/Gemfile.rails-4.2
306
337
  - gemfiles/Gemfile.rails-5.0
307
338
  - gemfiles/Gemfile.rails-5.1
308
339
  - gemfiles/Gemfile.rails-5.2
340
+ - gemfiles/Gemfile.rails-6.0.rc
309
341
  - lib/activity_notification.rb
310
342
  - lib/activity_notification/apis/notification_api.rb
311
343
  - lib/activity_notification/apis/subscription_api.rb
@@ -314,6 +346,7 @@ files:
314
346
  - lib/activity_notification/controllers/common_controller.rb
315
347
  - lib/activity_notification/controllers/devise_authentication_controller.rb
316
348
  - lib/activity_notification/controllers/store_controller.rb
349
+ - lib/activity_notification/helpers/errors.rb
317
350
  - lib/activity_notification/helpers/polymorphic_helpers.rb
318
351
  - lib/activity_notification/helpers/view_helpers.rb
319
352
  - lib/activity_notification/mailers/helpers.rb
@@ -331,6 +364,10 @@ files:
331
364
  - lib/activity_notification/orm/active_record.rb
332
365
  - lib/activity_notification/orm/active_record/notification.rb
333
366
  - lib/activity_notification/orm/active_record/subscription.rb
367
+ - lib/activity_notification/orm/dynamoid.rb
368
+ - lib/activity_notification/orm/dynamoid/extension.rb
369
+ - lib/activity_notification/orm/dynamoid/notification.rb
370
+ - lib/activity_notification/orm/dynamoid/subscription.rb
334
371
  - lib/activity_notification/orm/mongoid.rb
335
372
  - lib/activity_notification/orm/mongoid/notification.rb
336
373
  - lib/activity_notification/orm/mongoid/subscription.rb
@@ -361,7 +398,9 @@ files:
361
398
  - lib/generators/templates/models/notification.rb
362
399
  - lib/generators/templates/models/subscription.rb
363
400
  - lib/tasks/activity_notification_tasks.rake
364
- - scripts/bundle_update.sh
401
+ - spec/channels/notification_channel_shared_examples.rb
402
+ - spec/channels/notification_channel_spec.rb
403
+ - spec/channels/notification_with_devise_channel_spec.rb
365
404
  - spec/concerns/apis/notification_api_spec.rb
366
405
  - spec/concerns/apis/subscription_api_spec.rb
367
406
  - spec/concerns/common_spec.rb
@@ -412,8 +451,10 @@ files:
412
451
  - spec/optional_targets/amazon_sns_spec.rb
413
452
  - spec/optional_targets/base_spec.rb
414
453
  - spec/optional_targets/slack_spec.rb
454
+ - spec/orm/dynamoid_spec.rb
415
455
  - spec/rails_app/Rakefile
416
456
  - spec/rails_app/app/assets/javascripts/application.js
457
+ - spec/rails_app/app/assets/javascripts/cable.js
417
458
  - spec/rails_app/app/assets/stylesheets/application.css
418
459
  - spec/rails_app/app/assets/stylesheets/reset.css
419
460
  - spec/rails_app/app/assets/stylesheets/style.css
@@ -428,7 +469,6 @@ files:
428
469
  - spec/rails_app/app/helpers/application_helper.rb
429
470
  - spec/rails_app/app/mailers/.keep
430
471
  - spec/rails_app/app/mailers/custom_notification_mailer.rb
431
- - spec/rails_app/app/models/.keep
432
472
  - spec/rails_app/app/models/admin.rb
433
473
  - spec/rails_app/app/models/article.rb
434
474
  - spec/rails_app/app/models/comment.rb
@@ -445,7 +485,7 @@ files:
445
485
  - spec/rails_app/app/views/activity_notification/notifications/default/custom/_test.html.erb
446
486
  - spec/rails_app/app/views/activity_notification/notifications/users/_custom_index.html.erb
447
487
  - spec/rails_app/app/views/activity_notification/notifications/users/custom/_test.html.erb
448
- - spec/rails_app/app/views/activity_notification/notifications/users/overriden/custom/_test.html.erb
488
+ - spec/rails_app/app/views/activity_notification/notifications/users/overridden/custom/_test.html.erb
449
489
  - spec/rails_app/app/views/activity_notification/optional_targets/admins/amazon_sns/comment/_default.text.erb
450
490
  - spec/rails_app/app/views/articles/_form.html.erb
451
491
  - spec/rails_app/app/views/articles/edit.html.erb
@@ -461,7 +501,9 @@ files:
461
501
  - spec/rails_app/config.ru
462
502
  - spec/rails_app/config/application.rb
463
503
  - spec/rails_app/config/boot.rb
504
+ - spec/rails_app/config/cable.yml
464
505
  - spec/rails_app/config/database.yml
506
+ - spec/rails_app/config/dynamoid.rb
465
507
  - spec/rails_app/config/environment.rb
466
508
  - spec/rails_app/config/environments/development.rb
467
509
  - spec/rails_app/config/environments/production.rb
@@ -517,12 +559,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
517
559
  - !ruby/object:Gem::Version
518
560
  version: '0'
519
561
  requirements: []
520
- rubyforge_project:
521
- rubygems_version: 2.6.11
562
+ rubygems_version: 3.0.3
522
563
  signing_key:
523
564
  specification_version: 4
524
565
  summary: Integrated user activity notifications for Ruby on Rails
525
566
  test_files:
567
+ - spec/channels/notification_channel_shared_examples.rb
568
+ - spec/channels/notification_channel_spec.rb
569
+ - spec/channels/notification_with_devise_channel_spec.rb
526
570
  - spec/concerns/apis/notification_api_spec.rb
527
571
  - spec/concerns/apis/subscription_api_spec.rb
528
572
  - spec/concerns/common_spec.rb
@@ -573,8 +617,10 @@ test_files:
573
617
  - spec/optional_targets/amazon_sns_spec.rb
574
618
  - spec/optional_targets/base_spec.rb
575
619
  - spec/optional_targets/slack_spec.rb
620
+ - spec/orm/dynamoid_spec.rb
576
621
  - spec/rails_app/Rakefile
577
622
  - spec/rails_app/app/assets/javascripts/application.js
623
+ - spec/rails_app/app/assets/javascripts/cable.js
578
624
  - spec/rails_app/app/assets/stylesheets/application.css
579
625
  - spec/rails_app/app/assets/stylesheets/reset.css
580
626
  - spec/rails_app/app/assets/stylesheets/style.css
@@ -589,7 +635,6 @@ test_files:
589
635
  - spec/rails_app/app/helpers/application_helper.rb
590
636
  - spec/rails_app/app/mailers/.keep
591
637
  - spec/rails_app/app/mailers/custom_notification_mailer.rb
592
- - spec/rails_app/app/models/.keep
593
638
  - spec/rails_app/app/models/admin.rb
594
639
  - spec/rails_app/app/models/article.rb
595
640
  - spec/rails_app/app/models/comment.rb
@@ -606,7 +651,7 @@ test_files:
606
651
  - spec/rails_app/app/views/activity_notification/notifications/default/custom/_test.html.erb
607
652
  - spec/rails_app/app/views/activity_notification/notifications/users/_custom_index.html.erb
608
653
  - spec/rails_app/app/views/activity_notification/notifications/users/custom/_test.html.erb
609
- - spec/rails_app/app/views/activity_notification/notifications/users/overriden/custom/_test.html.erb
654
+ - spec/rails_app/app/views/activity_notification/notifications/users/overridden/custom/_test.html.erb
610
655
  - spec/rails_app/app/views/activity_notification/optional_targets/admins/amazon_sns/comment/_default.text.erb
611
656
  - spec/rails_app/app/views/articles/_form.html.erb
612
657
  - spec/rails_app/app/views/articles/edit.html.erb
@@ -622,7 +667,9 @@ test_files:
622
667
  - spec/rails_app/config.ru
623
668
  - spec/rails_app/config/application.rb
624
669
  - spec/rails_app/config/boot.rb
670
+ - spec/rails_app/config/cable.yml
625
671
  - spec/rails_app/config/database.yml
672
+ - spec/rails_app/config/dynamoid.rb
626
673
  - spec/rails_app/config/environment.rb
627
674
  - spec/rails_app/config/environments/development.rb
628
675
  - spec/rails_app/config/environments/production.rb