activity_notification 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/Gemfile.lock +56 -57
- data/activity_notification.gemspec +5 -5
- data/gemfiles/Gemfile.rails-4.2.lock +82 -83
- data/gemfiles/Gemfile.rails-5.0.lock +55 -56
- data/gemfiles/Gemfile.rails-5.1.lock +56 -57
- data/lib/activity_notification/optional_targets/amazon_sns.rb +5 -1
- data/lib/activity_notification/orm/active_record/notification.rb +6 -6
- data/lib/activity_notification/roles/acts_as_notifiable.rb +2 -2
- data/lib/activity_notification/version.rb +1 -1
- data/spec/factories/admins.rb +1 -1
- data/spec/factories/articles.rb +1 -1
- data/spec/factories/comments.rb +1 -1
- data/spec/factories/dummy/dummy_group.rb +1 -1
- data/spec/factories/dummy/dummy_notifiable.rb +1 -1
- data/spec/factories/dummy/dummy_notifier.rb +1 -1
- data/spec/factories/dummy/dummy_subscriber.rb +1 -1
- data/spec/factories/dummy/dummy_target.rb +1 -1
- data/spec/factories/notifications.rb +1 -1
- data/spec/factories/subscriptions.rb +1 -1
- data/spec/factories/users.rb +1 -1
- data/spec/spec_helper.rb +4 -4
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46b381fdf338d9e13613c5810474c548c37e74fc
|
4
|
+
data.tar.gz: 65349dbb5ded639020892a97a3046f2ce602e339
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27bfed45216134b7f054a513d306dc2e63fcb2083a25dbed40191a069644381d508b30028e7325531094319b6cf936df38bedc075e487ac18b858e2d5999bc7e
|
7
|
+
data.tar.gz: 478f4c8bf51dc05184fc81bee6a887cc029c11dfc66084fcc99b26f805f854f71b6d8540f80796d8df02f34f671fea278f7b28e895fcccf0f31e38791d1f41e1
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,16 @@
|
|
1
|
-
## 1.4.
|
1
|
+
## 1.4.4 / 2017-11-18
|
2
|
+
[Full Changelog](http://github.com/simukappu/activity_notification/compare/v1.4.3...v1.4.4)
|
3
|
+
|
4
|
+
Enhancements:
|
5
|
+
|
6
|
+
* Enable Amazon SNS optional target to use aws-sdk v3 service specific gems
|
7
|
+
|
8
|
+
Bug Fixes:
|
9
|
+
|
10
|
+
* Fix error calling #notify for callbacks in *tracked_option*
|
11
|
+
* Fix *unopened_group_member_notifier_count* and *opened_group_member_notifier_count* error when using a custom table name
|
12
|
+
|
13
|
+
## 1.4.3 / 2017-09-16
|
2
14
|
[Full Changelog](http://github.com/simukappu/activity_notification/compare/v1.4.2...v1.4.3)
|
3
15
|
|
4
16
|
Enhancements:
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
activity_notification (1.4.
|
4
|
+
activity_notification (1.4.4)
|
5
5
|
i18n (>= 0.5.0)
|
6
6
|
jquery-rails (>= 3.1.1)
|
7
7
|
railties (>= 4.2.0, < 5.2)
|
@@ -51,13 +51,14 @@ GEM
|
|
51
51
|
railties (>= 3.0)
|
52
52
|
rspec-rails (>= 2.2)
|
53
53
|
arel (8.0.0)
|
54
|
-
aws-
|
55
|
-
|
56
|
-
|
54
|
+
aws-partitions (1.36.0)
|
55
|
+
aws-sdk-core (3.7.0)
|
56
|
+
aws-partitions (~> 1.0)
|
57
57
|
aws-sigv4 (~> 1.0)
|
58
58
|
jmespath (~> 1.0)
|
59
|
-
aws-sdk-
|
60
|
-
aws-sdk-core (
|
59
|
+
aws-sdk-sns (1.1.0)
|
60
|
+
aws-sdk-core (~> 3)
|
61
|
+
aws-sigv4 (~> 1.0)
|
61
62
|
aws-sigv4 (1.0.2)
|
62
63
|
bcrypt (3.1.11)
|
63
64
|
bson (4.2.2)
|
@@ -66,12 +67,13 @@ GEM
|
|
66
67
|
activesupport (>= 3.0.0)
|
67
68
|
uniform_notifier (~> 1.10.0)
|
68
69
|
concurrent-ruby (1.0.5)
|
69
|
-
coveralls (0.
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
70
|
+
coveralls (0.8.21)
|
71
|
+
json (>= 1.8, < 3)
|
72
|
+
simplecov (~> 0.14.1)
|
73
|
+
term-ansicolor (~> 1.3)
|
74
|
+
thor (~> 0.19.4)
|
75
|
+
tins (~> 1.6)
|
76
|
+
crass (1.0.3)
|
75
77
|
devise (4.3.0)
|
76
78
|
bcrypt (~> 3.0)
|
77
79
|
orm_adapter (~> 0.1)
|
@@ -84,41 +86,40 @@ GEM
|
|
84
86
|
dotenv-rails (2.2.1)
|
85
87
|
dotenv (= 2.2.1)
|
86
88
|
railties (>= 3.2, < 5.2)
|
87
|
-
erubi (1.
|
88
|
-
|
89
|
+
erubi (1.7.0)
|
90
|
+
factory_bot (4.8.2)
|
89
91
|
activesupport (>= 3.0.0)
|
90
|
-
|
91
|
-
|
92
|
+
factory_bot_rails (4.8.2)
|
93
|
+
factory_bot (~> 4.8.2)
|
92
94
|
railties (>= 3.0.0)
|
93
|
-
globalid (0.4.
|
95
|
+
globalid (0.4.1)
|
94
96
|
activesupport (>= 4.2.0)
|
95
|
-
i18n (0.
|
97
|
+
i18n (0.9.1)
|
98
|
+
concurrent-ruby (~> 1.0)
|
96
99
|
jmespath (1.3.1)
|
97
100
|
jquery-rails (4.3.1)
|
98
101
|
rails-dom-testing (>= 1, < 3)
|
99
102
|
railties (>= 4.2.0)
|
100
103
|
thor (>= 0.14, < 2.0)
|
101
104
|
json (2.1.0)
|
102
|
-
loofah (2.
|
105
|
+
loofah (2.1.1)
|
106
|
+
crass (~> 1.0.2)
|
103
107
|
nokogiri (>= 1.5.9)
|
104
|
-
mail (2.
|
105
|
-
|
106
|
-
method_source (0.
|
107
|
-
|
108
|
-
|
109
|
-
mime-types-data (3.2016.0521)
|
110
|
-
mini_portile2 (2.2.0)
|
108
|
+
mail (2.7.0)
|
109
|
+
mini_mime (>= 0.1.1)
|
110
|
+
method_source (0.9.0)
|
111
|
+
mini_mime (1.0.0)
|
112
|
+
mini_portile2 (2.3.0)
|
111
113
|
minitest (5.10.3)
|
112
114
|
mongo (2.4.3)
|
113
115
|
bson (>= 4.2.1, < 5.0.0)
|
114
116
|
mongoid (6.2.1)
|
115
117
|
activemodel (~> 5.1)
|
116
118
|
mongo (>= 2.4.1, < 3.0.0)
|
117
|
-
|
118
|
-
mysql2 (0.4.9)
|
119
|
+
mysql2 (0.4.10)
|
119
120
|
nio4r (2.1.0)
|
120
|
-
nokogiri (1.8.
|
121
|
-
mini_portile2 (~> 2.
|
121
|
+
nokogiri (1.8.1)
|
122
|
+
mini_portile2 (~> 2.3.0)
|
122
123
|
orm_adapter (0.5.0)
|
123
124
|
pg (0.21.0)
|
124
125
|
rack (2.0.3)
|
@@ -151,30 +152,28 @@ GEM
|
|
151
152
|
method_source
|
152
153
|
rake (>= 0.8.7)
|
153
154
|
thor (>= 0.18.1, < 2.0)
|
154
|
-
rake (12.
|
155
|
+
rake (12.3.0)
|
155
156
|
responders (2.4.0)
|
156
157
|
actionpack (>= 4.2.0, < 5.3)
|
157
158
|
railties (>= 4.2.0, < 5.3)
|
158
|
-
|
159
|
-
|
160
|
-
rspec-
|
161
|
-
rspec-support (~> 3.6.0)
|
162
|
-
rspec-expectations (3.6.0)
|
159
|
+
rspec-core (3.7.0)
|
160
|
+
rspec-support (~> 3.7.0)
|
161
|
+
rspec-expectations (3.7.0)
|
163
162
|
diff-lcs (>= 1.2.0, < 2.0)
|
164
|
-
rspec-support (~> 3.
|
165
|
-
rspec-mocks (3.
|
163
|
+
rspec-support (~> 3.7.0)
|
164
|
+
rspec-mocks (3.7.0)
|
166
165
|
diff-lcs (>= 1.2.0, < 2.0)
|
167
|
-
rspec-support (~> 3.
|
168
|
-
rspec-rails (3.
|
166
|
+
rspec-support (~> 3.7.0)
|
167
|
+
rspec-rails (3.7.1)
|
169
168
|
actionpack (>= 3.0)
|
170
169
|
activesupport (>= 3.0)
|
171
170
|
railties (>= 3.0)
|
172
|
-
rspec-core (~> 3.
|
173
|
-
rspec-expectations (~> 3.
|
174
|
-
rspec-mocks (~> 3.
|
175
|
-
rspec-support (~> 3.
|
176
|
-
rspec-support (3.
|
177
|
-
simplecov (0.
|
171
|
+
rspec-core (~> 3.7.0)
|
172
|
+
rspec-expectations (~> 3.7.0)
|
173
|
+
rspec-mocks (~> 3.7.0)
|
174
|
+
rspec-support (~> 3.7.0)
|
175
|
+
rspec-support (3.7.0)
|
176
|
+
simplecov (0.14.1)
|
178
177
|
docile (~> 1.1.0)
|
179
178
|
json (>= 1.8, < 3)
|
180
179
|
simplecov-html (~> 0.10.0)
|
@@ -188,20 +187,20 @@ GEM
|
|
188
187
|
activesupport (>= 4.0)
|
189
188
|
sprockets (>= 3.0.0)
|
190
189
|
sqlite3 (1.3.13)
|
191
|
-
term-ansicolor (1.
|
192
|
-
tins (~> 0
|
193
|
-
thor (0.
|
190
|
+
term-ansicolor (1.6.0)
|
191
|
+
tins (~> 1.0)
|
192
|
+
thor (0.19.4)
|
194
193
|
thread_safe (0.3.6)
|
195
194
|
timecop (0.9.1)
|
196
|
-
tins (
|
197
|
-
tzinfo (1.2.
|
195
|
+
tins (1.15.1)
|
196
|
+
tzinfo (1.2.4)
|
198
197
|
thread_safe (~> 0.1)
|
199
198
|
uniform_notifier (1.10.0)
|
200
199
|
warden (1.2.7)
|
201
200
|
rack (>= 1.0)
|
202
201
|
websocket-driver (0.6.5)
|
203
202
|
websocket-extensions (>= 0.1.0)
|
204
|
-
websocket-extensions (0.1.
|
203
|
+
websocket-extensions (0.1.3)
|
205
204
|
yard (0.9.9)
|
206
205
|
yard-activesupport-concern (0.0.1)
|
207
206
|
yard (>= 0.8)
|
@@ -212,19 +211,19 @@ PLATFORMS
|
|
212
211
|
DEPENDENCIES
|
213
212
|
activity_notification!
|
214
213
|
ammeter
|
215
|
-
aws-sdk (~>
|
214
|
+
aws-sdk-sns (~> 1)
|
216
215
|
bullet
|
217
216
|
coveralls
|
218
217
|
devise (~> 4.3.0)
|
219
218
|
dotenv-rails
|
220
|
-
|
219
|
+
factory_bot_rails (~> 4.8.2)
|
221
220
|
mongoid (>= 4.0.0)
|
222
|
-
mysql2 (~> 0.4.
|
221
|
+
mysql2 (~> 0.4.10)
|
223
222
|
pg (~> 0.21.0)
|
224
223
|
rails (~> 5.1)
|
225
224
|
rails-controller-testing
|
226
|
-
rspec-rails (~> 3.
|
227
|
-
simplecov (~> 0
|
225
|
+
rspec-rails (~> 3.7.1)
|
226
|
+
simplecov (~> 0)
|
228
227
|
slack-notifier (>= 1.5.1)
|
229
228
|
sqlite3 (~> 1.3.13)
|
230
229
|
timecop
|
@@ -25,15 +25,15 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_dependency 'jquery-rails', '>= 3.1.1'
|
26
26
|
|
27
27
|
s.add_development_dependency 'sqlite3', '~> 1.3.13'
|
28
|
-
s.add_development_dependency 'mysql2', '~> 0.4.
|
28
|
+
s.add_development_dependency 'mysql2', '~> 0.4.10'
|
29
29
|
s.add_development_dependency 'pg', '~> 0.21.0'
|
30
30
|
s.add_development_dependency 'mongoid', '>= 4.0.0'
|
31
|
-
s.add_development_dependency 'rspec-rails', '~> 3.
|
32
|
-
s.add_development_dependency '
|
33
|
-
s.add_development_dependency 'simplecov', '~> 0
|
31
|
+
s.add_development_dependency 'rspec-rails', '~> 3.7.1'
|
32
|
+
s.add_development_dependency 'factory_bot_rails', '~> 4.8.2'
|
33
|
+
s.add_development_dependency 'simplecov', '~> 0'
|
34
34
|
s.add_development_dependency 'yard', '~> 0.9.9'
|
35
35
|
s.add_development_dependency 'yard-activesupport-concern', '~> 0.0.1'
|
36
36
|
s.add_development_dependency 'devise', '~> 4.3.0'
|
37
|
-
s.add_development_dependency 'aws-sdk', '~>
|
37
|
+
s.add_development_dependency 'aws-sdk-sns', '~> 1'
|
38
38
|
s.add_development_dependency 'slack-notifier', '>= 1.5.1'
|
39
39
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
activity_notification (1.4.
|
4
|
+
activity_notification (1.4.4)
|
5
5
|
i18n (>= 0.5.0)
|
6
6
|
jquery-rails (>= 3.1.1)
|
7
7
|
railties (>= 4.2.0, < 5.2)
|
@@ -9,36 +9,36 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actionmailer (4.2.
|
13
|
-
actionpack (= 4.2.
|
14
|
-
actionview (= 4.2.
|
15
|
-
activejob (= 4.2.
|
12
|
+
actionmailer (4.2.10)
|
13
|
+
actionpack (= 4.2.10)
|
14
|
+
actionview (= 4.2.10)
|
15
|
+
activejob (= 4.2.10)
|
16
16
|
mail (~> 2.5, >= 2.5.4)
|
17
17
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
18
|
-
actionpack (4.2.
|
19
|
-
actionview (= 4.2.
|
20
|
-
activesupport (= 4.2.
|
18
|
+
actionpack (4.2.10)
|
19
|
+
actionview (= 4.2.10)
|
20
|
+
activesupport (= 4.2.10)
|
21
21
|
rack (~> 1.6)
|
22
22
|
rack-test (~> 0.6.2)
|
23
23
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
24
24
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
25
|
-
actionview (4.2.
|
26
|
-
activesupport (= 4.2.
|
25
|
+
actionview (4.2.10)
|
26
|
+
activesupport (= 4.2.10)
|
27
27
|
builder (~> 3.1)
|
28
28
|
erubis (~> 2.7.0)
|
29
29
|
rails-dom-testing (~> 1.0, >= 1.0.5)
|
30
30
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
31
|
-
activejob (4.2.
|
32
|
-
activesupport (= 4.2.
|
31
|
+
activejob (4.2.10)
|
32
|
+
activesupport (= 4.2.10)
|
33
33
|
globalid (>= 0.3.0)
|
34
|
-
activemodel (4.2.
|
35
|
-
activesupport (= 4.2.
|
34
|
+
activemodel (4.2.10)
|
35
|
+
activesupport (= 4.2.10)
|
36
36
|
builder (~> 3.1)
|
37
|
-
activerecord (4.2.
|
38
|
-
activemodel (= 4.2.
|
39
|
-
activesupport (= 4.2.
|
37
|
+
activerecord (4.2.10)
|
38
|
+
activemodel (= 4.2.10)
|
39
|
+
activesupport (= 4.2.10)
|
40
40
|
arel (~> 6.0)
|
41
|
-
activesupport (4.2.
|
41
|
+
activesupport (4.2.10)
|
42
42
|
i18n (~> 0.7)
|
43
43
|
minitest (~> 5.1)
|
44
44
|
thread_safe (~> 0.3, >= 0.3.4)
|
@@ -48,13 +48,14 @@ GEM
|
|
48
48
|
railties (>= 3.0)
|
49
49
|
rspec-rails (>= 2.2)
|
50
50
|
arel (6.0.4)
|
51
|
-
aws-
|
52
|
-
|
53
|
-
|
51
|
+
aws-partitions (1.36.0)
|
52
|
+
aws-sdk-core (3.7.0)
|
53
|
+
aws-partitions (~> 1.0)
|
54
54
|
aws-sigv4 (~> 1.0)
|
55
55
|
jmespath (~> 1.0)
|
56
|
-
aws-sdk-
|
57
|
-
aws-sdk-core (
|
56
|
+
aws-sdk-sns (1.1.0)
|
57
|
+
aws-sdk-core (~> 3)
|
58
|
+
aws-sigv4 (~> 1.0)
|
58
59
|
aws-sigv4 (1.0.2)
|
59
60
|
bcrypt (3.1.11)
|
60
61
|
bson (4.2.2)
|
@@ -63,12 +64,13 @@ GEM
|
|
63
64
|
activesupport (>= 3.0.0)
|
64
65
|
uniform_notifier (~> 1.10.0)
|
65
66
|
concurrent-ruby (1.0.5)
|
66
|
-
coveralls (0.
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
67
|
+
coveralls (0.8.21)
|
68
|
+
json (>= 1.8, < 3)
|
69
|
+
simplecov (~> 0.14.1)
|
70
|
+
term-ansicolor (~> 1.3)
|
71
|
+
thor (~> 0.19.4)
|
72
|
+
tins (~> 1.6)
|
73
|
+
crass (1.0.3)
|
72
74
|
devise (4.3.0)
|
73
75
|
bcrypt (~> 3.0)
|
74
76
|
orm_adapter (~> 0.1)
|
@@ -82,28 +84,28 @@ GEM
|
|
82
84
|
dotenv (= 2.2.1)
|
83
85
|
railties (>= 3.2, < 5.2)
|
84
86
|
erubis (2.7.0)
|
85
|
-
|
87
|
+
factory_bot (4.8.2)
|
86
88
|
activesupport (>= 3.0.0)
|
87
|
-
|
88
|
-
|
89
|
+
factory_bot_rails (4.8.2)
|
90
|
+
factory_bot (~> 4.8.2)
|
89
91
|
railties (>= 3.0.0)
|
90
|
-
globalid (0.4.
|
92
|
+
globalid (0.4.1)
|
91
93
|
activesupport (>= 4.2.0)
|
92
|
-
i18n (0.
|
94
|
+
i18n (0.9.1)
|
95
|
+
concurrent-ruby (~> 1.0)
|
93
96
|
jmespath (1.3.1)
|
94
97
|
jquery-rails (4.3.1)
|
95
98
|
rails-dom-testing (>= 1, < 3)
|
96
99
|
railties (>= 4.2.0)
|
97
100
|
thor (>= 0.14, < 2.0)
|
98
101
|
json (2.1.0)
|
99
|
-
loofah (2.
|
102
|
+
loofah (2.1.1)
|
103
|
+
crass (~> 1.0.2)
|
100
104
|
nokogiri (>= 1.5.9)
|
101
|
-
mail (2.
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
mime-types-data (3.2016.0521)
|
106
|
-
mini_portile2 (2.2.0)
|
105
|
+
mail (2.7.0)
|
106
|
+
mini_mime (>= 0.1.1)
|
107
|
+
mini_mime (1.0.0)
|
108
|
+
mini_portile2 (2.3.0)
|
107
109
|
minitest (5.10.3)
|
108
110
|
mongo (2.4.3)
|
109
111
|
bson (>= 4.2.1, < 5.0.0)
|
@@ -112,26 +114,25 @@ GEM
|
|
112
114
|
mongo (>= 2.4.1, < 3.0.0)
|
113
115
|
origin (~> 2.3)
|
114
116
|
tzinfo (>= 0.3.37)
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
mini_portile2 (~> 2.2.0)
|
117
|
+
mysql2 (0.4.10)
|
118
|
+
nokogiri (1.8.1)
|
119
|
+
mini_portile2 (~> 2.3.0)
|
119
120
|
origin (2.3.1)
|
120
121
|
orm_adapter (0.5.0)
|
121
122
|
pg (0.21.0)
|
122
123
|
rack (1.6.8)
|
123
124
|
rack-test (0.6.3)
|
124
125
|
rack (>= 1.0)
|
125
|
-
rails (4.2.
|
126
|
-
actionmailer (= 4.2.
|
127
|
-
actionpack (= 4.2.
|
128
|
-
actionview (= 4.2.
|
129
|
-
activejob (= 4.2.
|
130
|
-
activemodel (= 4.2.
|
131
|
-
activerecord (= 4.2.
|
132
|
-
activesupport (= 4.2.
|
126
|
+
rails (4.2.10)
|
127
|
+
actionmailer (= 4.2.10)
|
128
|
+
actionpack (= 4.2.10)
|
129
|
+
actionview (= 4.2.10)
|
130
|
+
activejob (= 4.2.10)
|
131
|
+
activemodel (= 4.2.10)
|
132
|
+
activerecord (= 4.2.10)
|
133
|
+
activesupport (= 4.2.10)
|
133
134
|
bundler (>= 1.3.0, < 2.0)
|
134
|
-
railties (= 4.2.
|
135
|
+
railties (= 4.2.10)
|
135
136
|
sprockets-rails
|
136
137
|
rails-deprecated_sanitizer (1.0.3)
|
137
138
|
activesupport (>= 4.2.0.alpha)
|
@@ -141,35 +142,33 @@ GEM
|
|
141
142
|
rails-deprecated_sanitizer (>= 1.0.1)
|
142
143
|
rails-html-sanitizer (1.0.3)
|
143
144
|
loofah (~> 2.0)
|
144
|
-
railties (4.2.
|
145
|
-
actionpack (= 4.2.
|
146
|
-
activesupport (= 4.2.
|
145
|
+
railties (4.2.10)
|
146
|
+
actionpack (= 4.2.10)
|
147
|
+
activesupport (= 4.2.10)
|
147
148
|
rake (>= 0.8.7)
|
148
149
|
thor (>= 0.18.1, < 2.0)
|
149
|
-
rake (12.
|
150
|
+
rake (12.3.0)
|
150
151
|
responders (2.4.0)
|
151
152
|
actionpack (>= 4.2.0, < 5.3)
|
152
153
|
railties (>= 4.2.0, < 5.3)
|
153
|
-
|
154
|
-
|
155
|
-
rspec-
|
156
|
-
rspec-support (~> 3.6.0)
|
157
|
-
rspec-expectations (3.6.0)
|
154
|
+
rspec-core (3.7.0)
|
155
|
+
rspec-support (~> 3.7.0)
|
156
|
+
rspec-expectations (3.7.0)
|
158
157
|
diff-lcs (>= 1.2.0, < 2.0)
|
159
|
-
rspec-support (~> 3.
|
160
|
-
rspec-mocks (3.
|
158
|
+
rspec-support (~> 3.7.0)
|
159
|
+
rspec-mocks (3.7.0)
|
161
160
|
diff-lcs (>= 1.2.0, < 2.0)
|
162
|
-
rspec-support (~> 3.
|
163
|
-
rspec-rails (3.
|
161
|
+
rspec-support (~> 3.7.0)
|
162
|
+
rspec-rails (3.7.1)
|
164
163
|
actionpack (>= 3.0)
|
165
164
|
activesupport (>= 3.0)
|
166
165
|
railties (>= 3.0)
|
167
|
-
rspec-core (~> 3.
|
168
|
-
rspec-expectations (~> 3.
|
169
|
-
rspec-mocks (~> 3.
|
170
|
-
rspec-support (~> 3.
|
171
|
-
rspec-support (3.
|
172
|
-
simplecov (0.
|
166
|
+
rspec-core (~> 3.7.0)
|
167
|
+
rspec-expectations (~> 3.7.0)
|
168
|
+
rspec-mocks (~> 3.7.0)
|
169
|
+
rspec-support (~> 3.7.0)
|
170
|
+
rspec-support (3.7.0)
|
171
|
+
simplecov (0.14.1)
|
173
172
|
docile (~> 1.1.0)
|
174
173
|
json (>= 1.8, < 3)
|
175
174
|
simplecov-html (~> 0.10.0)
|
@@ -183,13 +182,13 @@ GEM
|
|
183
182
|
activesupport (>= 4.0)
|
184
183
|
sprockets (>= 3.0.0)
|
185
184
|
sqlite3 (1.3.13)
|
186
|
-
term-ansicolor (1.
|
187
|
-
tins (~> 0
|
188
|
-
thor (0.
|
185
|
+
term-ansicolor (1.6.0)
|
186
|
+
tins (~> 1.0)
|
187
|
+
thor (0.19.4)
|
189
188
|
thread_safe (0.3.6)
|
190
189
|
timecop (0.9.1)
|
191
|
-
tins (
|
192
|
-
tzinfo (1.2.
|
190
|
+
tins (1.15.1)
|
191
|
+
tzinfo (1.2.4)
|
193
192
|
thread_safe (~> 0.1)
|
194
193
|
uniform_notifier (1.10.0)
|
195
194
|
warden (1.2.7)
|
@@ -204,18 +203,18 @@ PLATFORMS
|
|
204
203
|
DEPENDENCIES
|
205
204
|
activity_notification!
|
206
205
|
ammeter
|
207
|
-
aws-sdk (~>
|
206
|
+
aws-sdk-sns (~> 1)
|
208
207
|
bullet
|
209
208
|
coveralls
|
210
209
|
devise (~> 4.3.0)
|
211
210
|
dotenv-rails
|
212
|
-
|
211
|
+
factory_bot_rails (~> 4.8.2)
|
213
212
|
mongoid (>= 4.0.0)
|
214
|
-
mysql2 (~> 0.4.
|
213
|
+
mysql2 (~> 0.4.10)
|
215
214
|
pg (~> 0.21.0)
|
216
215
|
rails (~> 4.2.0)
|
217
|
-
rspec-rails (~> 3.
|
218
|
-
simplecov (~> 0
|
216
|
+
rspec-rails (~> 3.7.1)
|
217
|
+
simplecov (~> 0)
|
219
218
|
slack-notifier (>= 1.5.1)
|
220
219
|
sqlite3 (~> 1.3.13)
|
221
220
|
timecop
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
activity_notification (1.4.
|
4
|
+
activity_notification (1.4.4)
|
5
5
|
i18n (>= 0.5.0)
|
6
6
|
jquery-rails (>= 3.1.1)
|
7
7
|
railties (>= 4.2.0, < 5.2)
|
@@ -51,13 +51,14 @@ GEM
|
|
51
51
|
railties (>= 3.0)
|
52
52
|
rspec-rails (>= 2.2)
|
53
53
|
arel (7.1.4)
|
54
|
-
aws-
|
55
|
-
|
56
|
-
|
54
|
+
aws-partitions (1.36.0)
|
55
|
+
aws-sdk-core (3.7.0)
|
56
|
+
aws-partitions (~> 1.0)
|
57
57
|
aws-sigv4 (~> 1.0)
|
58
58
|
jmespath (~> 1.0)
|
59
|
-
aws-sdk-
|
60
|
-
aws-sdk-core (
|
59
|
+
aws-sdk-sns (1.1.0)
|
60
|
+
aws-sdk-core (~> 3)
|
61
|
+
aws-sigv4 (~> 1.0)
|
61
62
|
aws-sigv4 (1.0.2)
|
62
63
|
bcrypt (3.1.11)
|
63
64
|
bson (4.2.2)
|
@@ -66,12 +67,13 @@ GEM
|
|
66
67
|
activesupport (>= 3.0.0)
|
67
68
|
uniform_notifier (~> 1.10.0)
|
68
69
|
concurrent-ruby (1.0.5)
|
69
|
-
coveralls (0.
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
70
|
+
coveralls (0.8.21)
|
71
|
+
json (>= 1.8, < 3)
|
72
|
+
simplecov (~> 0.14.1)
|
73
|
+
term-ansicolor (~> 1.3)
|
74
|
+
thor (~> 0.19.4)
|
75
|
+
tins (~> 1.6)
|
76
|
+
crass (1.0.3)
|
75
77
|
devise (4.3.0)
|
76
78
|
bcrypt (~> 3.0)
|
77
79
|
orm_adapter (~> 0.1)
|
@@ -85,40 +87,39 @@ GEM
|
|
85
87
|
dotenv (= 2.2.1)
|
86
88
|
railties (>= 3.2, < 5.2)
|
87
89
|
erubis (2.7.0)
|
88
|
-
|
90
|
+
factory_bot (4.8.2)
|
89
91
|
activesupport (>= 3.0.0)
|
90
|
-
|
91
|
-
|
92
|
+
factory_bot_rails (4.8.2)
|
93
|
+
factory_bot (~> 4.8.2)
|
92
94
|
railties (>= 3.0.0)
|
93
|
-
globalid (0.4.
|
95
|
+
globalid (0.4.1)
|
94
96
|
activesupport (>= 4.2.0)
|
95
|
-
i18n (0.
|
97
|
+
i18n (0.9.1)
|
98
|
+
concurrent-ruby (~> 1.0)
|
96
99
|
jmespath (1.3.1)
|
97
100
|
jquery-rails (4.3.1)
|
98
101
|
rails-dom-testing (>= 1, < 3)
|
99
102
|
railties (>= 4.2.0)
|
100
103
|
thor (>= 0.14, < 2.0)
|
101
104
|
json (2.1.0)
|
102
|
-
loofah (2.
|
105
|
+
loofah (2.1.1)
|
106
|
+
crass (~> 1.0.2)
|
103
107
|
nokogiri (>= 1.5.9)
|
104
|
-
mail (2.
|
105
|
-
|
106
|
-
method_source (0.
|
107
|
-
|
108
|
-
|
109
|
-
mime-types-data (3.2016.0521)
|
110
|
-
mini_portile2 (2.2.0)
|
108
|
+
mail (2.7.0)
|
109
|
+
mini_mime (>= 0.1.1)
|
110
|
+
method_source (0.9.0)
|
111
|
+
mini_mime (1.0.0)
|
112
|
+
mini_portile2 (2.3.0)
|
111
113
|
minitest (5.10.3)
|
112
114
|
mongo (2.4.3)
|
113
115
|
bson (>= 4.2.1, < 5.0.0)
|
114
116
|
mongoid (6.1.1)
|
115
117
|
activemodel (~> 5.0)
|
116
118
|
mongo (>= 2.4.1, < 3.0.0)
|
117
|
-
|
118
|
-
mysql2 (0.4.9)
|
119
|
+
mysql2 (0.4.10)
|
119
120
|
nio4r (2.1.0)
|
120
|
-
nokogiri (1.8.
|
121
|
-
mini_portile2 (~> 2.
|
121
|
+
nokogiri (1.8.1)
|
122
|
+
mini_portile2 (~> 2.3.0)
|
122
123
|
orm_adapter (0.5.0)
|
123
124
|
pg (0.21.0)
|
124
125
|
rack (2.0.3)
|
@@ -151,30 +152,28 @@ GEM
|
|
151
152
|
method_source
|
152
153
|
rake (>= 0.8.7)
|
153
154
|
thor (>= 0.18.1, < 2.0)
|
154
|
-
rake (12.
|
155
|
+
rake (12.3.0)
|
155
156
|
responders (2.4.0)
|
156
157
|
actionpack (>= 4.2.0, < 5.3)
|
157
158
|
railties (>= 4.2.0, < 5.3)
|
158
|
-
|
159
|
-
|
160
|
-
rspec-
|
161
|
-
rspec-support (~> 3.6.0)
|
162
|
-
rspec-expectations (3.6.0)
|
159
|
+
rspec-core (3.7.0)
|
160
|
+
rspec-support (~> 3.7.0)
|
161
|
+
rspec-expectations (3.7.0)
|
163
162
|
diff-lcs (>= 1.2.0, < 2.0)
|
164
|
-
rspec-support (~> 3.
|
165
|
-
rspec-mocks (3.
|
163
|
+
rspec-support (~> 3.7.0)
|
164
|
+
rspec-mocks (3.7.0)
|
166
165
|
diff-lcs (>= 1.2.0, < 2.0)
|
167
|
-
rspec-support (~> 3.
|
168
|
-
rspec-rails (3.
|
166
|
+
rspec-support (~> 3.7.0)
|
167
|
+
rspec-rails (3.7.1)
|
169
168
|
actionpack (>= 3.0)
|
170
169
|
activesupport (>= 3.0)
|
171
170
|
railties (>= 3.0)
|
172
|
-
rspec-core (~> 3.
|
173
|
-
rspec-expectations (~> 3.
|
174
|
-
rspec-mocks (~> 3.
|
175
|
-
rspec-support (~> 3.
|
176
|
-
rspec-support (3.
|
177
|
-
simplecov (0.
|
171
|
+
rspec-core (~> 3.7.0)
|
172
|
+
rspec-expectations (~> 3.7.0)
|
173
|
+
rspec-mocks (~> 3.7.0)
|
174
|
+
rspec-support (~> 3.7.0)
|
175
|
+
rspec-support (3.7.0)
|
176
|
+
simplecov (0.14.1)
|
178
177
|
docile (~> 1.1.0)
|
179
178
|
json (>= 1.8, < 3)
|
180
179
|
simplecov-html (~> 0.10.0)
|
@@ -188,20 +187,20 @@ GEM
|
|
188
187
|
activesupport (>= 4.0)
|
189
188
|
sprockets (>= 3.0.0)
|
190
189
|
sqlite3 (1.3.13)
|
191
|
-
term-ansicolor (1.
|
192
|
-
tins (~> 0
|
193
|
-
thor (0.
|
190
|
+
term-ansicolor (1.6.0)
|
191
|
+
tins (~> 1.0)
|
192
|
+
thor (0.19.4)
|
194
193
|
thread_safe (0.3.6)
|
195
194
|
timecop (0.9.1)
|
196
|
-
tins (
|
197
|
-
tzinfo (1.2.
|
195
|
+
tins (1.15.1)
|
196
|
+
tzinfo (1.2.4)
|
198
197
|
thread_safe (~> 0.1)
|
199
198
|
uniform_notifier (1.10.0)
|
200
199
|
warden (1.2.7)
|
201
200
|
rack (>= 1.0)
|
202
201
|
websocket-driver (0.6.5)
|
203
202
|
websocket-extensions (>= 0.1.0)
|
204
|
-
websocket-extensions (0.1.
|
203
|
+
websocket-extensions (0.1.3)
|
205
204
|
yard (0.9.9)
|
206
205
|
yard-activesupport-concern (0.0.1)
|
207
206
|
yard (>= 0.8)
|
@@ -212,19 +211,19 @@ PLATFORMS
|
|
212
211
|
DEPENDENCIES
|
213
212
|
activity_notification!
|
214
213
|
ammeter
|
215
|
-
aws-sdk (~>
|
214
|
+
aws-sdk-sns (~> 1)
|
216
215
|
bullet
|
217
216
|
coveralls
|
218
217
|
devise (~> 4.3.0)
|
219
218
|
dotenv-rails
|
220
|
-
|
219
|
+
factory_bot_rails (~> 4.8.2)
|
221
220
|
mongoid (>= 4.0.0)
|
222
|
-
mysql2 (~> 0.4.
|
221
|
+
mysql2 (~> 0.4.10)
|
223
222
|
pg (~> 0.21.0)
|
224
223
|
rails (~> 5.0.0)
|
225
224
|
rails-controller-testing
|
226
|
-
rspec-rails (~> 3.
|
227
|
-
simplecov (~> 0
|
225
|
+
rspec-rails (~> 3.7.1)
|
226
|
+
simplecov (~> 0)
|
228
227
|
slack-notifier (>= 1.5.1)
|
229
228
|
sqlite3 (~> 1.3.13)
|
230
229
|
timecop
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
activity_notification (1.4.
|
4
|
+
activity_notification (1.4.4)
|
5
5
|
i18n (>= 0.5.0)
|
6
6
|
jquery-rails (>= 3.1.1)
|
7
7
|
railties (>= 4.2.0, < 5.2)
|
@@ -51,13 +51,14 @@ GEM
|
|
51
51
|
railties (>= 3.0)
|
52
52
|
rspec-rails (>= 2.2)
|
53
53
|
arel (8.0.0)
|
54
|
-
aws-
|
55
|
-
|
56
|
-
|
54
|
+
aws-partitions (1.36.0)
|
55
|
+
aws-sdk-core (3.7.0)
|
56
|
+
aws-partitions (~> 1.0)
|
57
57
|
aws-sigv4 (~> 1.0)
|
58
58
|
jmespath (~> 1.0)
|
59
|
-
aws-sdk-
|
60
|
-
aws-sdk-core (
|
59
|
+
aws-sdk-sns (1.1.0)
|
60
|
+
aws-sdk-core (~> 3)
|
61
|
+
aws-sigv4 (~> 1.0)
|
61
62
|
aws-sigv4 (1.0.2)
|
62
63
|
bcrypt (3.1.11)
|
63
64
|
bson (4.2.2)
|
@@ -66,12 +67,13 @@ GEM
|
|
66
67
|
activesupport (>= 3.0.0)
|
67
68
|
uniform_notifier (~> 1.10.0)
|
68
69
|
concurrent-ruby (1.0.5)
|
69
|
-
coveralls (0.
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
70
|
+
coveralls (0.8.21)
|
71
|
+
json (>= 1.8, < 3)
|
72
|
+
simplecov (~> 0.14.1)
|
73
|
+
term-ansicolor (~> 1.3)
|
74
|
+
thor (~> 0.19.4)
|
75
|
+
tins (~> 1.6)
|
76
|
+
crass (1.0.3)
|
75
77
|
devise (4.3.0)
|
76
78
|
bcrypt (~> 3.0)
|
77
79
|
orm_adapter (~> 0.1)
|
@@ -84,41 +86,40 @@ GEM
|
|
84
86
|
dotenv-rails (2.2.1)
|
85
87
|
dotenv (= 2.2.1)
|
86
88
|
railties (>= 3.2, < 5.2)
|
87
|
-
erubi (1.
|
88
|
-
|
89
|
+
erubi (1.7.0)
|
90
|
+
factory_bot (4.8.2)
|
89
91
|
activesupport (>= 3.0.0)
|
90
|
-
|
91
|
-
|
92
|
+
factory_bot_rails (4.8.2)
|
93
|
+
factory_bot (~> 4.8.2)
|
92
94
|
railties (>= 3.0.0)
|
93
|
-
globalid (0.4.
|
95
|
+
globalid (0.4.1)
|
94
96
|
activesupport (>= 4.2.0)
|
95
|
-
i18n (0.
|
97
|
+
i18n (0.9.1)
|
98
|
+
concurrent-ruby (~> 1.0)
|
96
99
|
jmespath (1.3.1)
|
97
100
|
jquery-rails (4.3.1)
|
98
101
|
rails-dom-testing (>= 1, < 3)
|
99
102
|
railties (>= 4.2.0)
|
100
103
|
thor (>= 0.14, < 2.0)
|
101
104
|
json (2.1.0)
|
102
|
-
loofah (2.
|
105
|
+
loofah (2.1.1)
|
106
|
+
crass (~> 1.0.2)
|
103
107
|
nokogiri (>= 1.5.9)
|
104
|
-
mail (2.
|
105
|
-
|
106
|
-
method_source (0.
|
107
|
-
|
108
|
-
|
109
|
-
mime-types-data (3.2016.0521)
|
110
|
-
mini_portile2 (2.2.0)
|
108
|
+
mail (2.7.0)
|
109
|
+
mini_mime (>= 0.1.1)
|
110
|
+
method_source (0.9.0)
|
111
|
+
mini_mime (1.0.0)
|
112
|
+
mini_portile2 (2.3.0)
|
111
113
|
minitest (5.10.3)
|
112
114
|
mongo (2.4.3)
|
113
115
|
bson (>= 4.2.1, < 5.0.0)
|
114
116
|
mongoid (6.2.1)
|
115
117
|
activemodel (~> 5.1)
|
116
118
|
mongo (>= 2.4.1, < 3.0.0)
|
117
|
-
|
118
|
-
mysql2 (0.4.9)
|
119
|
+
mysql2 (0.4.10)
|
119
120
|
nio4r (2.1.0)
|
120
|
-
nokogiri (1.8.
|
121
|
-
mini_portile2 (~> 2.
|
121
|
+
nokogiri (1.8.1)
|
122
|
+
mini_portile2 (~> 2.3.0)
|
122
123
|
orm_adapter (0.5.0)
|
123
124
|
pg (0.21.0)
|
124
125
|
rack (2.0.3)
|
@@ -151,30 +152,28 @@ GEM
|
|
151
152
|
method_source
|
152
153
|
rake (>= 0.8.7)
|
153
154
|
thor (>= 0.18.1, < 2.0)
|
154
|
-
rake (12.
|
155
|
+
rake (12.3.0)
|
155
156
|
responders (2.4.0)
|
156
157
|
actionpack (>= 4.2.0, < 5.3)
|
157
158
|
railties (>= 4.2.0, < 5.3)
|
158
|
-
|
159
|
-
|
160
|
-
rspec-
|
161
|
-
rspec-support (~> 3.6.0)
|
162
|
-
rspec-expectations (3.6.0)
|
159
|
+
rspec-core (3.7.0)
|
160
|
+
rspec-support (~> 3.7.0)
|
161
|
+
rspec-expectations (3.7.0)
|
163
162
|
diff-lcs (>= 1.2.0, < 2.0)
|
164
|
-
rspec-support (~> 3.
|
165
|
-
rspec-mocks (3.
|
163
|
+
rspec-support (~> 3.7.0)
|
164
|
+
rspec-mocks (3.7.0)
|
166
165
|
diff-lcs (>= 1.2.0, < 2.0)
|
167
|
-
rspec-support (~> 3.
|
168
|
-
rspec-rails (3.
|
166
|
+
rspec-support (~> 3.7.0)
|
167
|
+
rspec-rails (3.7.1)
|
169
168
|
actionpack (>= 3.0)
|
170
169
|
activesupport (>= 3.0)
|
171
170
|
railties (>= 3.0)
|
172
|
-
rspec-core (~> 3.
|
173
|
-
rspec-expectations (~> 3.
|
174
|
-
rspec-mocks (~> 3.
|
175
|
-
rspec-support (~> 3.
|
176
|
-
rspec-support (3.
|
177
|
-
simplecov (0.
|
171
|
+
rspec-core (~> 3.7.0)
|
172
|
+
rspec-expectations (~> 3.7.0)
|
173
|
+
rspec-mocks (~> 3.7.0)
|
174
|
+
rspec-support (~> 3.7.0)
|
175
|
+
rspec-support (3.7.0)
|
176
|
+
simplecov (0.14.1)
|
178
177
|
docile (~> 1.1.0)
|
179
178
|
json (>= 1.8, < 3)
|
180
179
|
simplecov-html (~> 0.10.0)
|
@@ -188,20 +187,20 @@ GEM
|
|
188
187
|
activesupport (>= 4.0)
|
189
188
|
sprockets (>= 3.0.0)
|
190
189
|
sqlite3 (1.3.13)
|
191
|
-
term-ansicolor (1.
|
192
|
-
tins (~> 0
|
193
|
-
thor (0.
|
190
|
+
term-ansicolor (1.6.0)
|
191
|
+
tins (~> 1.0)
|
192
|
+
thor (0.19.4)
|
194
193
|
thread_safe (0.3.6)
|
195
194
|
timecop (0.9.1)
|
196
|
-
tins (
|
197
|
-
tzinfo (1.2.
|
195
|
+
tins (1.15.1)
|
196
|
+
tzinfo (1.2.4)
|
198
197
|
thread_safe (~> 0.1)
|
199
198
|
uniform_notifier (1.10.0)
|
200
199
|
warden (1.2.7)
|
201
200
|
rack (>= 1.0)
|
202
201
|
websocket-driver (0.6.5)
|
203
202
|
websocket-extensions (>= 0.1.0)
|
204
|
-
websocket-extensions (0.1.
|
203
|
+
websocket-extensions (0.1.3)
|
205
204
|
yard (0.9.9)
|
206
205
|
yard-activesupport-concern (0.0.1)
|
207
206
|
yard (>= 0.8)
|
@@ -212,19 +211,19 @@ PLATFORMS
|
|
212
211
|
DEPENDENCIES
|
213
212
|
activity_notification!
|
214
213
|
ammeter
|
215
|
-
aws-sdk (~>
|
214
|
+
aws-sdk-sns (~> 1)
|
216
215
|
bullet
|
217
216
|
coveralls
|
218
217
|
devise (~> 4.3.0)
|
219
218
|
dotenv-rails
|
220
|
-
|
219
|
+
factory_bot_rails (~> 4.8.2)
|
221
220
|
mongoid (>= 4.0.0)
|
222
|
-
mysql2 (~> 0.4.
|
221
|
+
mysql2 (~> 0.4.10)
|
223
222
|
pg (~> 0.21.0)
|
224
223
|
rails (~> 5.1.0)
|
225
224
|
rails-controller-testing
|
226
|
-
rspec-rails (~> 3.
|
227
|
-
simplecov (~> 0
|
225
|
+
rspec-rails (~> 3.7.1)
|
226
|
+
simplecov (~> 0)
|
228
227
|
slack-notifier (>= 1.5.1)
|
229
228
|
sqlite3 (~> 1.3.13)
|
230
229
|
timecop
|
@@ -2,7 +2,11 @@ module ActivityNotification
|
|
2
2
|
module OptionalTarget
|
3
3
|
# Optional target implementation for mobile push notification or SMS using Amazon SNS.
|
4
4
|
class AmazonSNS < ActivityNotification::OptionalTarget::Base
|
5
|
-
|
5
|
+
begin
|
6
|
+
require 'aws-sdk'
|
7
|
+
rescue LoadError
|
8
|
+
require 'aws-sdk-sns'
|
9
|
+
end
|
6
10
|
|
7
11
|
# Initialize method to prepare Aws::SNS::Client
|
8
12
|
# @param [Hash] options Options for initializing
|
@@ -227,11 +227,11 @@ module ActivityNotification
|
|
227
227
|
unopened_group_member_notifier_counts = target.notifications
|
228
228
|
.unopened_index_group_members_only
|
229
229
|
.includes(:group_owner)
|
230
|
-
.where(
|
231
|
-
.where.not(
|
230
|
+
.where("group_owners_#{self.class.table_name}.notifier_type = #{self.class.table_name}.notifier_type")
|
231
|
+
.where.not("group_owners_#{self.class.table_name}.notifier_id = #{self.class.table_name}.notifier_id")
|
232
232
|
.references(:group_owner)
|
233
233
|
.group(:group_owner_id, :notifier_type)
|
234
|
-
.count(
|
234
|
+
.count("distinct #{self.class.table_name}.notifier_id")
|
235
235
|
unopened_group_member_notifier_counts[[id, notifier_type]] || 0
|
236
236
|
end
|
237
237
|
|
@@ -246,11 +246,11 @@ module ActivityNotification
|
|
246
246
|
opened_group_member_notifier_counts = target.notifications
|
247
247
|
.opened_index_group_members_only(limit)
|
248
248
|
.includes(:group_owner)
|
249
|
-
.where(
|
250
|
-
.where.not(
|
249
|
+
.where("group_owners_#{self.class.table_name}.notifier_type = #{self.class.table_name}.notifier_type")
|
250
|
+
.where.not("group_owners_#{self.class.table_name}.notifier_id = #{self.class.table_name}.notifier_id")
|
251
251
|
.references(:group_owner)
|
252
252
|
.group(:group_owner_id, :notifier_type)
|
253
|
-
.count(
|
253
|
+
.count("distinct #{self.class.table_name}.notifier_id")
|
254
254
|
count = opened_group_member_notifier_counts[[id, notifier_type]] || 0
|
255
255
|
count > limit ? limit : count
|
256
256
|
end
|
@@ -259,8 +259,8 @@ module ActivityNotification
|
|
259
259
|
add_tracked_callback(tracked_callbacks, :create, ->{ notify target_type, tracked_option })
|
260
260
|
add_tracked_callback(tracked_callbacks, :update, ->{ notify target_type, tracked_option })
|
261
261
|
else
|
262
|
-
add_tracked_callback(tracked_callbacks, :create, ->{ notify target_type,
|
263
|
-
add_tracked_callback(tracked_callbacks, :update, ->{ notify target_type,
|
262
|
+
add_tracked_callback(tracked_callbacks, :create, ->{ notify target_type, tracked_option.merge(key: notification_key_for_tracked_creation) })
|
263
|
+
add_tracked_callback(tracked_callbacks, :update, ->{ notify target_type, tracked_option.merge(key: notification_key_for_tracked_update) })
|
264
264
|
end
|
265
265
|
{ tracked: tracked_callbacks }
|
266
266
|
end
|
data/spec/factories/admins.rb
CHANGED
data/spec/factories/articles.rb
CHANGED
data/spec/factories/comments.rb
CHANGED
data/spec/factories/users.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -34,7 +34,7 @@ require 'rails_app/config/environment'
|
|
34
34
|
|
35
35
|
require 'rspec/rails'
|
36
36
|
require 'ammeter/init'
|
37
|
-
require '
|
37
|
+
require 'factory_bot_rails'
|
38
38
|
require 'activity_notification'
|
39
39
|
|
40
40
|
def clear_database
|
@@ -44,10 +44,10 @@ def clear_database
|
|
44
44
|
end
|
45
45
|
|
46
46
|
RSpec.configure do |config|
|
47
|
-
config.include
|
47
|
+
config.include FactoryBot::Syntax::Methods
|
48
48
|
config.before(:all) do
|
49
|
-
|
49
|
+
FactoryBot.reload
|
50
50
|
clear_database
|
51
51
|
end
|
52
52
|
config.include Devise::Test::ControllerHelpers, type: :controller
|
53
|
-
end
|
53
|
+
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.
|
4
|
+
version: 1.4.4
|
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-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -78,14 +78,14 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 0.4.
|
81
|
+
version: 0.4.10
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 0.4.
|
88
|
+
version: 0.4.10
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: pg
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,42 +120,42 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 3.
|
123
|
+
version: 3.7.1
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 3.
|
130
|
+
version: 3.7.1
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
|
-
name:
|
132
|
+
name: factory_bot_rails
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: 4.8.
|
137
|
+
version: 4.8.2
|
138
138
|
type: :development
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: 4.8.
|
144
|
+
version: 4.8.2
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: simplecov
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: 0
|
151
|
+
version: '0'
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: 0
|
158
|
+
version: '0'
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: yard
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
@@ -199,19 +199,19 @@ dependencies:
|
|
199
199
|
- !ruby/object:Gem::Version
|
200
200
|
version: 4.3.0
|
201
201
|
- !ruby/object:Gem::Dependency
|
202
|
-
name: aws-sdk
|
202
|
+
name: aws-sdk-sns
|
203
203
|
requirement: !ruby/object:Gem::Requirement
|
204
204
|
requirements:
|
205
205
|
- - "~>"
|
206
206
|
- !ruby/object:Gem::Version
|
207
|
-
version: '
|
207
|
+
version: '1'
|
208
208
|
type: :development
|
209
209
|
prerelease: false
|
210
210
|
version_requirements: !ruby/object:Gem::Requirement
|
211
211
|
requirements:
|
212
212
|
- - "~>"
|
213
213
|
- !ruby/object:Gem::Version
|
214
|
-
version: '
|
214
|
+
version: '1'
|
215
215
|
- !ruby/object:Gem::Dependency
|
216
216
|
name: slack-notifier
|
217
217
|
requirement: !ruby/object:Gem::Requirement
|