activity_notification 1.2.1 → 1.3.0
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 +4 -4
- data/.travis.yml +15 -5
- data/CHANGELOG.md +13 -2
- data/Gemfile +1 -1
- data/Gemfile.lock +78 -71
- data/README.md +64 -43
- data/activity_notification.gemspec +5 -4
- data/app/controllers/activity_notification/notifications_controller.rb +1 -1
- data/app/controllers/activity_notification/subscriptions_controller.rb +1 -1
- data/gemfiles/Gemfile.rails-4.2 +1 -1
- data/gemfiles/Gemfile.rails-4.2.lock +71 -62
- data/gemfiles/Gemfile.rails-5.0 +1 -1
- data/gemfiles/Gemfile.rails-5.0.lock +74 -67
- data/lib/activity_notification.rb +9 -2
- data/lib/activity_notification/apis/notification_api.rb +142 -76
- data/lib/activity_notification/apis/subscription_api.rb +72 -0
- data/lib/activity_notification/config.rb +12 -0
- data/lib/activity_notification/models/concerns/notifiable.rb +56 -6
- data/lib/activity_notification/models/concerns/notifier.rb +8 -1
- data/lib/activity_notification/models/concerns/subscriber.rb +13 -10
- data/lib/activity_notification/models/concerns/target.rb +7 -5
- data/lib/activity_notification/models/notification.rb +2 -270
- data/lib/activity_notification/models/subscription.rb +3 -101
- data/lib/activity_notification/optional_targets/base.rb +5 -1
- data/lib/activity_notification/orm/active_record.rb +16 -0
- data/lib/activity_notification/orm/active_record/notification.rb +252 -0
- data/lib/activity_notification/orm/active_record/subscription.rb +52 -0
- data/lib/activity_notification/orm/mongoid.rb +63 -0
- data/lib/activity_notification/orm/mongoid/notification.rb +255 -0
- data/lib/activity_notification/orm/mongoid/subscription.rb +73 -0
- data/lib/activity_notification/rails/routes.rb +7 -3
- data/lib/activity_notification/renderable.rb +5 -1
- data/lib/activity_notification/roles/acts_as_notifiable.rb +4 -18
- data/lib/activity_notification/version.rb +1 -1
- data/lib/generators/activity_notification/install_generator.rb +3 -5
- data/lib/generators/templates/activity_notification.rb +9 -4
- data/spec/concerns/apis/notification_api_spec.rb +27 -14
- data/spec/concerns/models/notifiable_spec.rb +10 -8
- data/spec/concerns/models/subscriber_spec.rb +12 -12
- data/spec/concerns/models/target_spec.rb +61 -51
- data/spec/controllers/subscriptions_controller_shared_examples.rb +0 -1
- data/spec/helpers/view_helpers_spec.rb +24 -7
- data/spec/models/notification_spec.rb +63 -52
- data/spec/models/subscription_spec.rb +6 -3
- data/spec/optional_targets/amazon_sns_spec.rb +8 -5
- data/spec/optional_targets/base_spec.rb +3 -1
- data/spec/optional_targets/slack_spec.rb +5 -5
- data/spec/rails_app/app/models/comment.rb +1 -1
- data/spec/rails_app/app/views/activity_notification/notifications/users/overriden/custom/_test.html.erb +1 -0
- data/spec/rails_app/config/application.rb +7 -0
- data/spec/rails_app/config/initializers/activity_notification.rb +5 -0
- data/spec/rails_app/config/mongoid.yml +13 -0
- data/spec/rails_app/db/seeds.rb +1 -1
- data/spec/rails_app/lib/custom_optional_targets/console_output.rb +7 -4
- data/spec/rails_app/lib/custom_optional_targets/wrong_target.rb +3 -0
- data/spec/roles/acts_as_notifiable_spec.rb +77 -16
- data/spec/spec_helper.rb +7 -0
- metadata +38 -14
@@ -0,0 +1 @@
|
|
1
|
+
Overriden custom template root for user target: <%= notification.id %>
|
@@ -1,6 +1,13 @@
|
|
1
1
|
require File.expand_path('../boot', __FILE__)
|
2
2
|
|
3
3
|
# Pick the frameworks you want:
|
4
|
+
if ENV['AN_ORM'] == 'mongoid'
|
5
|
+
require 'mongoid'
|
6
|
+
require 'rails'
|
7
|
+
if Rails.env != 'test'
|
8
|
+
Mongoid.load!(File.expand_path("config/mongoid.yml"), :development)
|
9
|
+
end
|
10
|
+
end
|
4
11
|
require "active_record/railtie"
|
5
12
|
require "action_controller/railtie"
|
6
13
|
require "action_mailer/railtie"
|
@@ -1,5 +1,10 @@
|
|
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
|
+
|
3
8
|
# Configure if all activity notifications are enabled
|
4
9
|
# Set false when you want to turn off activity notifications
|
5
10
|
config.enabled = true
|
data/spec/rails_app/db/seeds.rb
CHANGED
@@ -7,7 +7,7 @@ Comment.delete_all
|
|
7
7
|
Article.delete_all
|
8
8
|
Admin.delete_all
|
9
9
|
User.delete_all
|
10
|
-
|
10
|
+
User.connection.execute("UPDATE sqlite_sequence SET seq = 0;")
|
11
11
|
|
12
12
|
['Ichiro', 'Stephen', 'Klay', 'Kevin'].each do |name|
|
13
13
|
user = User.new(
|
@@ -1,13 +1,16 @@
|
|
1
1
|
module CustomOptionalTarget
|
2
|
-
# Optional target implementation
|
2
|
+
# Optional target implementation to output console.
|
3
3
|
class ConsoleOutput < ActivityNotification::OptionalTarget::Base
|
4
4
|
def initialize_target(options = {})
|
5
|
+
@console_out = options[:console_out] == false ? false : true
|
5
6
|
end
|
6
7
|
|
7
8
|
def notify(notification, options = {})
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
if @console_out
|
10
|
+
puts "----- Optional targets: #{self.class.name} -----"
|
11
|
+
puts render_notification_message(notification, options)
|
12
|
+
puts "-----------------------------------------------------------------"
|
13
|
+
end
|
11
14
|
end
|
12
15
|
end
|
13
16
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
describe ActivityNotification::ActsAsNotifiable do
|
2
2
|
let(:dummy_model_class) { Dummy::DummyBase }
|
3
3
|
let(:dummy_notifiable_class) { Dummy::DummyNotifiable }
|
4
|
+
let(:user_target) { create(:confirmed_user) }
|
4
5
|
let(:dummy_target) { create(:dummy_target) }
|
5
6
|
|
6
7
|
describe "as public class methods" do
|
@@ -30,10 +31,16 @@ describe ActivityNotification::ActsAsNotifiable do
|
|
30
31
|
before do
|
31
32
|
dummy_notifiable_class.reset_callbacks :destroy
|
32
33
|
@notifiable_1, @notifiable_2, @notifiable_3 = dummy_notifiable_class.create, dummy_notifiable_class.create, dummy_notifiable_class.create
|
33
|
-
@group_owner = create(:notification, target:
|
34
|
-
@group_member = create(:notification, target:
|
35
|
-
create(:notification, target:
|
34
|
+
@group_owner = create(:notification, target: user_target, notifiable: @notifiable_1, group: @notifiable_1)
|
35
|
+
@group_member = create(:notification, target: user_target, notifiable: @notifiable_2, group: @notifiable_1, group_owner: @group_owner)
|
36
|
+
create(:notification, target: user_target, notifiable: @notifiable_3, group: @notifiable_1, group_owner: @group_owner)
|
37
|
+
@other_target_group_owner = create(:notification, target: dummy_target, notifiable: @notifiable_1, group: @notifiable_1)
|
38
|
+
@other_target_group_member = create(:notification, target: dummy_target, notifiable: @notifiable_2, group: @notifiable_1, group_owner: @other_target_group_owner)
|
39
|
+
create(:notification, target: dummy_target, notifiable: @notifiable_3, group: @notifiable_1, group_owner: @other_target_group_owner)
|
36
40
|
expect(@group_owner.group_member_count).to eq(2)
|
41
|
+
expect(@other_target_group_owner.group_member_count).to eq(2)
|
42
|
+
expect(user_target.notifications.filtered_by_instance(@notifiable_1).count).to eq(1)
|
43
|
+
expect(dummy_target.notifications.filtered_by_instance(@notifiable_1).count).to eq(1)
|
37
44
|
end
|
38
45
|
|
39
46
|
it "returns hash of :dependent_notifications option" do
|
@@ -44,57 +51,107 @@ describe ActivityNotification::ActsAsNotifiable do
|
|
44
51
|
context "without option" do
|
45
52
|
it "does not deletes any notifications when notifiable is deleted" do
|
46
53
|
dummy_notifiable_class.acts_as_notifiable :users
|
47
|
-
expect(
|
54
|
+
expect(user_target.notifications.reload.size).to eq(3)
|
48
55
|
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(-1)
|
49
|
-
expect(
|
56
|
+
expect(user_target.notifications.reload.size).to eq(3)
|
50
57
|
end
|
51
58
|
end
|
52
59
|
|
53
60
|
context ":delete_all" do
|
54
61
|
it "deletes all notifications when notifiable is deleted" do
|
55
62
|
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :delete_all
|
56
|
-
expect(
|
63
|
+
expect(user_target.notifications.reload.size).to eq(3)
|
57
64
|
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(-1)
|
58
|
-
expect(
|
65
|
+
expect(user_target.notifications.reload.size).to eq(2)
|
59
66
|
expect(@group_member.reload.group_owner?).to be_falsey
|
60
67
|
end
|
68
|
+
|
69
|
+
it "does not delete notifications of other targets when notifiable is deleted" do
|
70
|
+
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :delete_all
|
71
|
+
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(-1)
|
72
|
+
expect(user_target.notifications.filtered_by_instance(@notifiable_1).count).to eq(0)
|
73
|
+
expect(dummy_target.notifications.filtered_by_instance(@notifiable_1).count).to eq(1)
|
74
|
+
end
|
61
75
|
end
|
62
76
|
|
63
77
|
context ":destroy" do
|
64
78
|
it "destroies all notifications when notifiable is deleted" do
|
65
79
|
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :destroy
|
66
|
-
expect(
|
80
|
+
expect(user_target.notifications.reload.size).to eq(3)
|
67
81
|
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(-1)
|
68
|
-
expect(
|
82
|
+
expect(user_target.notifications.reload.size).to eq(2)
|
69
83
|
expect(@group_member.reload.group_owner?).to be_falsey
|
70
84
|
end
|
85
|
+
|
86
|
+
it "does not destroy notifications of other targets when notifiable is deleted" do
|
87
|
+
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :destroy
|
88
|
+
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(-1)
|
89
|
+
expect(user_target.notifications.filtered_by_instance(@notifiable_1).count).to eq(0)
|
90
|
+
expect(dummy_target.notifications.filtered_by_instance(@notifiable_1).count).to eq(1)
|
91
|
+
end
|
71
92
|
end
|
72
93
|
|
73
94
|
context ":restrict_with_exception" do
|
74
95
|
it "can not be deleted when it has generated notifications" do
|
75
96
|
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :restrict_with_exception
|
76
|
-
expect(
|
97
|
+
expect(user_target.notifications.reload.size).to eq(3)
|
77
98
|
expect { @notifiable_1.destroy }.to raise_error(ActiveRecord::DeleteRestrictionError)
|
78
99
|
end
|
79
100
|
end
|
80
101
|
|
102
|
+
context ":restrict_with_error" do
|
103
|
+
it "can not be deleted when it has generated notifications" do
|
104
|
+
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :restrict_with_error
|
105
|
+
expect(user_target.notifications.reload.size).to eq(3)
|
106
|
+
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(0)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
81
110
|
context ":update_group_and_delete_all" do
|
82
111
|
it "deletes all notifications and update notification group when notifiable is deleted" do
|
83
112
|
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :update_group_and_delete_all
|
84
|
-
expect(
|
113
|
+
expect(user_target.notifications.reload.size).to eq(3)
|
114
|
+
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(-1)
|
115
|
+
expect(user_target.notifications.reload.size).to eq(2)
|
116
|
+
expect(@group_member.reload.group_owner?).to be_truthy
|
117
|
+
end
|
118
|
+
|
119
|
+
it "does not delete notifications of other targets when notifiable is deleted" do
|
120
|
+
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :update_group_and_delete_all
|
121
|
+
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(-1)
|
122
|
+
expect(user_target.notifications.filtered_by_instance(@notifiable_1).count).to eq(0)
|
123
|
+
expect(dummy_target.notifications.filtered_by_instance(@notifiable_1).count).to eq(1)
|
124
|
+
end
|
125
|
+
|
126
|
+
it "does not update notification group when notifiable is deleted" do
|
127
|
+
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :update_group_and_delete_all
|
85
128
|
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(-1)
|
86
|
-
expect(dummy_target.notifications.reload.size).to eq(2)
|
87
129
|
expect(@group_member.reload.group_owner?).to be_truthy
|
130
|
+
expect(@other_target_group_member.reload.group_owner?).to be_falsey
|
88
131
|
end
|
89
132
|
end
|
90
133
|
|
91
134
|
context ":update_group_and_destroy" do
|
92
135
|
it "destroies all notifications and update notification group when notifiable is deleted" do
|
93
136
|
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :update_group_and_destroy
|
94
|
-
expect(
|
137
|
+
expect(user_target.notifications.reload.size).to eq(3)
|
138
|
+
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(-1)
|
139
|
+
expect(user_target.notifications.reload.size).to eq(2)
|
140
|
+
expect(@group_member.reload.group_owner?).to be_truthy
|
141
|
+
end
|
142
|
+
|
143
|
+
it "does not destroy notifications of other targets when notifiable is deleted" do
|
144
|
+
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :update_group_and_destroy
|
145
|
+
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(-1)
|
146
|
+
expect(user_target.notifications.filtered_by_instance(@notifiable_1).count).to eq(0)
|
147
|
+
expect(dummy_target.notifications.filtered_by_instance(@notifiable_1).count).to eq(1)
|
148
|
+
end
|
149
|
+
|
150
|
+
it "does not update notification group when notifiable is deleted" do
|
151
|
+
dummy_notifiable_class.acts_as_notifiable :users, dependent_notifications: :update_group_and_destroy
|
95
152
|
expect { @notifiable_1.destroy }.to change(dummy_notifiable_class, :count).by(-1)
|
96
|
-
expect(dummy_target.notifications.reload.size).to eq(2)
|
97
153
|
expect(@group_member.reload.group_owner?).to be_truthy
|
154
|
+
expect(@other_target_group_member.reload.group_owner?).to be_falsey
|
98
155
|
end
|
99
156
|
end
|
100
157
|
end
|
@@ -134,9 +191,13 @@ describe ActivityNotification::ActsAsNotifiable do
|
|
134
191
|
|
135
192
|
context "with lambda function configuration" do
|
136
193
|
it "configure optional_targets and notifiable#optional_targets returns optional_target array" do
|
137
|
-
|
194
|
+
module AdditionalMethods
|
195
|
+
require 'custom_optional_targets/console_output'
|
196
|
+
end
|
197
|
+
dummy_notifiable_class.extend(AdditionalMethods)
|
198
|
+
dummy_notifiable_class.acts_as_notifiable :users, optional_targets: ->(notifiable, key){ key == 'dummy_key' ? [CustomOptionalTarget::ConsoleOutput.new] : [] }
|
138
199
|
expect(@notifiable.optional_targets(:users)).to eq([])
|
139
|
-
expect(@notifiable.optional_targets(:users, 'dummy_key').first).to be_a(
|
200
|
+
expect(@notifiable.optional_targets(:users, 'dummy_key').first).to be_a(CustomOptionalTarget::ConsoleOutput)
|
140
201
|
end
|
141
202
|
end
|
142
203
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -20,6 +20,11 @@ SimpleCov.start('rails') do
|
|
20
20
|
elsif Rails::VERSION::MAJOR == 4
|
21
21
|
nocov_token 'skip-rails4'
|
22
22
|
end
|
23
|
+
if ENV['AN_ORM'] == 'mongoid'
|
24
|
+
add_filter '/lib/activity_notification/orm/active_record'
|
25
|
+
else
|
26
|
+
add_filter '/lib/activity_notification/orm/mongoid'
|
27
|
+
end
|
23
28
|
end
|
24
29
|
|
25
30
|
# Testing with Devise
|
@@ -39,6 +44,8 @@ RSpec.configure do |config|
|
|
39
44
|
config.include FactoryGirl::Syntax::Methods
|
40
45
|
config.before(:all) do
|
41
46
|
FactoryGirl.reload
|
47
|
+
ActivityNotification::Notification.delete_all
|
48
|
+
ActivityNotification::Subscription.delete_all
|
42
49
|
end
|
43
50
|
config.include Devise::Test::ControllerHelpers, type: :controller
|
44
51
|
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.
|
4
|
+
version: 1.3.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: 2017-
|
11
|
+
date: 2017-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -31,33 +31,33 @@ dependencies:
|
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '5.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: activerecord
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 4.2.0
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: 4.2.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: i18n
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 0.5.0
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
60
|
+
version: 0.5.0
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: jquery-rails
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,6 +72,20 @@ dependencies:
|
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: 3.1.1
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: mongoid
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: 4.0.0
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 4.0.0
|
75
89
|
- !ruby/object:Gem::Dependency
|
76
90
|
name: sqlite3
|
77
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,28 +134,28 @@ dependencies:
|
|
120
134
|
requirements:
|
121
135
|
- - "~>"
|
122
136
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.
|
137
|
+
version: 0.14.1
|
124
138
|
type: :development
|
125
139
|
prerelease: false
|
126
140
|
version_requirements: !ruby/object:Gem::Requirement
|
127
141
|
requirements:
|
128
142
|
- - "~>"
|
129
143
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.
|
144
|
+
version: 0.14.1
|
131
145
|
- !ruby/object:Gem::Dependency
|
132
146
|
name: yard
|
133
147
|
requirement: !ruby/object:Gem::Requirement
|
134
148
|
requirements:
|
135
149
|
- - "~>"
|
136
150
|
- !ruby/object:Gem::Version
|
137
|
-
version: 0.9.
|
151
|
+
version: 0.9.8
|
138
152
|
type: :development
|
139
153
|
prerelease: false
|
140
154
|
version_requirements: !ruby/object:Gem::Requirement
|
141
155
|
requirements:
|
142
156
|
- - "~>"
|
143
157
|
- !ruby/object:Gem::Version
|
144
|
-
version: 0.9.
|
158
|
+
version: 0.9.8
|
145
159
|
- !ruby/object:Gem::Dependency
|
146
160
|
name: yard-activesupport-concern
|
147
161
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,14 +176,14 @@ dependencies:
|
|
162
176
|
requirements:
|
163
177
|
- - "~>"
|
164
178
|
- !ruby/object:Gem::Version
|
165
|
-
version: 4.2.
|
179
|
+
version: 4.2.1
|
166
180
|
type: :development
|
167
181
|
prerelease: false
|
168
182
|
version_requirements: !ruby/object:Gem::Requirement
|
169
183
|
requirements:
|
170
184
|
- - "~>"
|
171
185
|
- !ruby/object:Gem::Version
|
172
|
-
version: 4.2.
|
186
|
+
version: 4.2.1
|
173
187
|
- !ruby/object:Gem::Dependency
|
174
188
|
name: aws-sdk
|
175
189
|
requirement: !ruby/object:Gem::Requirement
|
@@ -280,6 +294,12 @@ files:
|
|
280
294
|
- lib/activity_notification/optional_targets/amazon_sns.rb
|
281
295
|
- lib/activity_notification/optional_targets/base.rb
|
282
296
|
- lib/activity_notification/optional_targets/slack.rb
|
297
|
+
- lib/activity_notification/orm/active_record.rb
|
298
|
+
- lib/activity_notification/orm/active_record/notification.rb
|
299
|
+
- lib/activity_notification/orm/active_record/subscription.rb
|
300
|
+
- lib/activity_notification/orm/mongoid.rb
|
301
|
+
- lib/activity_notification/orm/mongoid/notification.rb
|
302
|
+
- lib/activity_notification/orm/mongoid/subscription.rb
|
283
303
|
- lib/activity_notification/rails.rb
|
284
304
|
- lib/activity_notification/rails/routes.rb
|
285
305
|
- lib/activity_notification/renderable.rb
|
@@ -384,6 +404,7 @@ files:
|
|
384
404
|
- spec/rails_app/app/views/activity_notification/notifications/default/custom/_test.html.erb
|
385
405
|
- spec/rails_app/app/views/activity_notification/notifications/users/_custom_index.html.erb
|
386
406
|
- spec/rails_app/app/views/activity_notification/notifications/users/custom/_test.html.erb
|
407
|
+
- spec/rails_app/app/views/activity_notification/notifications/users/overriden/custom/_test.html.erb
|
387
408
|
- spec/rails_app/app/views/activity_notification/optional_targets/admins/amazon_sns/comment/_default.text.erb
|
388
409
|
- spec/rails_app/app/views/articles/_form.html.erb
|
389
410
|
- spec/rails_app/app/views/articles/edit.html.erb
|
@@ -416,6 +437,7 @@ files:
|
|
416
437
|
- spec/rails_app/config/initializers/wrap_parameters.rb
|
417
438
|
- spec/rails_app/config/locales/activity_notification.en.yml
|
418
439
|
- spec/rails_app/config/locales/devise.en.yml
|
440
|
+
- spec/rails_app/config/mongoid.yml
|
419
441
|
- spec/rails_app/config/routes.rb
|
420
442
|
- spec/rails_app/config/secrets.yml
|
421
443
|
- spec/rails_app/db/migrate/20160715050420_create_activity_notification_tables.rb
|
@@ -536,6 +558,7 @@ test_files:
|
|
536
558
|
- spec/rails_app/app/views/activity_notification/notifications/default/custom/_test.html.erb
|
537
559
|
- spec/rails_app/app/views/activity_notification/notifications/users/_custom_index.html.erb
|
538
560
|
- spec/rails_app/app/views/activity_notification/notifications/users/custom/_test.html.erb
|
561
|
+
- spec/rails_app/app/views/activity_notification/notifications/users/overriden/custom/_test.html.erb
|
539
562
|
- spec/rails_app/app/views/activity_notification/optional_targets/admins/amazon_sns/comment/_default.text.erb
|
540
563
|
- spec/rails_app/app/views/articles/_form.html.erb
|
541
564
|
- spec/rails_app/app/views/articles/edit.html.erb
|
@@ -568,6 +591,7 @@ test_files:
|
|
568
591
|
- spec/rails_app/config/initializers/wrap_parameters.rb
|
569
592
|
- spec/rails_app/config/locales/activity_notification.en.yml
|
570
593
|
- spec/rails_app/config/locales/devise.en.yml
|
594
|
+
- spec/rails_app/config/mongoid.yml
|
571
595
|
- spec/rails_app/config/routes.rb
|
572
596
|
- spec/rails_app/config/secrets.yml
|
573
597
|
- spec/rails_app/db/migrate/20160715050420_create_activity_notification_tables.rb
|