|
40 | 40 | SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(formatters) |
41 | 41 |
|
42 | 42 | SimpleCov.start 'rails' do |
| 43 | + add_filter '/app/assets' |
| 44 | + add_filter '/app/javascript' |
| 45 | + add_filter '/app/views' |
43 | 46 | add_filter '/bin/' |
44 | 47 | add_filter '/config/' |
45 | 48 | add_filter '/coverage/' |
|
57 | 60 | add_filter '/tmp/' |
58 | 61 | add_filter '/vendor/' |
59 | 62 |
|
60 | | - # Additional coverage groups |
| 63 | + # Architectural coverage groups |
61 | 64 | add_group 'Builders', 'app/builders' |
62 | 65 | add_group 'Forms', 'app/forms' |
63 | 66 | add_group 'API Controllers', 'app/future_controllers/better_together' |
|
68 | 71 | add_group 'Robots', 'app/robots' |
69 | 72 | add_group 'Sanitizers', 'app/sanitizers' |
70 | 73 | add_group 'Services', 'app/services' |
| 74 | + |
| 75 | + # ============================================================================ |
| 76 | + # SUBSYSTEM COVERAGE GROUPS |
| 77 | + # Organized by Better Together Community Engine's 15 major functional systems |
| 78 | + # Based on: docs/assessments/architectural_analysis_2025-11.md |
| 79 | + # ============================================================================ |
| 80 | + |
| 81 | + # Core Systems (High Priority) |
| 82 | + |
| 83 | + add_group '1. Platform Management' do |src_file| |
| 84 | + src_file.filename.match?(%r{ |
| 85 | + /platform(?!_invitation)| |
| 86 | + /platforms_controller| |
| 87 | + /host_dashboard_controller| |
| 88 | + /platform_invitations_controller| |
| 89 | + /platform_policy| |
| 90 | + /platform_invitation_policy| |
| 91 | + /platform_invitation_mailer_job| |
| 92 | + /platform_host |
| 93 | + }x) && !src_file.filename.match?(/person_platform_membership/) |
| 94 | + end |
| 95 | + |
| 96 | + add_group '2. Community Management' do |src_file| |
| 97 | + src_file.filename.match?(%r{ |
| 98 | + /community(?!_collection)| |
| 99 | + /person_community_membership| |
| 100 | + /person_block| |
| 101 | + /report| |
| 102 | + /calendar(?!_event)| |
| 103 | + /communities_controller| |
| 104 | + /person_community_memberships_controller| |
| 105 | + /person_blocks_controller| |
| 106 | + /reports_controller| |
| 107 | + /community_policy| |
| 108 | + /person_community_membership_policy| |
| 109 | + /person_block_policy| |
| 110 | + /report_policy| |
| 111 | + /primary_community |
| 112 | + }x) && !src_file.filename.match?(/community_map/) |
| 113 | + end |
| 114 | + |
| 115 | + add_group '3. Content Management' do |src_file| |
| 116 | + src_file.filename.match?(%r{ |
| 117 | + /page(?!_view|_metric)| |
| 118 | + /post(?!al)| |
| 119 | + /content/| |
| 120 | + /upload| |
| 121 | + /pages_controller| |
| 122 | + /posts_controller| |
| 123 | + /uploads_controller| |
| 124 | + /static_pages_controller| |
| 125 | + /page_policy| |
| 126 | + /post_policy| |
| 127 | + /author(?!ship)| |
| 128 | + /authorship| |
| 129 | + /publishing |
| 130 | + }x) |
| 131 | + end |
| 132 | + |
| 133 | + add_group '4. Communication & Messaging' do |src_file| |
| 134 | + src_file.filename.match?(%r{ |
| 135 | + /conversation| |
| 136 | + /message(?!_delivery)| |
| 137 | + /conversations_controller| |
| 138 | + /messages_controller| |
| 139 | + /conversation_policy| |
| 140 | + /message_policy| |
| 141 | + /conversations_channel| |
| 142 | + /messages_channel| |
| 143 | + /new_message_notifier |
| 144 | + }x) |
| 145 | + end |
| 146 | + |
| 147 | + add_group '5. Authentication & RBAC' do |src_file| |
| 148 | + src_file.filename.match?(%r{ |
| 149 | + /user(?!_mailer)| |
| 150 | + /identification| |
| 151 | + /role(?!_resource)| |
| 152 | + /resource_permission| |
| 153 | + /role_resource_permission| |
| 154 | + /jwt_denylist| |
| 155 | + /users/| |
| 156 | + /roles_controller| |
| 157 | + /resource_permissions_controller| |
| 158 | + /role_policy| |
| 159 | + /resource_permission_policy| |
| 160 | + /permissible |
| 161 | + }x) |
| 162 | + end |
| 163 | + |
| 164 | + add_group '6. Events & Calendar' do |src_file| |
| 165 | + src_file.filename.match?(%r{ |
| 166 | + /event(?!_category_categorization)| |
| 167 | + /calendar_event| |
| 168 | + /events_controller| |
| 169 | + /events/| |
| 170 | + /event_policy| |
| 171 | + /event_reminder |
| 172 | + }x) |
| 173 | + end |
| 174 | + |
| 175 | + add_group '7. Joatu Exchange', 'app/better_together/joatu' |
| 176 | + |
| 177 | + # Supporting Systems (Medium Priority) |
| 178 | + |
| 179 | + add_group '8. Geography & Location', 'app/better_together/geography' |
| 180 | + |
| 181 | + add_group '9. Metrics & Analytics' do |src_file| |
| 182 | + src_file.filename.match?(%r{ |
| 183 | + /page_view| |
| 184 | + /link_click| |
| 185 | + /metric(?!s_controller)| |
| 186 | + /metrics_controller| |
| 187 | + /metrics/| |
| 188 | + /trackable| |
| 189 | + /page_metrics |
| 190 | + }x) |
| 191 | + end |
| 192 | + |
| 193 | + add_group '10. Navigation System' do |src_file| |
| 194 | + src_file.filename.match?(%r{ |
| 195 | + /navigation_area| |
| 196 | + /navigation_item| |
| 197 | + /navigation_areas_controller| |
| 198 | + /navigation_items_controller| |
| 199 | + /navigation_area_policy| |
| 200 | + /navigation_item_policy| |
| 201 | + /navigation_helper |
| 202 | + }x) |
| 203 | + end |
| 204 | + |
| 205 | + add_group '11. Notification System' do |src_file| |
| 206 | + src_file.filename.match?(%r{ |
| 207 | + /notification(?!s_channel)| |
| 208 | + /notifiers/better_together/| |
| 209 | + /notifications_channel| |
| 210 | + /notifications_controller |
| 211 | + }x) && !src_file.filename.match?(/new_message_notifier|event_reminder/) |
| 212 | + end |
| 213 | + |
| 214 | + add_group '12. Content Organization' do |src_file| |
| 215 | + src_file.filename.match?(%r{ |
| 216 | + /category(?!_categorization)| |
| 217 | + /tag(?!gable)| |
| 218 | + /friendly_slug| |
| 219 | + /categories_controller| |
| 220 | + /tags_controller| |
| 221 | + /category_policy| |
| 222 | + /sluggable |
| 223 | + }x) |
| 224 | + end |
| 225 | + |
| 226 | + add_group '13. Contact Management' do |src_file| |
| 227 | + src_file.filename.match?(%r{ |
| 228 | + /postal_address| |
| 229 | + /phone_number| |
| 230 | + /email_address| |
| 231 | + /social_media_account| |
| 232 | + /postal_addresses_controller| |
| 233 | + /phone_numbers_controller| |
| 234 | + /email_addresses_controller| |
| 235 | + /postal_address_policy |
| 236 | + }x) |
| 237 | + end |
| 238 | + |
| 239 | + # Specialized Systems (Lower Priority) |
| 240 | + |
| 241 | + add_group '14. Infrastructure System' do |src_file| |
| 242 | + src_file.filename.match?(%r{ |
| 243 | + /building(?!_connection)| |
| 244 | + /building_connection| |
| 245 | + /floor| |
| 246 | + /room| |
| 247 | + /buildings_controller| |
| 248 | + /building_policy |
| 249 | + }x) |
| 250 | + end |
| 251 | + |
| 252 | + add_group '15. Workflow Management' do |src_file| |
| 253 | + src_file.filename.match?(%r{ |
| 254 | + /wizard| |
| 255 | + /wizards_controller| |
| 256 | + /wizard_steps_controller| |
| 257 | + /checklist |
| 258 | + }x) |
| 259 | + end |
71 | 260 | end |
72 | 261 |
|
73 | 262 | RSpec.configure do |config| |
|
0 commit comments