activity_notification 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -32
  3. data/Gemfile +0 -3
  4. data/Gemfile.lock +66 -73
  5. data/README.md +190 -184
  6. data/activity_notification.gemspec +2 -3
  7. data/gemfiles/Gemfile.rails-4.2 +7 -1
  8. data/gemfiles/Gemfile.rails-4.2.lock +35 -26
  9. data/gemfiles/Gemfile.rails-5.0 +7 -1
  10. data/gemfiles/Gemfile.rails-5.0.lock +73 -64
  11. data/gemfiles/Gemfile.rails-5.1 +6 -3
  12. data/gemfiles/Gemfile.rails-5.1.lock +77 -74
  13. data/lib/activity_notification/apis/notification_api.rb +3 -3
  14. data/lib/activity_notification/models.rb +1 -1
  15. data/lib/activity_notification/models/concerns/notifiable.rb +1 -1
  16. data/lib/activity_notification/models/concerns/target.rb +1 -1
  17. data/lib/activity_notification/orm/active_record/notification.rb +7 -0
  18. data/lib/activity_notification/orm/mongoid.rb +11 -1
  19. data/lib/activity_notification/orm/mongoid/notification.rb +9 -2
  20. data/lib/activity_notification/orm/mongoid/subscription.rb +1 -1
  21. data/lib/activity_notification/roles/acts_as_notifiable.rb +30 -15
  22. data/lib/activity_notification/version.rb +1 -1
  23. data/spec/rails_app/app/models/admin.rb +1 -1
  24. data/spec/rails_app/app/models/article.rb +1 -1
  25. data/spec/rails_app/app/models/comment.rb +1 -1
  26. data/spec/rails_app/app/models/dummy/dummy_base.rb +10 -2
  27. data/spec/rails_app/app/models/dummy/dummy_group.rb +13 -3
  28. data/spec/rails_app/app/models/dummy/dummy_notifiable.rb +13 -3
  29. data/spec/rails_app/app/models/dummy/dummy_notifier.rb +13 -3
  30. data/spec/rails_app/app/models/dummy/dummy_subscriber.rb +12 -3
  31. data/spec/rails_app/app/models/dummy/dummy_target.rb +14 -3
  32. data/spec/rails_app/app/models/user.rb +1 -1
  33. data/spec/rails_app/config/application.rb +7 -3
  34. data/spec/rails_app/config/environment.rb +1 -1
  35. data/spec/rails_app/config/environments/development.rb +3 -1
  36. data/spec/rails_app/config/environments/test.rb +4 -1
  37. data/spec/roles/acts_as_notifiable_spec.rb +10 -6
  38. data/spec/spec_helper.rb +0 -3
  39. metadata +6 -20
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.required_ruby_version = '>= 2.1.0'
22
22
 
23
23
  s.add_dependency 'railties', '>= 4.2.0', '< 5.2'
24
- s.add_dependency 'activerecord', '>= 4.2.0'
25
24
  s.add_dependency 'i18n', '>= 0.5.0'
26
25
  s.add_dependency 'jquery-rails', '>= 3.1.1'
27
26
 
@@ -29,12 +28,12 @@ Gem::Specification.new do |s|
29
28
  s.add_development_dependency 'mysql2', '~> 0.4.6'
30
29
  s.add_development_dependency 'pg', '~> 0.20.0'
31
30
  s.add_development_dependency 'mongoid', '>= 4.0.0'
32
- s.add_development_dependency 'rspec-rails', '~> 3.5.2'
31
+ s.add_development_dependency 'rspec-rails', '~> 3.6.0'
33
32
  s.add_development_dependency 'factory_girl_rails', '~> 4.8.0'
34
33
  s.add_development_dependency 'simplecov', '~> 0.14.1'
35
34
  s.add_development_dependency 'yard', '~> 0.9.9'
36
35
  s.add_development_dependency 'yard-activesupport-concern', '~> 0.0.1'
37
- s.add_development_dependency 'devise', '~> 4.2.1'
36
+ s.add_development_dependency 'devise', '~> 4.3.0'
38
37
  s.add_development_dependency 'aws-sdk', '~> 2'
39
38
  s.add_development_dependency 'slack-notifier', '>= 1.5.1'
40
39
  end
@@ -2,10 +2,16 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec path: '../'
4
4
 
5
- gem 'rails', '~> 4.2'
5
+ gem 'rails', '~> 4.2.0'
6
+
7
+ group :development do
8
+ gem 'bullet'
9
+ end
6
10
 
7
11
  group :test do
8
12
  gem 'ammeter'
9
13
  gem 'timecop'
10
14
  gem 'coveralls', require: false
11
15
  end
16
+
17
+ gem 'dotenv-rails', groups: [:development, :test]
@@ -1,8 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- activity_notification (1.4.0)
5
- activerecord (>= 4.2.0)
4
+ activity_notification (1.4.1)
6
5
  i18n (>= 0.5.0)
7
6
  jquery-rails (>= 3.1.1)
8
7
  railties (>= 4.2.0, < 5.2)
@@ -49,17 +48,20 @@ GEM
49
48
  railties (>= 3.0)
50
49
  rspec-rails (>= 2.2)
51
50
  arel (6.0.4)
52
- aws-sdk (2.9.16)
53
- aws-sdk-resources (= 2.9.16)
54
- aws-sdk-core (2.9.16)
51
+ aws-sdk (2.9.19)
52
+ aws-sdk-resources (= 2.9.19)
53
+ aws-sdk-core (2.9.19)
55
54
  aws-sigv4 (~> 1.0)
56
55
  jmespath (~> 1.0)
57
- aws-sdk-resources (2.9.16)
58
- aws-sdk-core (= 2.9.16)
56
+ aws-sdk-resources (2.9.19)
57
+ aws-sdk-core (= 2.9.19)
59
58
  aws-sigv4 (1.0.0)
60
59
  bcrypt (3.1.11)
61
60
  bson (4.2.1)
62
61
  builder (3.2.3)
62
+ bullet (5.5.1)
63
+ activesupport (>= 3.0.0)
64
+ uniform_notifier (~> 1.10.0)
63
65
  concurrent-ruby (1.0.5)
64
66
  coveralls (0.8.21)
65
67
  json (>= 1.8, < 3)
@@ -67,14 +69,18 @@ GEM
67
69
  term-ansicolor (~> 1.3)
68
70
  thor (~> 0.19.4)
69
71
  tins (~> 1.6)
70
- devise (4.2.1)
72
+ devise (4.3.0)
71
73
  bcrypt (~> 3.0)
72
74
  orm_adapter (~> 0.1)
73
- railties (>= 4.1.0, < 5.1)
75
+ railties (>= 4.1.0, < 5.2)
74
76
  responders
75
77
  warden (~> 1.2.3)
76
78
  diff-lcs (1.3)
77
79
  docile (1.1.5)
80
+ dotenv (2.2.1)
81
+ dotenv-rails (2.2.1)
82
+ dotenv (= 2.2.1)
83
+ railties (>= 3.2, < 5.2)
78
84
  erubis (2.7.0)
79
85
  factory_girl (4.8.0)
80
86
  activesupport (>= 3.0.0)
@@ -112,7 +118,7 @@ GEM
112
118
  origin (2.3.0)
113
119
  orm_adapter (0.5.0)
114
120
  pg (0.20.0)
115
- rack (1.6.6)
121
+ rack (1.6.8)
116
122
  rack-test (0.6.3)
117
123
  rack (>= 1.0)
118
124
  rails (4.2.8)
@@ -143,23 +149,23 @@ GEM
143
149
  responders (2.4.0)
144
150
  actionpack (>= 4.2.0, < 5.3)
145
151
  railties (>= 4.2.0, < 5.3)
146
- rspec-core (3.5.4)
147
- rspec-support (~> 3.5.0)
148
- rspec-expectations (3.5.0)
152
+ rspec-core (3.6.0)
153
+ rspec-support (~> 3.6.0)
154
+ rspec-expectations (3.6.0)
149
155
  diff-lcs (>= 1.2.0, < 2.0)
150
- rspec-support (~> 3.5.0)
151
- rspec-mocks (3.5.0)
156
+ rspec-support (~> 3.6.0)
157
+ rspec-mocks (3.6.0)
152
158
  diff-lcs (>= 1.2.0, < 2.0)
153
- rspec-support (~> 3.5.0)
154
- rspec-rails (3.5.2)
159
+ rspec-support (~> 3.6.0)
160
+ rspec-rails (3.6.0)
155
161
  actionpack (>= 3.0)
156
162
  activesupport (>= 3.0)
157
163
  railties (>= 3.0)
158
- rspec-core (~> 3.5.0)
159
- rspec-expectations (~> 3.5.0)
160
- rspec-mocks (~> 3.5.0)
161
- rspec-support (~> 3.5.0)
162
- rspec-support (3.5.0)
164
+ rspec-core (~> 3.6.0)
165
+ rspec-expectations (~> 3.6.0)
166
+ rspec-mocks (~> 3.6.0)
167
+ rspec-support (~> 3.6.0)
168
+ rspec-support (3.6.0)
163
169
  simplecov (0.14.1)
164
170
  docile (~> 1.1.0)
165
171
  json (>= 1.8, < 3)
@@ -179,9 +185,10 @@ GEM
179
185
  thor (0.19.4)
180
186
  thread_safe (0.3.6)
181
187
  timecop (0.8.1)
182
- tins (1.13.2)
188
+ tins (1.14.0)
183
189
  tzinfo (1.2.3)
184
190
  thread_safe (~> 0.1)
191
+ uniform_notifier (1.10.0)
185
192
  warden (1.2.7)
186
193
  rack (>= 1.0)
187
194
  yard (0.9.9)
@@ -195,14 +202,16 @@ DEPENDENCIES
195
202
  activity_notification!
196
203
  ammeter
197
204
  aws-sdk (~> 2)
205
+ bullet
198
206
  coveralls
199
- devise (~> 4.2.1)
207
+ devise (~> 4.3.0)
208
+ dotenv-rails
200
209
  factory_girl_rails (~> 4.8.0)
201
210
  mongoid (>= 4.0.0)
202
211
  mysql2 (~> 0.4.6)
203
212
  pg (~> 0.20.0)
204
- rails (~> 4.2)
205
- rspec-rails (~> 3.5.2)
213
+ rails (~> 4.2.0)
214
+ rspec-rails (~> 3.6.0)
206
215
  simplecov (~> 0.14.1)
207
216
  slack-notifier (>= 1.5.1)
208
217
  sqlite3 (~> 1.3.13)
@@ -2,7 +2,11 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec path: '../'
4
4
 
5
- gem 'rails', '~> 5.0'
5
+ gem 'rails', '~> 5.0.0'
6
+
7
+ group :development do
8
+ gem 'bullet'
9
+ end
6
10
 
7
11
  group :test do
8
12
  gem 'rails-controller-testing'
@@ -10,3 +14,5 @@ group :test do
10
14
  gem 'timecop'
11
15
  gem 'coveralls', require: false
12
16
  end
17
+
18
+ gem 'dotenv-rails', groups: [:development, :test]
@@ -1,8 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- activity_notification (1.4.0)
5
- activerecord (>= 4.2.0)
4
+ activity_notification (1.4.1)
6
5
  i18n (>= 0.5.0)
7
6
  jquery-rails (>= 3.1.1)
8
7
  railties (>= 4.2.0, < 5.2)
@@ -10,39 +9,39 @@ PATH
10
9
  GEM
11
10
  remote: https://rubygems.org/
12
11
  specs:
13
- actioncable (5.0.2)
14
- actionpack (= 5.0.2)
12
+ actioncable (5.0.3)
13
+ actionpack (= 5.0.3)
15
14
  nio4r (>= 1.2, < 3.0)
16
15
  websocket-driver (~> 0.6.1)
17
- actionmailer (5.0.2)
18
- actionpack (= 5.0.2)
19
- actionview (= 5.0.2)
20
- activejob (= 5.0.2)
16
+ actionmailer (5.0.3)
17
+ actionpack (= 5.0.3)
18
+ actionview (= 5.0.3)
19
+ activejob (= 5.0.3)
21
20
  mail (~> 2.5, >= 2.5.4)
22
21
  rails-dom-testing (~> 2.0)
23
- actionpack (5.0.2)
24
- actionview (= 5.0.2)
25
- activesupport (= 5.0.2)
22
+ actionpack (5.0.3)
23
+ actionview (= 5.0.3)
24
+ activesupport (= 5.0.3)
26
25
  rack (~> 2.0)
27
26
  rack-test (~> 0.6.3)
28
27
  rails-dom-testing (~> 2.0)
29
28
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
- actionview (5.0.2)
31
- activesupport (= 5.0.2)
29
+ actionview (5.0.3)
30
+ activesupport (= 5.0.3)
32
31
  builder (~> 3.1)
33
32
  erubis (~> 2.7.0)
34
33
  rails-dom-testing (~> 2.0)
35
34
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
36
- activejob (5.0.2)
37
- activesupport (= 5.0.2)
35
+ activejob (5.0.3)
36
+ activesupport (= 5.0.3)
38
37
  globalid (>= 0.3.6)
39
- activemodel (5.0.2)
40
- activesupport (= 5.0.2)
41
- activerecord (5.0.2)
42
- activemodel (= 5.0.2)
43
- activesupport (= 5.0.2)
38
+ activemodel (5.0.3)
39
+ activesupport (= 5.0.3)
40
+ activerecord (5.0.3)
41
+ activemodel (= 5.0.3)
42
+ activesupport (= 5.0.3)
44
43
  arel (~> 7.0)
45
- activesupport (5.0.2)
44
+ activesupport (5.0.3)
46
45
  concurrent-ruby (~> 1.0, >= 1.0.2)
47
46
  i18n (~> 0.7)
48
47
  minitest (~> 5.1)
@@ -52,17 +51,20 @@ GEM
52
51
  railties (>= 3.0)
53
52
  rspec-rails (>= 2.2)
54
53
  arel (7.1.4)
55
- aws-sdk (2.9.16)
56
- aws-sdk-resources (= 2.9.16)
57
- aws-sdk-core (2.9.16)
54
+ aws-sdk (2.9.19)
55
+ aws-sdk-resources (= 2.9.19)
56
+ aws-sdk-core (2.9.19)
58
57
  aws-sigv4 (~> 1.0)
59
58
  jmespath (~> 1.0)
60
- aws-sdk-resources (2.9.16)
61
- aws-sdk-core (= 2.9.16)
59
+ aws-sdk-resources (2.9.19)
60
+ aws-sdk-core (= 2.9.19)
62
61
  aws-sigv4 (1.0.0)
63
62
  bcrypt (3.1.11)
64
63
  bson (4.2.1)
65
64
  builder (3.2.3)
65
+ bullet (5.5.1)
66
+ activesupport (>= 3.0.0)
67
+ uniform_notifier (~> 1.10.0)
66
68
  concurrent-ruby (1.0.5)
67
69
  coveralls (0.8.21)
68
70
  json (>= 1.8, < 3)
@@ -70,14 +72,18 @@ GEM
70
72
  term-ansicolor (~> 1.3)
71
73
  thor (~> 0.19.4)
72
74
  tins (~> 1.6)
73
- devise (4.2.1)
75
+ devise (4.3.0)
74
76
  bcrypt (~> 3.0)
75
77
  orm_adapter (~> 0.1)
76
- railties (>= 4.1.0, < 5.1)
78
+ railties (>= 4.1.0, < 5.2)
77
79
  responders
78
80
  warden (~> 1.2.3)
79
81
  diff-lcs (1.3)
80
82
  docile (1.1.5)
83
+ dotenv (2.2.1)
84
+ dotenv-rails (2.2.1)
85
+ dotenv (= 2.2.1)
86
+ railties (>= 3.2, < 5.2)
81
87
  erubis (2.7.0)
82
88
  factory_girl (4.8.0)
83
89
  activesupport (>= 3.0.0)
@@ -114,33 +120,33 @@ GEM
114
120
  mini_portile2 (~> 2.1.0)
115
121
  orm_adapter (0.5.0)
116
122
  pg (0.20.0)
117
- rack (2.0.2)
123
+ rack (2.0.3)
118
124
  rack-test (0.6.3)
119
125
  rack (>= 1.0)
120
- rails (5.0.2)
121
- actioncable (= 5.0.2)
122
- actionmailer (= 5.0.2)
123
- actionpack (= 5.0.2)
124
- actionview (= 5.0.2)
125
- activejob (= 5.0.2)
126
- activemodel (= 5.0.2)
127
- activerecord (= 5.0.2)
128
- activesupport (= 5.0.2)
126
+ rails (5.0.3)
127
+ actioncable (= 5.0.3)
128
+ actionmailer (= 5.0.3)
129
+ actionpack (= 5.0.3)
130
+ actionview (= 5.0.3)
131
+ activejob (= 5.0.3)
132
+ activemodel (= 5.0.3)
133
+ activerecord (= 5.0.3)
134
+ activesupport (= 5.0.3)
129
135
  bundler (>= 1.3.0, < 2.0)
130
- railties (= 5.0.2)
136
+ railties (= 5.0.3)
131
137
  sprockets-rails (>= 2.0.0)
132
- rails-controller-testing (1.0.1)
133
- actionpack (~> 5.x)
134
- actionview (~> 5.x)
138
+ rails-controller-testing (1.0.2)
139
+ actionpack (~> 5.x, >= 5.0.1)
140
+ actionview (~> 5.x, >= 5.0.1)
135
141
  activesupport (~> 5.x)
136
- rails-dom-testing (2.0.2)
137
- activesupport (>= 4.2.0, < 6.0)
138
- nokogiri (~> 1.6)
142
+ rails-dom-testing (2.0.3)
143
+ activesupport (>= 4.2.0)
144
+ nokogiri (>= 1.6)
139
145
  rails-html-sanitizer (1.0.3)
140
146
  loofah (~> 2.0)
141
- railties (5.0.2)
142
- actionpack (= 5.0.2)
143
- activesupport (= 5.0.2)
147
+ railties (5.0.3)
148
+ actionpack (= 5.0.3)
149
+ activesupport (= 5.0.3)
144
150
  method_source
145
151
  rake (>= 0.8.7)
146
152
  thor (>= 0.18.1, < 2.0)
@@ -148,23 +154,23 @@ GEM
148
154
  responders (2.4.0)
149
155
  actionpack (>= 4.2.0, < 5.3)
150
156
  railties (>= 4.2.0, < 5.3)
151
- rspec-core (3.5.4)
152
- rspec-support (~> 3.5.0)
153
- rspec-expectations (3.5.0)
157
+ rspec-core (3.6.0)
158
+ rspec-support (~> 3.6.0)
159
+ rspec-expectations (3.6.0)
154
160
  diff-lcs (>= 1.2.0, < 2.0)
155
- rspec-support (~> 3.5.0)
156
- rspec-mocks (3.5.0)
161
+ rspec-support (~> 3.6.0)
162
+ rspec-mocks (3.6.0)
157
163
  diff-lcs (>= 1.2.0, < 2.0)
158
- rspec-support (~> 3.5.0)
159
- rspec-rails (3.5.2)
164
+ rspec-support (~> 3.6.0)
165
+ rspec-rails (3.6.0)
160
166
  actionpack (>= 3.0)
161
167
  activesupport (>= 3.0)
162
168
  railties (>= 3.0)
163
- rspec-core (~> 3.5.0)
164
- rspec-expectations (~> 3.5.0)
165
- rspec-mocks (~> 3.5.0)
166
- rspec-support (~> 3.5.0)
167
- rspec-support (3.5.0)
169
+ rspec-core (~> 3.6.0)
170
+ rspec-expectations (~> 3.6.0)
171
+ rspec-mocks (~> 3.6.0)
172
+ rspec-support (~> 3.6.0)
173
+ rspec-support (3.6.0)
168
174
  simplecov (0.14.1)
169
175
  docile (~> 1.1.0)
170
176
  json (>= 1.8, < 3)
@@ -184,9 +190,10 @@ GEM
184
190
  thor (0.19.4)
185
191
  thread_safe (0.3.6)
186
192
  timecop (0.8.1)
187
- tins (1.13.2)
193
+ tins (1.14.0)
188
194
  tzinfo (1.2.3)
189
195
  thread_safe (~> 0.1)
196
+ uniform_notifier (1.10.0)
190
197
  warden (1.2.7)
191
198
  rack (>= 1.0)
192
199
  websocket-driver (0.6.5)
@@ -203,15 +210,17 @@ DEPENDENCIES
203
210
  activity_notification!
204
211
  ammeter
205
212
  aws-sdk (~> 2)
213
+ bullet
206
214
  coveralls
207
- devise (~> 4.2.1)
215
+ devise (~> 4.3.0)
216
+ dotenv-rails
208
217
  factory_girl_rails (~> 4.8.0)
209
218
  mongoid (>= 4.0.0)
210
219
  mysql2 (~> 0.4.6)
211
220
  pg (~> 0.20.0)
212
- rails (~> 5.0)
221
+ rails (~> 5.0.0)
213
222
  rails-controller-testing
214
- rspec-rails (~> 3.5.2)
223
+ rspec-rails (~> 3.6.0)
215
224
  simplecov (~> 0.14.1)
216
225
  slack-notifier (>= 1.5.1)
217
226
  sqlite3 (~> 1.3.13)
@@ -2,10 +2,11 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec path: '../'
4
4
 
5
- gem 'rails', '~> 5.1'
5
+ gem 'rails', '~> 5.1.0'
6
6
 
7
- #TODO Remove it after devise supporting rails 5.1 is released
8
- gem 'devise', github: 'plataformatec/devise', ref: '83002017'
7
+ group :development do
8
+ gem 'bullet'
9
+ end
9
10
 
10
11
  group :test do
11
12
  gem 'rails-controller-testing'
@@ -13,3 +14,5 @@ group :test do
13
14
  gem 'timecop'
14
15
  gem 'coveralls', require: false
15
16
  end
17
+
18
+ gem 'dotenv-rails', groups: [:development, :test]