activity_notification 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +33 -0
  3. data/.rubocop.yml +1157 -0
  4. data/.yardopts +3 -0
  5. data/CHANGELOG.md +25 -0
  6. data/Gemfile.lock +15 -17
  7. data/README.md +154 -27
  8. data/activity_notification.gemspec +1 -1
  9. data/app/controllers/activity_notification/notifications_controller.rb +30 -104
  10. data/app/controllers/activity_notification/notifications_with_devise_controller.rb +1 -33
  11. data/app/controllers/activity_notification/subscriptions_controller.rb +184 -0
  12. data/app/controllers/activity_notification/subscriptions_with_devise_controller.rb +6 -0
  13. data/app/mailers/activity_notification/mailer.rb +3 -3
  14. data/app/views/activity_notification/notifications/default/_index.html.erb +3 -0
  15. data/app/views/activity_notification/notifications/default/index.html.erb +8 -10
  16. data/app/views/activity_notification/notifications/default/show.html.erb +24 -2
  17. data/app/views/activity_notification/subscriptions/default/_form.html.erb +52 -0
  18. data/app/views/activity_notification/subscriptions/default/_notification_keys.html.erb +89 -0
  19. data/app/views/activity_notification/subscriptions/default/_subscription.html.erb +73 -0
  20. data/app/views/activity_notification/subscriptions/default/_subscriptions.html.erb +13 -0
  21. data/app/views/activity_notification/subscriptions/default/create.js.erb +5 -0
  22. data/app/views/activity_notification/subscriptions/default/destroy.js.erb +5 -0
  23. data/app/views/activity_notification/subscriptions/default/index.html.erb +197 -0
  24. data/app/views/activity_notification/subscriptions/default/show.html.erb +177 -0
  25. data/app/views/activity_notification/subscriptions/default/subscribe.js.erb +8 -0
  26. data/app/views/activity_notification/subscriptions/default/subscribe_to_email.js.erb +6 -0
  27. data/app/views/activity_notification/subscriptions/default/unsubscribe.js.erb +8 -0
  28. data/app/views/activity_notification/subscriptions/default/unsubscribe_to_email.js.erb +6 -0
  29. data/gemfiles/Gemfile.rails-4.2.lock +18 -20
  30. data/gemfiles/Gemfile.rails-5.0.lock +18 -20
  31. data/lib/activity_notification.rb +7 -3
  32. data/lib/activity_notification/apis/notification_api.rb +95 -61
  33. data/lib/activity_notification/apis/subscription_api.rb +51 -0
  34. data/lib/activity_notification/common.rb +1 -1
  35. data/lib/activity_notification/config.rb +65 -17
  36. data/lib/activity_notification/controllers/common_controller.rb +118 -0
  37. data/lib/activity_notification/controllers/devise_authentication_controller.rb +41 -0
  38. data/lib/activity_notification/helpers/view_helpers.rb +131 -3
  39. data/lib/activity_notification/mailers/helpers.rb +6 -8
  40. data/lib/activity_notification/models/concerns/notifiable.rb +45 -27
  41. data/lib/activity_notification/models/concerns/subscriber.rb +149 -0
  42. data/lib/activity_notification/models/concerns/target.rb +100 -66
  43. data/lib/activity_notification/models/notification.rb +7 -5
  44. data/lib/activity_notification/models/subscription.rb +93 -0
  45. data/lib/activity_notification/rails/routes.rb +148 -33
  46. data/lib/activity_notification/renderable.rb +3 -4
  47. data/lib/activity_notification/roles/acts_as_notifiable.rb +14 -1
  48. data/lib/activity_notification/roles/acts_as_target.rb +11 -8
  49. data/lib/activity_notification/version.rb +1 -1
  50. data/lib/generators/activity_notification/controllers_generator.rb +2 -2
  51. data/lib/generators/activity_notification/install_generator.rb +0 -1
  52. data/lib/generators/activity_notification/migration/migration_generator.rb +8 -2
  53. data/lib/generators/activity_notification/models_generator.rb +53 -0
  54. data/lib/generators/activity_notification/views_generator.rb +7 -7
  55. data/lib/generators/templates/activity_notification.rb +17 -3
  56. data/lib/generators/templates/controllers/notifications_controller.rb +18 -17
  57. data/lib/generators/templates/controllers/notifications_with_devise_controller.rb +18 -17
  58. data/lib/generators/templates/controllers/subscriptions_controller.rb +79 -0
  59. data/lib/generators/templates/controllers/subscriptions_with_devise_controller.rb +87 -0
  60. data/lib/generators/templates/migrations/migration.rb +57 -0
  61. data/lib/generators/templates/models/README +10 -0
  62. data/lib/generators/templates/{notification → models}/notification.rb +1 -3
  63. data/lib/generators/templates/models/subscription.rb +4 -0
  64. data/spec/concerns/apis/notification_api_spec.rb +48 -11
  65. data/spec/concerns/apis/subscription_api_spec.rb +167 -0
  66. data/spec/concerns/models/notifiable_spec.rb +60 -0
  67. data/spec/concerns/models/subscriber_spec.rb +525 -0
  68. data/spec/concerns/models/target_spec.rb +271 -42
  69. data/spec/controllers/common_controller_spec.rb +25 -0
  70. data/spec/controllers/dummy_common_controller.rb +5 -0
  71. data/spec/controllers/notifications_controller_shared_examples.rb +2 -6
  72. data/spec/controllers/subscriptions_controller_shared_examples.rb +735 -0
  73. data/spec/controllers/subscriptions_controller_spec.rb +12 -0
  74. data/spec/controllers/subscriptions_with_devise_controller_spec.rb +91 -0
  75. data/spec/factories/dummy/dummy_subscriber.rb +4 -0
  76. data/spec/factories/subscriptions.rb +8 -0
  77. data/spec/generators/controllers_generator_spec.rb +25 -2
  78. data/spec/generators/migration/migration_generator_spec.rb +3 -3
  79. data/spec/generators/models_generator_spec.rb +96 -0
  80. data/spec/generators/views_generator_spec.rb +84 -0
  81. data/spec/helpers/view_helpers_spec.rb +143 -0
  82. data/spec/mailers/mailer_spec.rb +5 -4
  83. data/spec/models/dummy/dummy_subscriber_spec.rb +5 -0
  84. data/spec/models/notification_spec.rb +7 -7
  85. data/spec/models/subscription_spec.rb +158 -0
  86. data/spec/rails_app/app/controllers/users/notifications_controller.rb +67 -0
  87. data/spec/rails_app/app/controllers/users/notifications_with_devise_controller.rb +75 -0
  88. data/spec/rails_app/app/controllers/users/subscriptions_controller.rb +79 -0
  89. data/spec/rails_app/app/controllers/users/subscriptions_with_devise_controller.rb +87 -0
  90. data/spec/rails_app/app/models/admin.rb +1 -0
  91. data/spec/rails_app/app/models/dummy/dummy_subscriber.rb +4 -0
  92. data/spec/rails_app/app/models/user.rb +2 -1
  93. data/spec/rails_app/app/views/activity_notification/mailer/dummy_subscribers/test_key.text.erb +1 -0
  94. data/spec/rails_app/app/views/articles/index.html.erb +6 -0
  95. data/spec/rails_app/config/initializers/activity_notification.rb +17 -3
  96. data/spec/rails_app/config/routes.rb +2 -2
  97. data/spec/rails_app/db/migrate/20160715050420_create_activity_notification_tables.rb +33 -0
  98. data/spec/rails_app/db/schema.rb +18 -0
  99. data/spec/roles/acts_as_notifiable_spec.rb +1 -1
  100. data/spec/roles/acts_as_target_spec.rb +1 -1
  101. metadata +70 -11
  102. data/lib/generators/activity_notification/notification/notification_generator.rb +0 -20
  103. data/lib/generators/templates/active_record/migration.rb +0 -18
  104. data/spec/generators/notification/notification_generator_spec.rb +0 -41
  105. data/spec/rails_app/db/migrate/20160715050420_create_notifications.rb +0 -18
@@ -0,0 +1,177 @@
1
+ <div class="subscription_wrapper">
2
+ <div class="subscription_header">
3
+ <h1>Configured subscriptions</h1>
4
+ </div>
5
+ <div class="fields_area">
6
+ <div class="subscription" id="subscription">
7
+ <%= render 'subscription', subscription: @subscription, option_params: {} %>
8
+ </div>
9
+ </div>
10
+ </div>
11
+
12
+ <style>
13
+ .fields_area {
14
+ border: 1px solid #e5e5e5;
15
+ width: 600px;
16
+ box-sizing: border-box;
17
+ margin-bottom: 30px;
18
+ }
19
+
20
+ .fields_area .fields_wrapper {
21
+ position: relative;
22
+ background-color: #fff;
23
+ padding: 20px;
24
+ box-sizing: border-box;
25
+ border-bottom: 1px solid #e5e5e5;
26
+ }
27
+
28
+ .fields_area .fields_wrapper:last-child {
29
+ border-bottom: none;
30
+ }
31
+
32
+ .fields_area .fields_wrapper .fields_title_wrapper {
33
+ margin-bottom: 16px;
34
+ border-bottom: none;
35
+ }
36
+
37
+ .fields_area .fields_wrapper .fields_title_wrapper .fields_title {
38
+ font-size: 16px;
39
+ font-weight: bold;
40
+ }
41
+
42
+ .fields_area .fields_wrapper .fields_title_wrapper p {
43
+ position: absolute;
44
+ top: 15px;
45
+ right: 15px;
46
+ }
47
+
48
+ .fields_area .fields_wrapper .field_wrapper {
49
+ margin-bottom: 16px;
50
+ }
51
+
52
+ .fields_area .fields_wrapper .field_wrapper:last-child {
53
+ margin-bottom: 0;
54
+ }
55
+
56
+ .fields_area .fields_wrapper .field_wrapper.hidden {
57
+ display: none;
58
+ }
59
+
60
+ .fields_area .fields_wrapper .field_wrapper .field_label {
61
+ margin-bottom: 8px;
62
+ }
63
+
64
+ .fields_area .fields_wrapper .field_wrapper .field_label label {
65
+ font-size: 14px;
66
+ }
67
+
68
+ .ui label {
69
+ font-size: 14px;
70
+ }
71
+
72
+ /* button */
73
+ .ui.button button,
74
+ .ui.button .button {
75
+ cursor: pointer;
76
+ color: #4f4f4f;
77
+ font-weight: bold;
78
+ font-size: 12px;
79
+ padding: 10px 14px;
80
+ margin-left: 10px;
81
+ border: 1px solid #e5e5e5;
82
+ background-color: #fafafa;
83
+ }
84
+
85
+ .ui.button button:first-child,
86
+ .ui.button .button:first-child {
87
+ margin-left: 0;
88
+ }
89
+
90
+ .ui.text_field input {
91
+ margin: 0;
92
+ outline: 0;
93
+ padding: 10px;
94
+ font-size: 14px;
95
+ border: 1px solid #e5e5e5;
96
+ border-radius: 3px;
97
+ box-shadow: 0 0 0 0 transparent inset;
98
+ }
99
+
100
+ /* checkbox */
101
+ .ui.checkbox {
102
+ position: relative;
103
+ left: 300px;
104
+ margin-top: -26px;
105
+ }
106
+
107
+ .ui.checkbox input {
108
+ position: absolute;
109
+ margin-left: -9999px;
110
+ visibility: hidden;
111
+ }
112
+
113
+ .ui.checkbox .slider {
114
+ display: block;
115
+ position: relative;
116
+ cursor: pointer;
117
+ outline: none;
118
+ user-select: none;
119
+
120
+ padding: 2px;
121
+ width: 36px;
122
+ height: 20px;
123
+ background-color: #dddddd;
124
+ border-radius: 20px;
125
+ }
126
+
127
+ .ui.checkbox .slider:before,
128
+ .ui.checkbox .slider:after {
129
+ display: block;
130
+ position: absolute;
131
+ top: 1px;
132
+ left: 1px;
133
+ bottom: 1px;
134
+ content: "";
135
+ }
136
+
137
+ .ui.checkbox .slider:before {
138
+ right: 1px;
139
+ background-color: #f1f1f1;
140
+ border-radius: 20px;
141
+ transition: background 0.4s;
142
+ }
143
+
144
+ .ui.checkbox .slider:after {
145
+ width: 20px;
146
+ background-color: #fff;
147
+ border-radius: 100%;
148
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
149
+ transition: margin 0.4s;
150
+ }
151
+
152
+ .ui.checkbox input:checked + .slider:before {
153
+ background-color: #8ce196;
154
+ }
155
+
156
+ .ui.checkbox input:checked + .slider:after {
157
+ margin-left: 18px;
158
+ }
159
+ </style>
160
+
161
+ <script>
162
+ loadSubscription();
163
+ function loadSubscription() {
164
+ $(".field_wrapper.subscribing").find("input[type='checkbox']").change(function () {
165
+ $thisFieldWrapper = $(this).parent().parent().parent().parent();
166
+ if ($(this).prop('checked')) {
167
+ $thisFieldWrapper.next().slideDown();
168
+ } else {
169
+ $thisFieldWrapper.next().slideUp();
170
+ setTimeout(function () {
171
+ $thisFieldWrapper.next().find("input[type='checkbox']").prop("checked", false);
172
+ }, 400);
173
+ }
174
+ })
175
+ }
176
+ </script>
177
+
@@ -0,0 +1,8 @@
1
+ setTimeout(function () {
2
+ $("#subscriptions").html("<%= escape_javascript( render 'subscriptions', subscriptions: @subscriptions, option_params: @index_options ) %>");
3
+ $("#subscription").html("<%= escape_javascript( render 'subscription', subscription: @subscription, option_params: {} ) %>");
4
+ }, 400);
5
+ $("#notification_keys").html("<%= escape_javascript( render 'notification_keys', target: @target, notification_keys: @notification_keys, option_params: @index_options ) %>");
6
+ $("#subscription_form").html("<%= escape_javascript( render 'form', target: @target, option_params: @index_options ) %>");
7
+
8
+ loadSubscription();
@@ -0,0 +1,6 @@
1
+ $("#subscriptions").html("<%= escape_javascript( render 'subscriptions', subscriptions: @subscriptions, option_params: @index_options ) %>");
2
+ $("#subscription").html("<%= escape_javascript( render 'subscription', subscription: @subscription, option_params: {} ) %>");
3
+ $("#notification_keys").html("<%= escape_javascript( render 'notification_keys', target: @target, notification_keys: @notification_keys, option_params: @index_options ) %>");
4
+ $("#subscription_form").html("<%= escape_javascript( render 'form', target: @target, option_params: @index_options ) %>");
5
+
6
+ loadSubscription();
@@ -0,0 +1,8 @@
1
+ setTimeout(function () {
2
+ $("#subscriptions").html("<%= escape_javascript( render 'subscriptions', subscriptions: @subscriptions, option_params: @index_options ) %>");
3
+ $("#subscription").html("<%= escape_javascript( render 'subscription', subscription: @subscription, option_params: {} ) %>");
4
+ }, 400);
5
+ $("#notification_keys").html("<%= escape_javascript( render 'notification_keys', target: @target, notification_keys: @notification_keys, option_params: @index_options ) %>");
6
+ $("#subscription_form").html("<%= escape_javascript( render 'form', target: @target, option_params: @index_options ) %>");
7
+
8
+ loadSubscription();
@@ -0,0 +1,6 @@
1
+ $("#subscriptions").html("<%= escape_javascript( render 'subscriptions', subscriptions: @subscriptions, option_params: @index_options ) %>");
2
+ $("#subscription").html("<%= escape_javascript( render 'subscription', subscription: @subscription, option_params: {} ) %>");
3
+ $("#notification_keys").html("<%= escape_javascript( render 'notification_keys', target: @target, notification_keys: @notification_keys, option_params: @index_options ) %>");
4
+ $("#subscription_form").html("<%= escape_javascript( render 'form', target: @target, option_params: @index_options ) %>");
5
+
6
+ loadSubscription();
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- activity_notification (1.0.2)
4
+ activity_notification (1.1.0)
5
5
  activerecord (>= 4.2.0)
6
6
  i18n (>= 0.5.0)
7
7
  jquery-rails (>= 3.1.1)
@@ -45,20 +45,20 @@ GEM
45
45
  minitest (~> 5.1)
46
46
  thread_safe (~> 0.3, >= 0.3.4)
47
47
  tzinfo (~> 1.1)
48
- ammeter (1.1.3)
48
+ ammeter (1.1.4)
49
49
  activesupport (>= 3.0)
50
50
  railties (>= 3.0)
51
51
  rspec-rails (>= 2.2)
52
52
  arel (6.0.3)
53
53
  bcrypt (3.1.11)
54
54
  builder (3.2.2)
55
- concurrent-ruby (1.0.2)
56
- coveralls (0.8.15)
55
+ concurrent-ruby (1.0.3)
56
+ coveralls (0.8.17)
57
57
  json (>= 1.8, < 3)
58
58
  simplecov (~> 0.12.0)
59
59
  term-ansicolor (~> 1.3)
60
60
  thor (~> 0.19.1)
61
- tins (>= 1.6.0, < 2)
61
+ tins (~> 1.6)
62
62
  devise (4.2.0)
63
63
  bcrypt (~> 3.0)
64
64
  orm_adapter (~> 0.1)
@@ -68,10 +68,10 @@ GEM
68
68
  diff-lcs (1.2.5)
69
69
  docile (1.1.5)
70
70
  erubis (2.7.0)
71
- factory_girl (4.7.0)
71
+ factory_girl (4.8.0)
72
72
  activesupport (>= 3.0.0)
73
- factory_girl_rails (4.7.0)
74
- factory_girl (~> 4.7.0)
73
+ factory_girl_rails (4.8.0)
74
+ factory_girl (~> 4.8.0)
75
75
  railties (>= 3.0.0)
76
76
  globalid (0.3.7)
77
77
  activesupport (>= 4.1.0)
@@ -89,13 +89,11 @@ GEM
89
89
  mime-types-data (~> 3.2015)
90
90
  mime-types-data (3.2016.0521)
91
91
  mini_portile2 (2.1.0)
92
- minitest (5.9.0)
93
- nokogiri (1.6.8)
92
+ minitest (5.10.1)
93
+ nokogiri (1.6.8.1)
94
94
  mini_portile2 (~> 2.1.0)
95
- pkg-config (~> 1.1.7)
96
95
  orm_adapter (0.5.0)
97
- pkg-config (1.1.7)
98
- rack (1.6.4)
96
+ rack (1.6.5)
99
97
  rack-test (0.6.3)
100
98
  rack (>= 1.0)
101
99
  rails (4.2.7.1)
@@ -122,10 +120,10 @@ GEM
122
120
  activesupport (= 4.2.7.1)
123
121
  rake (>= 0.8.7)
124
122
  thor (>= 0.18.1, < 2.0)
125
- rake (11.2.2)
123
+ rake (12.0.0)
126
124
  responders (2.3.0)
127
125
  railties (>= 4.2.0, < 5.1)
128
- rspec-core (3.5.2)
126
+ rspec-core (3.5.4)
129
127
  rspec-support (~> 3.5.0)
130
128
  rspec-expectations (3.5.0)
131
129
  diff-lcs (>= 1.2.0, < 2.0)
@@ -150,17 +148,17 @@ GEM
150
148
  sprockets (3.7.0)
151
149
  concurrent-ruby (~> 1.0)
152
150
  rack (> 1, < 3)
153
- sprockets-rails (3.1.1)
151
+ sprockets-rails (3.2.0)
154
152
  actionpack (>= 4.0)
155
153
  activesupport (>= 4.0)
156
154
  sprockets (>= 3.0.0)
157
155
  sqlite3 (1.3.12)
158
- term-ansicolor (1.3.2)
156
+ term-ansicolor (1.4.0)
159
157
  tins (~> 1.0)
160
- thor (0.19.1)
158
+ thor (0.19.4)
161
159
  thread_safe (0.3.5)
162
160
  timecop (0.8.1)
163
- tins (1.12.0)
161
+ tins (1.13.0)
164
162
  tzinfo (1.2.2)
165
163
  thread_safe (~> 0.1)
166
164
  warden (1.2.6)
@@ -177,7 +175,7 @@ DEPENDENCIES
177
175
  ammeter
178
176
  coveralls
179
177
  devise (~> 4.2.0)
180
- factory_girl_rails (~> 4.7.0)
178
+ factory_girl_rails (~> 4.8.0)
181
179
  rails (~> 4.2.0)
182
180
  rspec-rails (~> 3.5.1)
183
181
  simplecov (~> 0.12.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../
3
3
  specs:
4
- activity_notification (1.0.2)
4
+ activity_notification (1.1.0)
5
5
  activerecord (>= 4.2.0)
6
6
  i18n (>= 0.5.0)
7
7
  jquery-rails (>= 3.1.1)
@@ -47,20 +47,20 @@ GEM
47
47
  i18n (~> 0.7)
48
48
  minitest (~> 5.1)
49
49
  tzinfo (~> 1.1)
50
- ammeter (1.1.3)
50
+ ammeter (1.1.4)
51
51
  activesupport (>= 3.0)
52
52
  railties (>= 3.0)
53
53
  rspec-rails (>= 2.2)
54
- arel (7.1.1)
54
+ arel (7.1.4)
55
55
  bcrypt (3.1.11)
56
56
  builder (3.2.2)
57
- concurrent-ruby (1.0.2)
58
- coveralls (0.8.15)
57
+ concurrent-ruby (1.0.3)
58
+ coveralls (0.8.17)
59
59
  json (>= 1.8, < 3)
60
60
  simplecov (~> 0.12.0)
61
61
  term-ansicolor (~> 1.3)
62
62
  thor (~> 0.19.1)
63
- tins (>= 1.6.0, < 2)
63
+ tins (~> 1.6)
64
64
  devise (4.2.0)
65
65
  bcrypt (~> 3.0)
66
66
  orm_adapter (~> 0.1)
@@ -70,10 +70,10 @@ GEM
70
70
  diff-lcs (1.2.5)
71
71
  docile (1.1.5)
72
72
  erubis (2.7.0)
73
- factory_girl (4.7.0)
73
+ factory_girl (4.8.0)
74
74
  activesupport (>= 3.0.0)
75
- factory_girl_rails (4.7.0)
76
- factory_girl (~> 4.7.0)
75
+ factory_girl_rails (4.8.0)
76
+ factory_girl (~> 4.8.0)
77
77
  railties (>= 3.0.0)
78
78
  globalid (0.3.7)
79
79
  activesupport (>= 4.1.0)
@@ -92,13 +92,11 @@ GEM
92
92
  mime-types-data (~> 3.2015)
93
93
  mime-types-data (3.2016.0521)
94
94
  mini_portile2 (2.1.0)
95
- minitest (5.9.0)
95
+ minitest (5.10.1)
96
96
  nio4r (1.2.1)
97
- nokogiri (1.6.8)
97
+ nokogiri (1.6.8.1)
98
98
  mini_portile2 (~> 2.1.0)
99
- pkg-config (~> 1.1.7)
100
99
  orm_adapter (0.5.0)
101
- pkg-config (1.1.7)
102
100
  rack (2.0.1)
103
101
  rack-test (0.6.3)
104
102
  rack (>= 1.0)
@@ -129,10 +127,10 @@ GEM
129
127
  method_source
130
128
  rake (>= 0.8.7)
131
129
  thor (>= 0.18.1, < 2.0)
132
- rake (11.2.2)
130
+ rake (12.0.0)
133
131
  responders (2.3.0)
134
132
  railties (>= 4.2.0, < 5.1)
135
- rspec-core (3.5.2)
133
+ rspec-core (3.5.4)
136
134
  rspec-support (~> 3.5.0)
137
135
  rspec-expectations (3.5.0)
138
136
  diff-lcs (>= 1.2.0, < 2.0)
@@ -157,17 +155,17 @@ GEM
157
155
  sprockets (3.7.0)
158
156
  concurrent-ruby (~> 1.0)
159
157
  rack (> 1, < 3)
160
- sprockets-rails (3.1.1)
158
+ sprockets-rails (3.2.0)
161
159
  actionpack (>= 4.0)
162
160
  activesupport (>= 4.0)
163
161
  sprockets (>= 3.0.0)
164
162
  sqlite3 (1.3.12)
165
- term-ansicolor (1.3.2)
163
+ term-ansicolor (1.4.0)
166
164
  tins (~> 1.0)
167
- thor (0.19.1)
165
+ thor (0.19.4)
168
166
  thread_safe (0.3.5)
169
167
  timecop (0.8.1)
170
- tins (1.12.0)
168
+ tins (1.13.0)
171
169
  tzinfo (1.2.2)
172
170
  thread_safe (~> 0.1)
173
171
  warden (1.2.6)
@@ -187,7 +185,7 @@ DEPENDENCIES
187
185
  ammeter
188
186
  coveralls
189
187
  devise (~> 4.2.0)
190
- factory_girl_rails (~> 4.7.0)
188
+ factory_girl_rails (~> 4.8.0)
191
189
  rails (~> 5.0.0)
192
190
  rails-controller-testing
193
191
  rspec-rails (~> 3.5.1)
@@ -6,9 +6,12 @@ module ActivityNotification
6
6
  extend ActiveSupport::Concern
7
7
  extend ActiveSupport::Autoload
8
8
 
9
- autoload :NotificationApi, 'activity_notification/apis/notification_api'
10
9
  autoload :Notification, 'activity_notification/models/notification'
10
+ autoload :NotificationApi, 'activity_notification/apis/notification_api'
11
+ autoload :Subscription, 'activity_notification/models/subscription'
12
+ autoload :SubscriptionApi, 'activity_notification/apis/subscription_api'
11
13
  autoload :Target, 'activity_notification/models/concerns/target'
14
+ autoload :Subscriber, 'activity_notification/models/concerns/subscriber'
12
15
  autoload :Notifiable, 'activity_notification/models/concerns/notifiable'
13
16
  autoload :Notifier, 'activity_notification/models/concerns/notifier'
14
17
  autoload :Group, 'activity_notification/models/concerns/group'
@@ -17,7 +20,6 @@ module ActivityNotification
17
20
  autoload :Renderable
18
21
  autoload :VERSION
19
22
 
20
-
21
23
  module Mailers
22
24
  autoload :Helpers, 'activity_notification/mailers/helpers'
23
25
  end
@@ -40,7 +42,7 @@ module ActivityNotification
40
42
  # config.parent_controller = 'ApplicationController'
41
43
  # config.opened_index_limit = 10
42
44
  # end
43
- def self.configure(&block)
45
+ def self.configure
44
46
  yield(config) if block_given?
45
47
  end
46
48
 
@@ -49,7 +51,9 @@ end
49
51
  # Load ActivityNotification helpers
50
52
  require 'activity_notification/helpers/polymorphic_helpers'
51
53
  require 'activity_notification/helpers/view_helpers'
54
+ require 'activity_notification/controllers/common_controller'
52
55
  require 'activity_notification/controllers/store_controller'
56
+ require 'activity_notification/controllers/devise_authentication_controller'
53
57
 
54
58
  # Load role for models
55
59
  require 'activity_notification/models'